Repository navigation
TD-5445: Code feed: a problem reason never echoes a value - #304
Merged
Merged
Conversation
A card or events line that can't be read is listed with which field and what's wrong, in words TST Desk wrote itself (FeedError, and fixed words per pydantic error type), never the value or an exception's own text. A private key in a bad ts showed its body: repr writes newlines as \n, a shape the scrubber misses without the END line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR
…tests json's messages by their fixed start, never the quoted rest; a whole-file or whole-line error carries no field label; each card and events-line case checked exactly with a private key (both shapes), an API key and a bearer token; frames also fail on any [REDACTED]. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR
…in today's words Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR
captcrock
pushed a commit
that referenced
this pull request
Dec 3, 2026
…er change Text over its cap (a card's 4,000/200-character fields, an event's 2,000- character text and 200-character source) is scrubbed before it is cut: a secret split by the cut, or a private key that lost its END line to it, was no longer one the scrubber knew, and part of it showed. The watcher keeps the current feed's scrubbed frames, one for a window and one for a phone or another computer, emptied when its fingerprint changes; the push and get_code_feed share them. Every reply still goes through the reply funnel's scrub. Rebased onto TD-5445 (#304) as one commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR
captcrock
added a commit
that referenced
this pull request
Dec 3, 2026
…ames are cached per change (#305) * TD-5444: Code feed: scrub before the cut; scrubbed frames made once per change Text over its cap (a card's 4,000/200-character fields, an event's 2,000- character text and 200-character source) is scrubbed before it is cut: a secret split by the cut, or a private key that lost its END line to it, was no longer one the scrubber knew, and part of it showed. The watcher keeps the current feed's scrubbed frames, one for a window and one for a phone or another computer, emptied when its fingerprint changes; the push and get_code_feed share them. Every reply still goes through the reply funnel's scrub. Rebased onto TD-5445 (#304) as one commit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR * TD-5444: review: a secret registered at run time empties the cached frames The watcher noted nothing about register_secret_value, so a value registered after the frames were made went out raw in the next push (main scrubs at push time). The frames are now kept with the number of registered secrets, emptied when it grows, and a frame scrubbed while one was being registered isn't kept. The backlog names every cut: 4,000, 2,000, 200 and 64 characters. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR --------- Co-authored-by: R&D12 <rd12@ezer.local> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.
When a card or events line in the Code feed folder can't be read, the feed lists it under "Couldn't read" with a reason. Until now that reason could quote the bad value itself. A private key put in
tsorupdatedthen showed its body to every viewer: Python's repr writes the key's newlines as\n, and the scrubber doesn't recognise a key in that shape without its END line.What changes
FeedError);strerror;Docs:
docs/code-feed.mdand the TD-5445 backlog entry. The sample problem in the protocol fixtures (generator,protocol-fixtures.jsonand one UI test) now uses the new wording.Before / after
For each test secret (a private key in two shapes, an API key, a bearer token), each one placed in every card and events-line field that can fail: 56 cases in all.
updatedorts)[REDACTED](a value was echoed, then scrubbed)ts1 line: ts: Value error, Invalid isoformat string: '[REDACTED]\\nMIIE…1 line: ts: isn't an ISO-8601 timeid 'other' does not match the file name 'c.json'id does not match the file nameorderExceeds the limit (4300 digits) for integer string conversion: …holds a number too long to read1 line: file: Invalid JSON: EOF while parsing an object at line 1 column 731 line: isn't valid JSONAgainst main's
code_feed.py, the new tests fail: 89 failed, 55 passed intests/test_code_feed.pyandtests/test_code_feed_hub.py, plus all 4 cases of the later UTF-8 test. On this branch all of them pass.Tests
code_feedframes, from a folder holding every failing case. The frames must show no part of a secret and no[REDACTED].[REDACTED].Not changed here (reported separately)
The scrubber's own gap.
scrub_wire_json/redact_secretsdon't recognise a private key written with literal\nand no END line. This PR keeps feed values out of reasons, so the gap no longer reaches them. The scrubber itself is left as it is.Two crashes
read_feedalready had on main, not fixed here:OverflowError;RecursionError.Whether these should become listed problems is an open question.
Full suite
On
55f6ea2f(the branch before its last, test-and-fixture-only commit), on a heavily loaded shared machine (load average 38 to 49): 15 failed, 10,407 passed, 13 skipped, 4 deselected. None of the 15 is in the Code feed.I reran the 15 on their own, three times on this branch and three times with main's
code_feed.pyin its place. That file is the only source file this PR changes besides the fixture generator.test_benchmarks.py::test_no_regression[daemon_cold_start](a timing ceiling)test_ws.py::TestWebSocketServer::test_health_fields_in_daemontest_session_title.py::…::test_title_survives_a_daemon_restarttest_mcp_peer.py::test_a_phone_can_add_one_after_the_computer_grantstest_session_preset.py::…::test_catalog_slug_edit_does_not_rewrite_an_open_sessionThese tests fail under load with and without this change; CI on a clean runner is the reference. After the last commit: the Code feed and protocol-fixture tests passed (277), and so did the UI's code-feed and fixture tests (694 in 27 files).
Checks
release_scan --git: 0 hits.Independent review
Two rounds, each by a fresh reviewer agent with read-only access and no access to my conclusions. I reproduced each finding before fixing it.
Round 1, on the first commit. Fixed:
title;[REDACTED];Round 2, on the fixes. It found no way for a value from the folder to reach a reason, checked on Python 3.11, 3.12 and 3.14, and nothing that worked on main is broken. Fixed: a missing test for a card that isn't UTF-8, and the old-style sample reason in the fixtures.
Noted, unchanged:
🤖 Generated with Claude Code
https://claude.ai/code/session_01SPdoY5jgXgTw6gUHBMBngR