HANDOFF-025: Decision-First renumber (P12→P9 etc.) + validator false-positive fixes#1
Merged
Merged
Conversation
HANDOFF-025. Same deterministic engine as the spec pass: 24 P-refs across 11 files permuted old->new (notably P12->P9 Shared-Resource Pre-flight ×20 in the cost-ledger + CI guardrails; P5->P6, P7->P8, P1->P4). No capa slugs, no principles.md, no legal files in this repo. Invariants PASS: histogram == permuted(old); capa residue 0; frozen p#- slugs unchanged; full-set unchanged. name<->number spot-checked (P9 Shared-Resource Pre-flight). No bucket-2/3 residue (no "Layers (IP boundary)", no §, no capa). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…count + anti-pattern guard)
HANDOFF-025 verification surfaced two pre-existing validator false positives,
now that the spec carries Why->How->What band ranges:
- principle-count-coherence read band sub-ranges (P1-P3, P4-P10) as total-count
claims. Anchored the range alternative on the full set (P1-P12) so only
genuine count claims ("N canonical principles" / "P1-P12") are checked.
- band-unit flagged the cost-ledger's own anti-pattern bullet ("Token-band
measured as total-with-cache — ... canonical unit is billed-equivalent").
Added a corrective-context guard so documenting the anti-pattern is not a
violation.
Both checks now PASS against the spec worktree and the toolkit self-test.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
anrasi
added a commit
that referenced
this pull request
Jun 22, 2026
Addresses the 2026-06-19 external review. Each fix ships with regression tests (33 total; green with PyYAML and with the stdlib fallback CI uses). validators.py: - #2 Windows/Linux path portability: OS-agnostic part checks (_norm_parts) for frozen-dir skip, the .git skip, and .github/workflows detection (was '/'-only substring matching → broke on Windows os.walk '\\'). - #3 topic-tags semantics: unconfigured --topic-taxonomy now SKIPPED (green), configured-but-missing is a clear hard error (was a confusing "skipped" that failed the build). - #4 frontmatter parser: uses PyYAML automatically when installed (robust: block scalars, nested, comments); documented stdlib subset + inline-comment handling as fallback. No dependency required. - #5 llm-ci-cost: strips YAML comments before the endpoint heuristic (no more false-positive on comments/docs); structural concurrency + on.pull_request checks via PyYAML when available (handles the on:->True YAML quirk); custom endpoint/proxy limitation documented. calibrate.py: - #6 propose_bands ignored its percentile inputs and returned fixed bands → split into canonical_bands() (fixed reference) + observed_bands(p) (genuinely data-driven from p25/p50/p75/p90); output now prints both, honestly labeled. - #7 percentiles used exclusive method (extrapolated past observed max on small samples) → inclusive + clamp to [min,max] + n==1 handling + small-sample (<8) advisory warning. #1 (counter-atomicity date-slug false-positive) was already fixed in v0.1.0 (toolkit#4) — the review ran the pre-fix 2026-06-19 snapshot. CI self-run upgraded to --checks all (topic-tags SKIPs cleanly now). New tests/test_calibrate.py adds the first calibration tests. Per DR-2026-06-19 (gates + tests for every fix). SL-010. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
anrasi
added a commit
that referenced
this pull request
Jul 2, 2026
frontmatter-schema (check #1) now requires 'approver' on DecisionRecords with status: ratified created on/after 2026-07-03 — the enforcement companion declared in the spec v1.1.0 Ratification note (DR-2026-07-02-author-approver-separation). Legacy DECs are exempt (back-filled fix-on-touch per P12, never bulk-required). str() keeps the date comparison correct in both PyYAML and stdlib parser modes. +3 tests (57 total; green with and without optional deps). Verified against the spec and founder-brain corpora: green. Signed-off-by: Andrés Ramírez Sierra <mail@andres.co> Co-authored-by: Claude Fable 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.
Mirrors the Decision-First reconciliation onto the toolkit. Merge and go-public remain founder (P3) gates.
What changed
templates/consistency-validators/validators.py), surfaced by HANDOFF-025 verification (pre-existing false positives now that the spec carries band ranges):principle-count-coherence: anchored the range alternative on the full set (P1-P12) so band sub-ranges (P1-P3, P4-P10) are not misread as total-count claims.band-unit: added a corrective-context guard so the cost-ledger's own anti-pattern bullet ("Token-band measured as total-with-cache — … canonical unit is billed-equivalent") is not flagged as a violation.Verification (all PASS)
p#-unchanged; full-set unchanged. name↔number spot-checked (P9 Shared-Resource Pre-flight).principle-count-coherence,band-unit; and green driving the spec branch.🤖 Generated with Claude Code