Repository navigation
feat(chat): check the text and links of a page an agent wants to publish - #1968
Merged
gkhngyk merged 2 commits intoNov 2, 2026
Merged
Conversation
AUTONOMOUS-GO-LIVE PR 3 (owner's Q1 answer B): pure checks on the page as it would go out, for a later PR's go-live step. go-live-checks.ts holds a page with text aimed at AI (in its text or its structured data), hidden text, 30 words in a row copied from an untrusted read of the run, or a link to a site that isn't the brand's, a source the draft lists, or a page a read listed (page-sites linksToSites, sitesOfPages). An agent run now keeps its untrusted reads as 64-bit hashes of 12-word runs in its progress, 32 KB at most; past that the check holds the page. A person's own chat keeps none. Nothing calls the checks yet. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… test's model steps out of a hook-named helper Co-Authored-By: Claude Opus 5.5 <[email protected]>
8 of 13 tasks
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.
Summary
AUTONOMOUS-GO-LIVE PR 3: pure checks of the text and links of a page an agent wants to take live on its own (§6.3 Part B, owner's Q1 answer B). The page is checked as it will go out, not by the run-wide taint flag that every content agent carries. Nothing calls the checks yet; PR 5's go-live step will. No migration.
What changes
lib/chat/go-live-checks.ts(pure):outgoingTextCheck(html, kept)returns why the page is held, or null:instructions: text aimed at AI (looksLikeInjection) in the reader's text, the whole HTML including its JSON-LD, or the stripped HTML;hidden_text: anythingstripHiddenremoves (zero-width or tag characters, comments, hidden elements);copied: 30 words in a row that an untrusted read of the run returned. Past the 32 KB cap the check can't tell, so it holds.foreignLink(html, sites): the first link that goes anywhere other than these:page-siteslinksToSites,sitesOfPages);javascript:and other schemes are held.Shingles:
progress.untrustedShingles, each once, up to 32 KB. A person's own chat keeps none.Related issue
None. AUTONOMOUS-GO-LIVE spec, PR 3.
Type of change
feat— New featurefix— Bug fixchore— Maintenance / dependenciesdocs— Documentation onlyrefactor— Code change that neither fixes a bug nor adds a featuretest— Adding or updating testsHow to test
Unit tests:
go-live-checks: words, hashes, 30 vs 29 words, the cap, each hold, allowed and foreign links;page-sites;engine: an agent run keeps its hashes, a person's chat doesn't.No visible change, no Help article, no AI call.
Checklist
yarn lintpassesyarn typecheckpassesyarn format:checkpasseshelp/(or no user-visible change)CI passed on this branch (655c15e), run on the fork (https://github.com/cihan-gyk/ansvisor/actions/runs/41355934650): schema is up to date; web
format:check, lint, typecheck, all tests andyarn buildpass; server lint,format:checkand all tests pass.🤖 Generated with Claude Code