Skip to content

<!-- Authored per the the-loop:writing skill. -->

Testing plan: spawned sessions never receive a secret ​

Derived from requirements.md and design.md. The results are in evidence/verification.md.

Test matrix ​

#TypeApplies?Scope / what it provesWhere it runs
T1Unit (boundary)yescredential_names finds every *TokenEnv/*SecretEnv string and list at any depth plus the defaults; passthrough_names drops a credential with a warning naming it; session_environment takes a passthrough value from the file first, then the process, and puts every other file name and every credential in removecli/tests/test_session_environment.py
T2Unit (argv)yesa spawn and a respawn with an env file declaring GH_TOKEN carry no GH_TOKEN= in any argv element; -e names only the three plus passthrough; the harness is prefixed env -u GH_TOKEN …; with no config the argv is unchangedcli/tests/test_tmux_runner.py
T3Unit (tmux environment)yesthe tmux subprocess is started with the remove names absent from its environmentsame
T4Integration (real tmux)yes, where tmux ≥ 3.2 is installeda real spawn from a process holding GH_TOKEN=dummy-secret-value: the tmux server's command line (ps) and the pane's environment (/proc/<pid>/environ) do not contain the value; THE_LOOP_WORK_ITEM is presentcli/tests/test_session_secrets_integration.py
T5Unit (routing)yesin a daemon-spawned session with no service, harness_routed raises ServiceUnavailable and never calls local; outside one it falls back with the note, as before; the stale-service branch likewisecli/tests/test_github_verbs_cli.py
T6Unit (ask route)yesthe-loop ask posts through /sessions/ask when a service answers; the facade passes the CLI's actor through; in-process otherwise (outside a daemon session)cli/tests/test_ask_route.py
T7Contractyesthe served OpenAPI surface matches the authored contract with askSession addedcli/tests/test_api_contract_parity.py
T8Integration (drift and restart)yesa pane holding a removed name is stale; one holding only the three is fresh; restart relaunches with an env file that declares only credentialscli/tests/test_sessions_restart_integration.py
T9Configyesthe schema accepts env.sessionPassthrough and rejects a non-name; make validate passesscripts/validate_config.py, schema tests
T10Regressionyesruff, ruff format, pyright, the full CLI suite, markdownlintrepository checks
T11Securityyes (review)the abuse cases A1–A5 each map to a passing testevidence/security-review.md
T12UI / accessibility / performance / migrationn/ano UI; one dict walk per spawn; the config key is additive and needs no migration

Requirement trace ​

RequirementTests
R1.1, R1.2T2, T4
R1.3, R1.4T1, T2, T4
R2.1–R2.3T2, T3, T4
R3.1T6
R3.2–R3.4T5
R4.1–R4.4T1, T9
R5.1, R5.2T8
R6.1documentation review (evidence/documentation.md)

Verification environment ​

This checkout, Python via uv, tmux from the host for T4 (skipped with a reason where tmux is absent or older than 3.2). No credential is used: every token in a test is a dummy value.

Released under the MIT License.