Skip to content

Add reproducible terminal demo generation script #8

Description

@tayfuryldz

Context

docs/headerproof-demo.cast is part of the documented CLI/output contract and is parsed by tests, but there is no reproducible command/script for regenerating it. That makes the recording easy to leave stale after an intentional CLI change.

Scope

Add a small deterministic local generation path for the existing controlled demo. Do not introduce a live target or change scanner behavior.

Start with:

  • docs/headerproof-demo.cast — current asciinema v2 artifact
  • tests/test_docs_contract.py::test_terminal_demo_is_valid_local_asciinema_contract
  • docs/PROJECT_PROOF.md — rules separating the localhost demo from a real finding

A focused script under scripts/ or an equivalently small documented command is appropriate. Discuss first if the solution needs new runtime dependencies.

Expected outcome

A maintainer should be able to regenerate the demo from a controlled localhost fixture and get a valid asciinema v2 cast that preserves the documented compact finding shape.

Acceptance criteria

  • Generation uses only a controlled localhost fixture; no public target is contacted.
  • Output is valid asciinema v2 and remains parseable by the existing docs contract test.
  • The generated transcript contains the HeaderProof localhost command and at least one expected compact finding line.
  • Re-running the generator does not introduce meaningless/random documentation churn; normalize or control unstable values where practical.
  • docs/PROJECT_PROOF.md documents the exact regeneration command.
  • No scanner behavior changes and no new dependency unless discussed first.

Validation

Run at minimum:

python -m pytest -q tests/test_docs_contract.py

Also run the new generator twice and inspect the diff so avoidable nondeterministic churn is caught before opening the PR.

Comment before starting so a maintainer can confirm the scope is still available.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomers

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions