Skip to content

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

Tasks: opt-in session credentials, never on argv ​

Derived from design.md and testing-plan.md. Each task is test-first; security-relevant tasks name their negative test.

Task list ​

  • [x] 1. Parse env.sessionCredentials and resolve the boundary per work item
    • SessionCredential, session_credentials(), SessionEnvironment.credentials / .inherit / .for_work_item(); remove gains every name/from; compare() and _wanted() read inherit; session_environment_and_lines returns non-None when only sessionCredentials is set.
    • Depends on: none
    • Requirements: R1.1–R1.9, R2, R4.1, R4.3
    • Test: T1/T8 — tests/test_envstate.py new cases (parsing, warnings, scope A7, passthrough refusal A5, daemon-credential warning A6, unconfigured equality R1.2)
  • [x] 2. Deliver inherited values through a 0600 file and the sh loader
    • _credential_file(), sweep, loader prefix in _harness_command, client env strips remove ∪ inherit, delete-on-failure, session.credentials_inherited event, credentials_dir wired from the dispatcher, standing sessions and restart.
    • Depends on: 1
    • Requirements: R3.1–R3.6, R4.2, R7.2
    • Test: T1/T8 — tests/test_tmux_runner.py new cases (argv has no value A1, file mode / symlink A3, client env A2, failure cleanup, sweep, event); T2 — tests/test_session_credentials_integration.py (real tmux)
  • [x] 3. Scrub inherited values from session text and the event log
    • sessioncreds module; route-layer _scrubbed() on ask, reply, comments, tickets, PRs, force, skip; EventLog.emit scrub; self-diagnosis compose_issue.
    • Depends on: 1
    • Requirements: R5.1–R5.3
    • Test: T1/T8 — tests/test_sessioncreds.py, tests/test_api_session_credentials.py (A4)
  • [x] 4. Show held credentials in status and sessions list
    • drift row + list_sessions credentials map; credentials_line in status; Credentials column when present.
    • Depends on: 1
    • Requirements: R7.1
    • Test: T1 — tests/test_session_environment.py new cases
  • [x] 5. Schema, operator docs, capability doc, changelog
    • env.sessionCredentials in cli-config.schema.json (with the trade-off); docs/config/cli/index.md, docs/cli/commands/status.md, docs/cli/commands/sessions.md, docs/capabilities/interactive-sessions.md, CHANGELOG.md.
    • Depends on: 1, 2, 3, 4
    • Requirements: R8.1
    • Test: T10 — make validate; T12 — make lint

Dependency graph (DAG) ​

Checkpoints ​

The targeted T1 command after each task; T2 after task 2; the full suite (make test) and static checks after task 5, before verification.

Released under the MIT License.