Repository navigation
docs(demo): keep demos off the real login, and wait on the right text - #71
Merged
Merged
Conversation
- Give each run an environment of its own (SOURCE_PROXY_URL at the stub), since the cache keys keyring entries by environment and HOME doesn't move the keyring: a demo could read or remove the real login. - see() counts only what its match covers as seen, so a prompt that arrives with the match is still there for the next wait. - run() skips the shell's echo, so waiting for text that's also in the command waits for the command's output. - SOURCE_PAGER=cat, so a list taller than the screen doesn't wait for a key. - The SVG rewrite looks for leftover CSS only inside tags, so a demo that prints "style" no longer fails. - Point the CLI at 127.0.0.1, where the stub listens, not localhost. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Claude finished @alukach's task in 17s —— View job ✅ No blocking issues — safe to merge. I read the diff only and did not run anything. Checked:
Simplify (ponytail)
💰 Estimated review cost: $0.13 · 0m17s · 4 turns |
5 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from the code review of
demo/(#59, #60, #69). The most important: a demo could read or remove your real production login.What changes
cache::env), and replacingHOMEdoesn't move the keyring. The recorder leftSOURCE_PROXY_URLat production, so a demo ofauth statuswould have shown your real account in a public SVG, andauth logoutwould have deleted your real session.SOURCE_PROXY_URLnow points at the stub, so each run is its own environment (127.0.0.1:PORT). One gap remains, noted in aponytail:comment and indemo/README.md: a demo that saves a session or credentials still writes an entry for that environment to the OS keyring. Closing it would need a way to turn the keyring off in the CLI, so the docs say to leave sign-in out of demos.see()counts only what its match covers as seen. It used to count everything received so far, so a prompt that arrived with the matched text was gone before the nextprompt()waited for it.run()skips the shell's echo of the command, sos.run("… bob"); s.see("bob")waits for the command's output, not the typing.SOURCE_PAGER=cat, so a list taller than 34 rows doesn't openlessand stall the recording.127.0.0.1, where the stub listens, notlocalhost, which may try IPv6 first. The URLs in demos now readhttp://127.0.0.1:PORT.Not in this PR
main'srecord.pyas well.Testing
a lifestyle with class="g" is done, waiting fordone(also in the typed command), thenprompt(), then aproduct listwithout--no-pager. It records on this branch. Onmainit fails:see("done")matches the echo and the prompt waits fall out of step. On the raw svg-term output of that recording,main'swithout_css()raises and this branch's keeps the text.product list -ileaves no shell or CLI running, on this branch ormain.http://127.0.0.1:PORTURLs.authcommand in a demo, which would touch the real keychain (AGENTS.md: never in manual runs). The isolation comes from readingcache.rs: the keyring account isaccount(env, name), and the environment comes fromSOURCE_PROXY_URL.cargo fmt --check,cargo clippy --all-targets -- -D warnings,cargo test: 165 pass. No Rust changes.🤖 Generated with Claude Code