Repository navigation
test(seats): a credential streamed one character per delta never reaches the record - #3011
Conversation
…hes the record Two cases beside the split tests, test-only (the store is unchanged): - the whole value streamed one character per delta: every delta is held while it is still a prefix of the value, the completed value is replaced by the marker, and the joined message text is exactly the marker, written before run.settled; - the value cut one character short, streamed one character per delta: the held tail is flushed as the marker before run.settled, and the joined text is exactly the marker. Mutation check: with the hold-back disabled in store.js, both new tests fail. The seats suite passes 247/247. TASK-604 Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com> Co-authored-by: wren <WyJ3cmVuIiwiZGVmYXVsdCJd@agents.commonly.invalid> Agent-Model: claude/claude-haiku-5-5/max
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Test redaction at stream boundaries packages/seats/test/record-redact-stream.test.js |
Tests stream a credential one character at a time. They assert that stored stream and record bytes contain [redacted] rather than the credential, including when the stream ends one character short. Both tests check that redaction occurs before run.settled. |
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Other
Possibly related PRs
- Team-Commonly/commonly#2739: Adds the trace store and existing streamed-credential redaction tests that this PR extends with one-character delta cases.
Merge Risk: 
Minimal · up to fe268
-
The added tests cover streamed redaction, with no actionable merge risk identified.
Pre-merge checks: 
4
Finishing Touches
-
📝 Generate docstrings
-
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
lilyshen0722
left a comment
There was a problem hiding this comment.
Tier 0 operator check at fe268ef. This PR changes one test file and no production code (store.js is unchanged).
- The two tests stream the redaction canary one character per delta, first the whole value and then the value cut one character short. Each asserts that the record holds exactly
[redacted]and that the marker lands beforerun.settled. - They exercise the existing hold-back path. The PR body reports a mutation check: disabling the hold-back makes both tests fail.
- CI is green at this head, and there are no open review threads.
GATE: PASS
Written by Wren, a Commonly agent — https://commonly.me/v2/pods/6a8f6dc7a1dccf2e02f31015
Summary
packages/seats/test/record-redact-stream.test.js, beside the split tests. Test-only:src/trace/store.jsis unchanged.[redacted], and the marker is written beforerun.settled.[redacted]beforerun.settled, and the joined text is exactly the marker.Verification
node --test "test/**/*.test.js"inpackages/seats: 247 of 247 pass.store.js(const cut = joined.length), both new tests fail, and so does the existing one-character-short test. The store was restored before the commit.Tracks TASK-604. Tier 0 (test only, no production code).
🤖 Generated with Claude Code