Skip to content

feat(observe): REDACTION_RULES gives hosts the redaction rules' version and frame types - #194

Merged
xxchan merged 1 commit into
mainfrom
feat/redaction-rules-version
Oct 7, 2026
Merged

xxchan merged 1 commit into
mainfrom
feat/redaction-rules-version

Conversation

@xxchan

@xxchan xxchan commented Oct 7, 2026

Copy link
Copy Markdown
Member

Closes #193 (asked by Ferryman for Ferry D074).

What

REDACTION_RULES, exported from the root and @botiverse/oar/observe:

  • version: number (now 1): goes up whenever a credential-redaction rule is added or broadened. A host that cleans stored records with redactRecord stores the version it last ran with and rescans only when it changes, instead of on every oar upgrade (Ferry measured ~9 s per 200,000 entries per machine).
  • frameTypePrefixes: readonly string[] (now _x.ai/mcp/, _x.ai/mcp_initialized): a frame whose body.type starts with none of these is never changed, so a host can pre-filter its storage (rowrow already filters by _x.ai/mcp in SQL). The grok rule's own predicate reads this list, so the declared types and the rule cannot drift.

No change to what is redacted. The record-stream spec documents both fields next to redactRecord. oar's own package version is not exported: the rules version is what decides a rescan.

Tests

tests/redact-record.test.ts: the version is a positive integer; a credential under every listed prefix is redacted; frames of other types (including a near-miss x_x.ai/mcp/...) come back as the same object. pnpm run check is green.

🤖 Generated with Claude Code

…on and frame types

Hosts that clean stored records with redactRecord rescan everything on
every oar upgrade because nothing says when the rules changed (Ferry D074:
about 9 s per 200,000 entries per machine). REDACTION_RULES.version goes
up whenever a rule is added or broadened, and frameTypePrefixes lists the
frame types a rule can change, so a host rescans only when the version
changes and can pre-filter storage. The rule's own predicate reads the
same list, so the two cannot drift.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@xxchan
xxchan merged commit d515813 into main Oct 7, 2026
13 checks passed
@xxchan
xxchan deleted the feat/redaction-rules-version branch October 7, 2026 09:08
@xxchan xxchan mentioned this pull request Oct 7, 2026
xxchan added a commit that referenced this pull request Oct 7, 2026
Release OAR and CLI 0.33.1. This PR changes only the two package version
fields.

**New**
- `REDACTION_RULES` (#194, closes #193), from the root and
`@botiverse/oar/observe`: `version` (now 1) goes up whenever a
credential-redaction rule is added or broadened, so a host that cleans
stored records with `redactRecord` rescans only when it changes;
`frameTypePrefixes` (now `_x.ai/mcp/`, `_x.ai/mcp_initialized`) lists
the frame `body.type` prefixes a rule can change, so storage can be
pre-filtered. No change to what is redacted.

Validation: all 13 checks passed on #194's final head (`8894cce`). After
this PR passes CI and merges, tag its exact squash commit as `v0.33.1`
to trigger npm trusted publishing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: exe.dev user <[email protected]>
Co-authored-by: Claude Opus 5.5 <[email protected]>
stamp-build Bot added a commit that referenced this pull request Nov 6, 2026
<!-- stamp:review:v1 -->
<sup><img
src="https://cdn.slock.ai/avatars/6aabf32c-20bc-4cba-b55a-2aa72b60999b/8ba4452ceb890f1930886ef4286fdb99.webp"
width="16" height="16" align="absmiddle" alt=""> <b>Otter</b> from
open-agent-runtime opened this pull request through
Stamp</sup><br><sup><a
href="https://stamp.build/review?receipt=prc_0fb5cf07b6e8d4f2c51038cd29b016f5"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://stamp.build/assets/brand/stamp-glyph-dark.d907ffcadb44.svg"><img
src="https://stamp.build/assets/brand/stamp-glyph-light.58a2c10ed108.svg"
width="13" height="12" align="absmiddle" alt=""></picture> View in Stamp
→</a></sup>

---
<!-- /stamp:review:v1 -->

Codex can discard a pending model reply when a peer task finishes and
sends a native message. The stop-task fixture previously offered the
child recovery command only on the fourth parent request; the next
request returned ordinary text, so the parent completed without resuming
the child.

Choose every parent action from the request's user input and completed
tool results. A proposal interrupted before execution remains available;
a recorded tool result prevents another execution. Child delays also
follow the task payload. Request counters now serve only as diagnostics.
Share this script with the native probe.

The native regression controls peer completion before and during the
parent follow-up. It retains the exact two target requests, interrupted
first turn, completed second turn, distinct turn IDs and usable parent
and peer, and additionally requires exactly one native follow-up
activity. The interrupted case observes repeated proposals with only one
execution. Both cases retain raw requests and session records on
failure.

Validation on Linux:
- Controlled native ordering reproduces the original failure on Codex
0.166.0 with five parent requests, one target request and no second
target turn.
- Four HTTP regressions verify both spawn steps and follow-up before and
after execution, plus child input routing. The existing concurrent
request routing regression also passes.
- Full check passes: 3,610 tests, typecheck, lint and 18 mock behavior
cases.
- Codex 0.167.0 native probe and all 77 Codex vendor cases pass,
including both controlled completion orders.

No product behavior, existing lifecycle assertion or timeout changes.
macOS and Windows are left to this PR's CI. Task #194; diagnosis and
rerun commands are in `experiments/task-controls/README.md`.

Co-authored-by: Otter <[email protected]>
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.

Export a version for redactRecord's rules (or oar's own version)

1 participant