Repository navigation
test(console): pin the long-name check against general backtracking and the unknown-outcome paths - #2945
Conversation
…nd the unknown-outcome paths The overlap invariant only compared alternatives with each other, so a branch inside one alternative, a multi-character alternative, or an alternative added at the join brought the finding-1999 freeze back on plain names (finding 2031). Add timing rows for plain and mixed names, require each alternative to consume one character, and check the compiled rule joins exactly those alternatives (UNBROKEN_RUN is now exported for that). Also assert that an unknown channel Secrets outcome names itself in the deploy status (finding 2032) and locks the Secret pickers (finding 2033).
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. What this changesThis PR strengthens long-name regex guards and checks uncertainty messaging and disabled Secret pickers after a lost save response. Example: A Slack credential save commits, but its response is lost.
Review scores
ProductKind: Test only · Worth it: Yes · Fix scope: Complete Merge readiness✅ Ready for maintainer review Keep open: this collaborator-authored PR adds useful regression coverage, with no introduced correctness or security defect found. Priority: P3 Before mergeNone. FindingsNone. Agent review detailsHow this fits togetherThe console checks Agent names before rendering wrapping styles and uses credential-save state to control deployment guidance and Secret editing. flowchart TB
A[Agent names] --> B[Long-name regex]
B --> C[Wrapping marker]
D[Credential save] --> E[Lost response]
E --> F[Unknown outcome state]
F --> G[Deployment guidance and picker locks]
Technical reviewBest possible solution: Land the focused regression guards while preserving existing long-name matching and uncertain-save behavior. Do we have a high-confidence way to reproduce the issue? This is a coverage improvement rather than a current runtime repair; the contributor reports mutation failures and repeated passing runs, which were assessed against source but not rerun during this read-only review. Is this the best way to solve the issue? The added assertions cover distinct gaps in existing tests, and the deliberate structural checks support the established non-overlap invariant. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against def181770d66. Provenance checked
TestingProof path: in-process harness. SecurityNone. EvidenceWhat I checked:
Likely related people:
Review metrics
LabelsLabel changes: No label changes. Label justifications:
Rating scale6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior. WorkflowClawSweeper edits this one comment on every review. Comment HistoryReview history (1 earlier review cycle)
Reviewed October 19, 2026, 11:43 AM ET / 15:43 UTC (Revision 2). |
The letters-and-digits and hyphen rows could not see their overlap
(ten doubled characters, or one-character runs), so use twenty plain
digits and drop the hyphen row. The one-character check now accepts only
escapes that consume a character (not \b, \B or backreferences), and
property escapes with a value (\p{sc=Han}). Match the Secret picker
labels exactly.
|
@clawsweeper re-review |
|
🦞👀 Re-review progress:
|
Problem
bughunt-129 audited #2943 and found three gaps in its tests:
UNBROKEN_ALTERNATIVESwith each other, one character at a time. A second branch inside one alternative, an alternative that consumes more than one character, or an alternative added where they are joined (UNBROKEN_CHARACTER,RUN_CHARACTER) escapes it. Mutants that add[a-z]that way pass all 16 tests and bring back the finding-1999 freeze on a plain 210-character lowercase name (about 2 s, vs 0.1 ms on main).Change
Tests only, plus one
export:apps/controller/src/console/agents/list.mjs: export the compiled rule,UNBROKEN_RUN, so the test can check its shape. No behaviour change.tests/conformance/console-agent-name-runs.test.mjs:\b/\Bor backreference);(?:(?:<alternatives joined>)\p{M}*)with{21,}, then the same run{20}plus one break-character class.tests/browser/console-agent-draft-guards.test.mjs(the channel Secrets case of "Agent deployment waits for … writes and their recovery"): after the unknown outcome, the deploy status shows "Credential changes may have been saved. Reload this draft and inspect the saved state before deploying." (2032), and the Slack app and bot token pickers are disabled (2033). Six added lines in the existing case, which already sets up that state.Verification
(?:[^…]|[a-z])|[a-z]appended at the join|[a-z]insideRUN_CHARACTER-[][a-z][a-z]́[a-z]|[a-z][a-z]appended at the join (fast, so no timing row sees it)credentials.mjsdeploy gate skipsoutcomeUnknown(2032)canEnterChannelCredentialsdrops!state.outcomeUnknown(2033)console-agent-name-runs.test.mjs: 20/20 at 2 CPUs (21 tests), before and after the review changes (internal review: two first-round timing rows could not see their overlap, and the escape branch was too permissive; both fixed, mutants rerun).console-agent-draft-guardsandconsole-agents-list-returnfiles are green (44/44).git merge-treeagainst main vs against this head: 33/33, 4/4, 0/0).Risks