Repository navigation
#877 phase 3a: bulk-accept org kinds; accepted_source; v0.83.1 - #905
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…an accept's source; v0.83.1 - classification_suggestions.accepted_source (rules / jev), required on every accept and on no other row; backfilled from record_decision's note - TRUSTED_JEV_KINDS keyed by model (the gold set's approved trust set) - bulk_outcome / plan_bulk_accept / apply_bulk_accept; record_decision's untouched_only refuses an org an operator has acted on, under its row lock - scripts/accept_classification_suggestions.py: dry run by default; skim list; --execute refuses while Jev's backlog is nonzero unless --allow-unanswered - design D7 amended; runbook and SCHEMA.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A drain's rules or Jev write landing between the plan and an acceptance could make a disagreement the plan never saw. run_bulk_accept takes DRAIN_LOCK_KEY for both; the script refuses while a drain holds it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
#877 phase 3a: bulk accept for org kinds. Plan:
docs/plans/2026-11-27-877-phase-3-backlog.md(approved 2026-11-27); design D7 is amended in this PR.What it adds
classification_suggestions.accepted_source(rules/jev): required on everyacceptrow and on no other. The Kind panel's provenance reads it instead of the note. A backfill fills existing accept rows fromrecord_decision's note before the CHECK goes on; production has one such row, and it matches.TRUSTED_JEV_KINDS, keyed by model:jev-1.14.0→ association, business, government, legislature (the approved trust set). A model not listed is trusted for nothing.bulk_outcome/plan_bulk_accept/run_bulk_accept:disagree,conflict,low,untrusted,noneorunanswered.It plans and accepts under the drain lock. Every acceptance goes through
record_decision, whose newuntouched_onlycheck (under the org's row lock) leaves alone any org an operator has acted on.scripts/accept_classification_suggestions.py --field org_kind --operator EMAIL:legislature, with gold labels; names in the terminal only).--execute: refuses while Jev's backlog is nonzero (unless--allow-unanswered) or while a drain holds the lock.v0.83.1 (schema change); runbook,
SCHEMA.mdand design D7 updated.Review
CR with
--fix: six findings, one commit each:QUEUE_REASONScomes from the type;--fieldreaches the run;uv.lockentry) was already in the feature commit.Tests were written first, and each failed before its code existed: 11 for
accepted_source, then collection errors for the bulk-accept core and the script, and 2 for the drain lock.Verification
apply-schema --testrun twice, clean.After deploy (operator-gated)
Once Jev's backlog reads 0: a dry run, with aggregates posted on #877; then
--executeon the operator's word.🤖 Generated with Claude Code