Skip to content

T3: Codex adapter .hypignore capture-seam drop (LLP 0050)#208

Merged
philcunliffe merged 1 commit into
integration/hypignore-usage-policyfrom
task/hypignore-usage-policy/T3
Jun 30, 2026
Merged

T3: Codex adapter .hypignore capture-seam drop (LLP 0050)#208
philcunliffe merged 1 commit into
integration/hypignore-usage-policyfrom
task/hypignore-usage-policy/T3

Conversation

@philcunliffe

Copy link
Copy Markdown
Contributor

Implements task T3 of hypignore-usage-policy: the Codex adapter capture-seam drop, symmetric to T2 (claude).

  • codex/src/exchange-projector.js createCodexExchangeProjector returns 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.js skips 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

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>
@philcunliffe philcunliffe merged commit de497f7 into integration/hypignore-usage-policy Jun 30, 2026
6 checks passed
@philcunliffe philcunliffe deleted the task/hypignore-usage-policy/T3 branch June 30, 2026 03:48
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