Skip to content

fix(build): treat stale worktree ownership records as unowned - #689

Merged
lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/build-ownership-stale-identity
Nov 11, 2026
Merged

lastobelus merged 3 commits into
lastcode/mainfrom
lastcode/build-ownership-stale-identity

Conversation

@lastobelus

@lastobelus lastobelus commented Nov 10, 2026 •

Copy link
Copy Markdown
Owner

Builds could fail before compilation when a saved build record's worktree identity no longer matched the checkout. A device number changing across a reboot is enough to trigger it, and the build then stayed blocked until someone cleared the record by hand.

Fix

In packages/shared/src/generatedBuildOwnership.ts, a well-formed saved record whose worktree identity (device, inode, birthtime or path) doesn't match the current checkout is now read as unowned. The build no longer fails on it. The next successful stage publication writes a fresh record over it.

What stays protected

  • Old output: a stale record grants no permission to replace, delete or adopt existing output. Identical unknown files stay unowned. Differing unknown files still require review.
  • Malformed records: still fail validation.
  • Interrupted-publication journal: identity checks are unchanged and strict.
  • Observation-only markers: stale clocks carry no consent and are ignored; protected review records remain strict.

Validation

  • Four stale-identity regressions (device, inode, birthtime, path) failed before the fix.
  • Malformed-identity and repeated-renumber observation regressions also failed before their fixes.
  • 70 focused ownership, review and recovery tests passed.
  • Serial check:changed passed (100 tests).
  • Quick CI passed on the exact head.
  • Not run: local Full CI, a full build, simulator, or anything against live state.

Local review: 2 rounds with gpt-6.1-terra (xhigh) and Claude Opus 5.5 (high), approved. No open blocker or should findings.

Carry-Group: build-ci

Implemented with Codex gpt-6.1-sol (xhigh) in T3 Code through the Codex harness.

Treat structurally valid ownership records for a different checkout identity as unowned. Preserve malformed-record rejection, publication recovery guards, and unknown output collisions.

Carry-Group: build-ci

Carry-Observation: Stale native identities grant no output replacement or deletion authority; successful staged publication records fresh ownership.
@lastobelus lastobelus changed the title fix(build): replace stale worktree ownership records fix(build): treat stale worktree ownership records as unowned Nov 10, 2026
Validate saved owner identity structure before treating a mismatch as unowned. Ignore stale observation-only review clocks without weakening protected review markers, and explain how to handle changed unowned output.

Carry-Group: build-ci

Carry-Observation: Compiler records that become legacy after identity changes must not create permanent review protection from observation-only clocks.
Describe ownership of the existing bytes accurately when output was edited after emission.

Carry-Group: build-ci
@lastobelus
lastobelus marked this pull request as ready for review November 10, 2026 23:10
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-10T23:12:30.310487Z ed6e5e5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lastobelus

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: ed6e5e5c18

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@lastobelus
lastobelus merged commit 8d128e3 into lastcode/main Nov 11, 2026
34 of 49 checks passed
@lastobelus
lastobelus deleted the lastcode/build-ownership-stale-identity branch November 11, 2026 00:03
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.

1 participant