fix(hooks): SuccessClaimGate no longer misclassifies shell/CLI liveness as UI liveness#1416
Open
Luo0oo wants to merge 1 commit into
Open
fix(hooks): SuccessClaimGate no longer misclassifies shell/CLI liveness as UI liveness#1416Luo0oo wants to merge 1 commit into
Luo0oo wants to merge 1 commit into
Conversation
…ss as UI liveness Drop the LIVE_UI_CLAIM branch from isUi (it proves liveness, not UI-ness), and treat markdown code delimiters + quoted WEB-UI vocab as mentions in stripNarration/NARRATION_GUARDS so bug reports and doctrine snippets that quote the trigger vocabulary don't self-trip the gate. Regression preserved: '...admin page is live and locked down' still blocks (admin/page match WEB_UI_NOUN). No new deps, no settings changes.
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.
Problem
hooks/SuccessClaimGate.hook.tsfires itsWEB-UI VERIFICATION GAPblock-back on any Stop-chain response that says a shell hook, CLI tool, or backend subsystemis now live/works end-to-end— even when no browser surface is claimed. The gate correctly closes the incident it was built for (curl-only "admin page is live and locked down"), but the classifier collapses two orthogonal notions (liveness vs. UI-ness) and over-triggers.Reproduction — this trips the gate with no page, no UI, no HTTP surface:
Recursive dimension: a message reporting this bug — where the trigger vocabulary has to be quoted for reference — trips the same gate. The quoted-attribution guard in
stripNarrationcoversCLAIM_PATTERNSvocab (shipped|deployed|landed|…) but notLIVE_UI_CLAIMvocab (is live,locked down,works end-to-end), and code-delimited mentions (backticks — the standard example-quoting convention) aren't stripped at all.Root cause & fix (3 changes, +4/-1)
1.
isUiOR-branch collapse.LIVE_UI_CLAIMproves liveness, not UI-ness, but it was an OR-branch ofisUi, so every liveness claim self-classified as a UI claim regardless of noun:Real UI signal comes from
WEB_UI_NOUN(page/site/admin/dashboard/UI/…) orRENDER_VERB(renders/loads/in the browser/…).LIVE_UI_CLAIMstays inassertsLivewhere it belongs — the gate still requiresassertsLive && isUi, so a genuine UI claim (which always names a UI noun or a render verb) still blocks.2. Mentions vs. assertions. Quoted or code-delimited trigger vocabulary is a mention, not an assertion. Strip markdown code delimiters before pattern-testing, and extend the quoted guard to cover WEB-UI vocab:
function stripNarration(message: string): string { let out = message; + out = out.replace(/```[\s\S]*?```/g, " "); // fenced code block — mention, not assertion + out = out.replace(/`[^`\n]+`/g, " "); // inline code — mention, not assertion for (const guard of NARRATION_GUARDS) out = out.replace(guard, " ");/"[^"]*\b(shipped|deployed|landed|verified|finished|pushed|merged|complete[d]?)\b[^"]*"/gim, // quoted/attributed + /"[^"]*\b((is|it'?s|site'?s|page'?s|now)\s+live|went\s+live|locked\s+down|works\s+(now|in\s+the\s+browser|end[\s-]?to[\s-]?end))\b[^"]*"/gim, // quoted WEB-UI vocab — mention, not assertionThe new guard reuses the exact shape of the existing accepted quoted-attribution guard (
"[^"]*…[^"]*"), so it carries no new backtracking risk.Regression coverage
Memory subsystem now live end-to-end. Both hooks wired via symlink.now live/locked downin backticksThe admin page is live and locked down.admin/pagematchWEB_UI_NOUN)The dashboard renders correctly and is now live.dashboardmatchesWEB_UI_NOUN)No new deps, no settings changes — purely a classifier tightening. The repo ships no hook test harness, so there is no test file to update; the four cases above are the manual verification (also confirmed against a deployed copy on WSL2/Bun).
Reproduced against
v6.0.0; the affected lines are unchanged onmain(v6.0.3).