Skip to content

Seeds: atomic canonical claims for the #1137 corpora, lint before any registration - #70

Open
Tailor-AUS wants to merge 1 commit into
rehome-reviewfrom
agent/open-graph-claims
Open

Tailor-AUS wants to merge 1 commit into
rehome-reviewfrom
agent/open-graph-claims

Conversation

@Tailor-AUS

@Tailor-AUS Tailor-AUS commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

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.au after #68 deployed. All 30 topic creations were rejected with canonicalClaim 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-025 is not present in this database at all (404 before and after).

What this does

  • Rewrites each of the 30 canonicalClaims to one atomic proposition ≤ 140 chars (longest 135). The longer text remains in content. 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.py gains lint_atomic_claim / lint_corpus, a Python mirror of 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.

Evidence

  • Lint: 0 failures across 12 + 10 + 8 claims; the old wording and a 141-char string both fail the mirror.
  • SEED_DRY_RUN=1 after the rewrite: 30 to create, 0 present; 25 edges pending those topics.
  • python -m py_compile clean 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 canonicalClaim validation (≤140 chars, single sentence, no bundled propositions/hedges). All 30 canonicalClaim strings in seed_critical_minerals.py, seed_defence_au.py, and seed_defence_us.py are shortened to one atomic proposition; fuller detail stays in content. A few claims drop dotted rule numbers from the claim text because the server treats . as sentence boundaries.

_defence_seed_helpers.py adds a Python mirror of src/lib/claim.ts (lint_atomic_claim / lint_corpus) and runs it at the start of seed_topic_batch before 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.

…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>
@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

Bugbot couldn't run - usage limit reached

Bugbot 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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants