T3: Codex adapter .hypignore capture-seam drop (LLP 0050)#208
Merged
philcunliffe merged 1 commit intoJun 30, 2026
Merged
Conversation
Symmetric to the @hypaware/claude T2 drop: enforce the `.hypignore` folder-scoped `ignore` usage policy at the Codex capture seam, the only place that resolves a `cwd`, so an ignored exchange never reaches the cache. - `codex/src/exchange-projector.js`: `createCodexExchangeProjector` holds one shared `createUsagePolicyResolver()` (per listener; injectable for tests). Once the exchange `cwd` is resolved, an ancestor `.hypignore` of class `ignore` returns no projection, so the gateway source's `messageRows.length > 0` write guard persists nothing. The response has already streamed, so the live LLM call is untouched (LLP 0049 R1/R2). Emits a structured `usage_policy_drop` log (hashed cwd, governing path). - `codex/src/backfill.js`: `createCodexBackfillProvider` holds one resolver and skips a session whose recorded `cwd` is ignored before projecting/yielding, so `hyp backfill` never re-imports sessions ignored live (LLP 0049 R1). Adds `sessions_ignored` to the scan-complete telemetry. The projector returns `undefined` (its established skip signal — the dispatcher maps it to an empty rows array, the "return []" of LLP 0050 §Live); returning a literal `[]` would trip the gateway's invalid-projection warning. No cache schema, export driver, gateway, or settlement change — capture-seam only, per LLP 0050. Tests mirror T2: ignored cwd -> no rows/skip, clean cwd unaffected, drop telemetry emitted; the real shared matcher is exercised via injected fs. @ref LLP 0050 [implements] Task-Id: T3 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
de497f7
into
integration/hypignore-usage-policy
6 checks passed
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.
Implements task T3 of hypignore-usage-policy: the Codex adapter capture-seam drop, symmetric to T2 (claude).
codex/src/exchange-projector.jscreateCodexExchangeProjectorreturns no projection for an ignored cwd (the dispatcher maps that to an empty rows array, so the gateway write guard persists nothing).codex/src/backfill.jsskips ignored sessions before projecting/yielding.Holds one shared
createUsagePolicyResolver()per projector/backfill run. Capture-seam only — no cache schema, export driver, gateway, or settlement change (LLP 0050). Tests mirror T2: ignored cwd -> no rows/skip, clean cwd unaffected, drop telemetry emitted; the real shared matcher is exercised via injected fs.@ref LLP 0050 [implements]Checks: npm test (1503 pass), typecheck, lint all green.
Task-Id: T3
🤖 Generated with Claude Code