Skip to content

Keep an Other-account Session trace inside its Command record - #1683

Merged
JacobStephens2 merged 1 commit into
mainfrom
issue-1682
Oct 31, 2026
Merged

JacobStephens2 merged 1 commit into
mainfrom
issue-1682

Conversation

@JacobStephens2

@JacobStephens2 JacobStephens2 commented Oct 31, 2026 •

Copy link
Copy Markdown
Owner

Summary

confine_other_account_sessions
  contained_session(Command record directory, Session path)
    contained_trace
      lexical prefix of the record's directory
      regular file, not a symlink
      canonical path stays inside that directory
    same check for the trace's logs.jsonl and spans.jsonl
Observation::sessions
  drop a discovered Other-account trace that fails the same check

An Other-account Command's Session trace is kept only when its log records and its spans are regular files whose canonical paths stay inside the directory that holds that Command record. A lexical prefix still follows a directory symlink.

Seam: thirdshift show <command> --spans for an Other-account Command.

Evidence

  • Before: show widgets#8 --spans --json included CANARY-ESCAPED-SESSION from a trace reached through a directory symlink inside the Command record directory. show widgets#9 --spans --json included CANARY-SIDECAR-SESSION from a spans file that was a symlink out of that directory.
    After: cargo test --test console other_account_session_traces_stay_inside_their_command_record_directory and cargo test --test console other_account_session_trace_sidecars_stay_inside_their_command_record_directory pass. A regular trace in that directory (INSIDE-COMMAND-DIRECTORY) is still shown. scripts/affected-tests main passed: npm test --prefix site (72.94s) and cargo nextest run (2104.35s).

Merge Danger

Door: two-way

The new check only drops a Session trace while reading another account. Reverting the commit restores the previous read. Nothing is written to the other account.

Blast Radius: other-account reads

The serving account's own Commands are unchanged. An Other-account Session trace whose canonical path leaves its Command record directory is no longer shown, exported, or used for signals.

Unaddressed findings

None. Standards and Spec reported no findings.

Security review outcome

No unaddressed introduced findings.

Review coverage

site/docs/index.html was not read as source. It is generated from docs/guide.md by site/generate-docs.mjs. npm run docs --prefix site and npm run docs:check --prefix site both exited 0. site/architecture/index.html was reviewed as a hand-written page.

Closes #1682

Built with grok grok 1.0.70 (f50904eaee6c) [stable] · default model · default effort

Reject a trace when the canonical path of its log records or spans leaves the directory that holds that Command record. A lexical prefix still follows a directory symlink.
@JacobStephens2
JacobStephens2 merged commit 93d2c4b into main Oct 31, 2026
16 checks passed
@JacobStephens2
JacobStephens2 deleted the issue-1682 branch October 31, 2026 09:34
@JacobStephens2 JacobStephens2 mentioned this pull request Nov 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Keep an Other-account Session trace inside its Command record

1 participant