Seeds: atomic canonical claims for the #1137 corpora, lint before any registration - #70
Open
Tailor-AUS wants to merge 1 commit into
Open
Tailor-AUS wants to merge 1 commit into
Tailor-AUS wants to merge 1 commit into
Conversation
…de lint before any registration (refs TailorAU/tailor-group#7) The first live apply of the three corpora (2026-09-18, Knox's go) lost all 30 topics to the #3691 W2 rule — canonicalClaim ≤ 140 chars, one sentence, no bundled clauses — which the corpora predate. Thirty agents had already been registered by then; the GET-only dry-run could not see the rule. Every canonicalClaim is rewritten to one atomic proposition ≤ 140 chars (longest 135). Evicted detail stays in `content`. Two claims drop their dotted rule numbers from the claim text (ASX LR 3.1, DFARS 252.225-7052) because the server's sentence splitter treats the dot as a terminator; the titles keep the numbers. _defence_seed_helpers gains a Python mirror of src/lib/claim.ts lintAtomicClaim (length, single sentence, top-level and/or joining two verb-bearing clauses, hedges). seed_topic_batch lints the whole corpus first, in dry-run and in apply, and exits 2 before registering anyone. Dry-run after the rewrite: 30 to create, 0 present, 25 edges pending. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_dca0339e-a76a-4f85-936f-297f60e563a0) |
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.
Refs TailorAU/tailor-group#7 (step 2, data half — the fix the first apply needed). Base
rehome-review.What happened
Under Knox's go, the three topic corpora were applied against
pact.tailor.auafter #68 deployed. All 30 topic creations were rejected withcanonicalClaim must be at most 140 characters (got 155…277)— the #3691 W2 atomic-claim rule (src/lib/claim.ts), which these corpora predate. The GET-only dry-run could not see a POST-side validation, and 30 seed agents (plus 1 for the edge seed) had already been registered when the rule fired. Topics 12 → 12, edges 0 → 0, agents 1 → 32. The 11 legislation documents were byte-identical before and after (sections + SHA-256 of each record);qld/act-2016-025is not present in this database at all (404 before and after).What this does
canonicalClaims to one atomic proposition ≤ 140 chars (longest 135). The longer text remains incontent. Two claims drop their dotted rule numbers from the claim text — ASX LR 3.1 and DFARS 252.225-7052 — because the server splits sentences on.; the titles still carry the numbers. Please eyeball the 30 rewrites in the diff before the re-run._defence_seed_helpers.pygainslint_atomic_claim/lint_corpus, a Python mirror oflintAtomicClaim(length, single sentence, top-leveland/orjoining two verb-bearing clauses, hedges).seed_topic_batchlints the whole corpus first — in dry-run and in apply — and exits 2 before registering anyone.Evidence
SEED_DRY_RUN=1after the rewrite: 30 to create, 0 present; 25 edges pending those topics.python -m py_compileclean on the four files.Re-run note
The registration flood backstop is 60/hour per address; this seat spent 32 of those at ~05:05–05:15 UTC. The re-apply needs 31 more, so it runs after ~06:15 UTC or from a different egress.
🤖 Generated with Claude Code
Note
Low Risk
Changes are limited to offline seed scripts and static corpus text; no production API or auth paths are modified.
Overview
Fixes defence/critical-minerals seed corpora so topic creation passes PACT’s atomic
canonicalClaimvalidation (≤140 chars, single sentence, no bundled propositions/hedges). All 30canonicalClaimstrings inseed_critical_minerals.py,seed_defence_au.py, andseed_defence_us.pyare shortened to one atomic proposition; fuller detail stays incontent. A few claims drop dotted rule numbers from the claim text because the server treats.as sentence boundaries._defence_seed_helpers.pyadds a Python mirror ofsrc/lib/claim.ts(lint_atomic_claim/lint_corpus) and runs it at the start ofseed_topic_batchbefore agent registration or API writes. Failures print per-topic errors and exit 2, so dry-run and apply both catch POST-side 422s that GET-only planning missed.Reviewed by Cursor Bugbot for commit e4ca1e6. Bugbot is set up for automated code reviews on this repo. Configure here.