Skip to content

refactor(runner): declare journal retention in command traits - #3094

Merged
thymikee merged 1 commit into
mainfrom
codex/native-journal-policy
Oct 1, 2026
Merged

thymikee merged 1 commit into
mainfrom
codex/native-journal-policy

Conversation

@thymikee

@thymikee thymikee commented Oct 1, 2026 •

Copy link
Copy Markdown
Member

Summary

Declare journal response retention alongside the existing native command traits. The journal now consumes that declaration instead of maintaining its own command switch: snapshot/screenshot omit response JSON; all other commands retain it as before.

3 files, 169 gross lines. The existing exhaustive trait table also checks retention for every command and both alert forms. Independent review approved the narrow change. No prepared-route traits or TypeScript/native policy coupling.

Validation

Tested commit b07712f3393370c13a20f3124db1645384db3286:

  • pnpm check:affected --run: all runnable checks passed.
  • pnpm check:xctest-selection: all methods reachable; updated trait test is in the PR host lane.
  • Packaged runner: all 57 Swift files parse and preserve line numbers.
  • Fresh macOS runner builds passed, both unsigned and development-signed.

Local host XCTest was blocked by Gatekeeper before any tests ran; host security settings were unchanged. The authoritative macOS CI run passed on this exact head: all 278 host XCTests ran, including complete trait declarations and journal retention/error/sequence tests. iOS, Integration Tests, Coverage, and all other applicable checks passed. No remaining CI blocker. This changes in-memory journal policy ownership, not device interaction behavior.

@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown

Size Report

Metric Base Current Diff
Installed (including dependencies) 4.91 MB 4.91 MB +257 B
Package (unpacked) 4.91 MB 4.91 MB +257 B
Package (download) 1.47 MB 1.47 MB -18 B

Startup median (7 runs, lower is better):

Scenario Base Current Diff
CLI --version 27.3 ms 27.5 ms +0.2 ms
CLI --help 81.3 ms 81.8 ms +0.5 ms

@thymikee

thymikee commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Reviewed b07712f. Retention from the command traits matches the old journal switch: snapshot and screenshot drop response JSON, and every other command keeps it. No checks fail and there are no conflicts.

Two non-blocking notes: the doc comment change on invalidatesRememberedTextEntryTap is unrelated to retention, and no journal-level test checks that a snapshot entry has nil responseJson. One test that records a snapshot completion and asserts that would cover the wiring. Before you undraft, please confirm the macOS host XCTest lane ran green on this head.

@thymikee thymikee added the ready-for-human Valid work that needs human implementation, judgment, or maintainer merge label Oct 1, 2026
@thymikee
thymikee marked this pull request as ready for review October 1, 2026 11:43
@thymikee

thymikee commented Oct 1, 2026

Copy link
Copy Markdown
Member Author

Confirmed the macOS host lane passed on b07712f: CI run executed all 278 source-selected tests. testEveryCommandDeclaresEveryRunnerSideDecisionTogether and testCommandJournalRetentionPolicy both passed. The latter already records a snapshot completion and asserts nil response JSON at lines 134–144, so another test would duplicate that coverage.

The tap-invalidation doc wording removes the obsolete “not a fifth trait” count now that retention is the fifth trait; the behavior remains unchanged. Updated the PR evidence and marked it ready for review after checking all applicable CI is green.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 3 files

Re-trigger cubic

@thymikee
thymikee merged commit 784cf20 into main Oct 1, 2026
19 checks passed
@thymikee
thymikee deleted the codex/native-journal-policy branch October 1, 2026 11:49
@github-actions

github-actions Bot commented Oct 1, 2026

Copy link
Copy Markdown
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-10-01 11:49 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-human Valid work that needs human implementation, judgment, or maintainer merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant