Skip to content

HANDOFF-025: Decision-First renumber (P12→P9 etc.) + validator false-positive fixes#1

Merged
anrasi merged 2 commits into
mainfrom
feat/h025-decision-first-reconciliation
Jun 18, 2026
Merged

HANDOFF-025: Decision-First renumber (P12→P9 etc.) + validator false-positive fixes#1
anrasi merged 2 commits into
mainfrom
feat/h025-decision-first-reconciliation

Conversation

@anrasi

@anrasi anrasi commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

Mirrors the Decision-First reconciliation onto the toolkit. Merge and go-public remain founder (P3) gates.

What changed

  • SB-6 — deterministic renumber. 24 P-refs permuted old→new via the same sentinel engine (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 here.
  • SB-7 — validator fixes (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)

  • Engine invariants: histogram == permutation(old); capa 0; frozen p#- unchanged; full-set unchanged. name↔number spot-checked (P9 Shared-Resource Pre-flight).
  • Self-test green: principle-count-coherence, band-unit; and green driving the spec branch.

🤖 Generated with Claude Code

anrasi and others added 2 commits June 18, 2026 20:07
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 anrasi merged commit 20d993d into main Jun 18, 2026
1 check passed
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>
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.

1 participant