Repository navigation
Spec: deepen Command log ownership to prevent same-second collisions - #798
Merged
Merged
Conversation
Give same-second Commands distinct owned logs and records
Carry exact Command ownership through Session logs and child Runs
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.
Summary
Commands started on the same issue in one second now retain separate output and evidence. One immutable stamp/token owner connects both Tickets' work: exclusive Command-log allocation and record naming (#795), followed by Session naming, child inheritance and exact reader matching (#796).
Allocation collisions retry without truncating an existing file. Write failures retain acquired ownership and partial output; allocation failures never claim another Command's file. Child Runs reuse the owner and preserve exact parent/dispatch links. Resume and Repair keep their existing Session kinds.
Legacy history remains readable alongside new files, with the existing directories, human selection syntax, Stop ownership and version-1 records/CLI JSON. Skipped Passes still keep no Command log. Domain definitions, navigation, the logging ADR and both manuals describe the final storage format.
Closes #794
Evidence
de3c1ed: starting the second same-second Command erased the first Command's output.After: existing regressions exercise interleaved output, exclusive allocation/collision recovery, partial failures, mixed legacy/new inspection and Session/Model/report isolation.
cargo test,cargo fmt --check, andcargo clippy --all-targets -- -D warningson the final tree. The full run includes 1,057 passing unit tests (2 ignored).cargo test logs::owner::tests(3 tests) andcargo test --bin thirdshift session::tests::same_second_commands_keep_session_model_and_review_contents_separate -- --exact(1 test). The eight relevant integration suites passed all 263 tests. Insite,npm cifollowed bynpm testpassed all 13 tests, including manual freshness.ENOENT). The isolated test and the complete stable-build rerun passed; no Worktree change was needed.Unaddressed findings
Standards
None. The single P3 design finding (duplicated stamp/token formatting in
src/logs/owner.rs) was resolved by sharingIdentity's formatter between Command and Session paths. Existing compatibility and isolation tests verify the refactor; no behavioral defect was claimed.Spec
None. The independent whole-Spec review found no missing, incorrect or unrequested behavior.
Security
None. A single-session guidance review of
de3c1ed94dc3ad78859fccf555b195b90ac76a0a...HEADand supporting code found no introduced Security findings. The review covered exclusive allocation, filename/path handling, child ownership inheritance, Session/Model/report attribution, legacy history and CLI readers, and Stop ownership against the relevant attack-class guidance and repository trust decisions. This was source review; no proof-of-concept candidate required execution, and no source changes were made.Security review outcome
No unaddressed introduced findings.
Review coverage
Both reviewers inspected all 27 changed paths, including deleted
src/logs/command_log.rsand generatedsite/docs/index.html, plus supporting standards, domain definitions and applicable ADRs. Both inspected the final formatter refactor. Unread changed files: none. Generated-output exclusions: none.Merge Danger
Door: two-way
No existing logs are moved or rewritten. New filenames persist; complete discovery of new Session logs requires an updated reader.
Blast Radius: logging
Command/Session allocation, evidence attribution and CLI history across Runs and Passes. Process ownership, parent links and scheduling retain their existing contracts.
Built with codex · gpt-6.1-sol · high
Tickets