Repository navigation
feat(native): export commit-bound model and lossless human context (#346) - #352
Conversation
…tive-context-export
# Conflicts: # plans/plan-20261014-1325-issue-346-u4-native-context-export.md
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e7eafee1f2
ℹ️ 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".
| return output.split("\0") | ||
| .filter(Boolean) | ||
| .map(parseLsTreeEntry) | ||
| return readGitBlobTree(root, ref, { maxBytes: GIT_CAT_FILE_MAX_BYTES, sizes: false, trees: false }) |
There was a problem hiding this comment.
Preserve legacy tracked-tree read timeouts
When an existing daemon workflow scans a large or slow repository whose git ls-tree or subsequent git cat-file takes more than 10 seconds, these calls now inherit readOnlyGit's native-export gitTimeoutMs default; the previous runGit/execFileSync implementations had no timeout. This can make refactor scans, dependency queries, recommendations, and developer-review preparation fail even though they are unrelated to native export, so pass a legacy timeout policy explicitly rather than leaking the native reader's bound into these shared APIs.
Useful? React with 👍 / 👎.
Refs #346. Implements the approved native-export design from #349 for repo-harness R6.
Repo-harness currently reads native YAML, translates registry anchors and slices generated Markdown itself. This change adds
archctx export native --worktreeand--ref <commit-ish>, returningarchcontext.native-context-export/v1with profilerepo-harness/v1and featurenative-context-export-v1.The fixed-ref reader uses checked, fixed Git objects with lazy fetch and replacement objects disabled. The worktree reader verifies the complete selected input closure twice, identities and HEAD, then refuses observed drift. It returns every canonical model record and status, declared capability metadata, explicit missing contracts and exact human UTF-8 regions/section ranges. Missing optional LSP/verification metadata remains null. The lock-free ABA limit is documented.
The shared parser only gains duplicate-key rejection; its accepted values are preserved. The document reader accepts current v6 plus the exact observed four-attribute historical v5 marker. Both retain pairing, duplicate/nesting, target and body-checksum guards. Historical v5 sourceDigest is syntax-checked metadata, never freshness evidence. The v6 producer and RPC v2/product-version metadata stay unchanged.
Validation:
Ancienttwo/repo-harness@902c4ed7866f2b7359b1553a8cd64934496ea3c7: 454/454 original-parser/consumer value parity; 40 exact v5 source documents preserve independently captured human-byte complements. Original strict-v6 rejection artifact remains unchanged as history.sha256:6d03b7e581bd78bdfff655caf9eb214b47b63c2b03ddfa66a6cc6e02340f1d24.bun run verifyexited 0 at4f68c76a774fd74c5691c1a0745a0dfe0e5054aa(immutable executionvx-2212fb60798d4045856b). At current HEADe7eafee1f2c5ed60e9e044a09cd98201dcbd1c44, bounded BOM, smoke-staging and manifest-stamp deltas passed typecheck, affected projection/reader/CLI tests, isolated Node smoke and semantic freshness assertions. Canonical verification accepted the passing full baseline plus two current exact checks (vx-1a54a0f2695b465b85fe,vx-7b842bac3c7544808990) with no snapshot drift; the full suite was not rerun locally at this HEAD.ae1f84eceach completed 3092 passing tests / five skips / zero test failures, then failed loading@node-rs/jiebain the new Node bundle smoke. The smoke now resolves declared packages through the owning package, copies their files and explicit platform bindings into the temporary stage, excludes nested workspace modules and clears child-only ambient Node module/preload paths. Missing dependencies fail explicitly; no smoke assertion is removed. Current exact-HEAD OS/Node matrix is pending, including all three Windows lanes and the prior 20-minute-budget-cancelled Mac Node 22 lane. Workflow budgets are unchanged.Supported projection reconciliation is complete. Read-only check/plan classified six targets
unchangedand onestamp-only, with every output/semantic/proof change false. Ordinaryprojection runapply updated only the existing manifest row's 13sourceStamps: nine moved by U4 and four inherited from already merged D4/RPC changes, verified against frozen Git baselines. The byte audit preserved every other manifest field, all architecture document outputs, model files and agent contracts. Subsequent check isnoop, with seven unchanged targets and freshness true.Repository workflow
completereturned semanticpassat exact current HEADe7eafee1f2c5ed60e9e044a09cd98201dcbd1c44under normal posture with the full local CodeGraph 1.6.1 index: zero errors/warnings/notices, empty findings/actionsRequired, dependency gate pass and no downgraded findings or waivers. Debt remains partial coverage, not a zero-debt proof. Draft for the current hosted OS/Node matrix and coordinator integration acceptance; publication and merge remain separate.