Skip to content

feat(method): quality-floors — 4 zero-turn input-dialect floors (wm2 miss → mechanical checks)#144

Open
pilotspacex-byte wants to merge 4 commits into
mainfrom
feat/quality-floors
Open

feat(method): quality-floors — 4 zero-turn input-dialect floors (wm2 miss → mechanical checks)#144
pilotspacex-byte wants to merge 4 commits into
mainfrom
feat/quality-floors

Conversation

@pilotspacex-byte

Copy link
Copy Markdown
Contributor

quality-floors — 4 zero-turn input-dialect floors from the WV1 wm2 miss

Converts the WV1 benchmark's wm2 root cause — the lean arm's own red suite spoke naive timestamps, a friendlier dialect than the spec's own Z-suffixed examples, so an aware/naive datetime crash shipped green at 0.80 fidelity while full-ceremony add-main caught it — into narrow, ~zero-turn mechanical floors. The lean lane keeps its −27–33% cost; the failure class is closed without re-added ceremony.

The 4 floors (3 tasks, each gate PASS)

# Floor Where it fires Commit
1 spec-dialect floor tests→build crossing warns (print-only, exit 0) when a frozen §3 carries an aware-iso-timestamp value no declared §4 test file speaks; add.py check lists gapped active tasks under dialect_gap f9d2303
2 fast-lane Boundary line TASK.fast.md §1 scaffolds a Boundary: line; freeze refuses a placeholder/empty value (boundary_unfilled, both freeze paths, validate-then-write, absent line grandfathered) b2483be
3 §6 dialect check DIALECT bullet inside the full template's ### Deep checks — audit-counted by the existing shallow machinery, zero engine code — plus a condensed fast-template twin bb72452
4 datetime/money/tz ⇒ data GLOSSARY template + project GLOSSARY + sensitivity.md ×3: datetime/money/timezone arithmetic ⇒ declare data (full lane), wm2 evidence cited; prose, no new sensitivity token bb72452

Balance principle (human-agreed): every floor is a mechanical check at a seam that already existed — the only new refusal (floor 2) fires at a gate the fast lane already had.

Engine / pins

  • ENGINE_MD516cd7cca (floor 2 cmd_freeze guard) · ENGINE_PKG_MD5710a009f (floor 1 _DIALECT_CLASSES registry in constants.py)
  • SEAMS scope-token-grammar pin re-aimed x18 → add.py:5337
  • Byte fences held by compression, not rebaseline: TASK.md.tmpl 11391/11400 B; skill reference-pool + whole-tree back under 51885 / 145974 B via ~183 B trimmed from sensitivity.md prose
  • All twins byte-identical incl. the 4th gitignored dogfood tree

Tests

  • New red suites: test_spec_dialect_floor.py (6), test_dialect_vocab_lines.py (6), test_fast_boundary_line.py (9)
  • 7 sibling-pin amendments across 6 suites, every one via an explicit TESTS re-cross (never a quiet edit): 4 Deep-checks fixtures now fill the DIALECT placeholder; test_fast_lane_skips gained a shared _fill_boundary helper; the fast-lane empty-git-diff guard was re-pinned from a task-local check to its durable invariant (skip machinery stays fast-lane-only)
  • Full tooling suite: 3383 passed + 162 subtests, 0 failed · add.py check: 715 passed, 0 failed

Open follow-up (not fixed here)

One [SPEC · open] delta recorded at floor 3's gate: floor 1's _dialect_gaps scans the §3 raw body, which includes the engine's own Freeze mode: …<ISO timestamp> stamp — so this very task's crossing warned aware-iso-timestamp on its own freeze stamp (a self-referential false positive found while dogfooding). Candidate fix: scan only §3 fenced blocks, or strip the Status/Freeze-mode lines. Left as a future task.

Known CI non-blockers (pre-existing, not introduced here)

  • Seam audit contract_report_unrecorded on 3 older risk-proportional tasks — deliberately not fabricated to Reported: yes
  • test_project_scope_lock lock-reclaim TOCTOU flake (py3.10) — known-waived, passes on re-run

…act's own example formats (quality-floors 1/4)

Closes the WV1 wm2 failure CLASS for ~zero turns (benchmark evidence:
an arm's own suite stayed green on naive timestamps while the spec's
examples were Z-suffixed — the aware/naive crash shipped green at 0.80):

- add_engine/constants.py: _DIALECT_CLASSES closed registry (v1: one
  class, aware-iso-timestamp; full-shape regex — bare dates never
  match), named in __all__ like _GATE_MODES.
- add.py: _dialect_gaps PURE helper (frozen section-3 body vs declared
  section-4 test files, fail-open) + a print-only tests->build crossing
  warning naming the class and the re-cross repair (never refuses;
  exit/state byte-identical) + a dialect_gap WARN in check over ACTIVE
  build/verify/done tasks (measure-not-block).
- 6 red-first pins (test_spec_dialect_floor.py, live-CLI board harness);
  three trees byte-identical; ENGINE_MD5 7f96609e / PKG 710a009f;
  SEAMS x17 re-pin. Full tooling suite 3367 green.

Tripwire lesson recorded in-task: a bare directory token in section-4
"Tests live in:" sweeps add.py itself into the tamper snapshot — the
build's own target must never be declared as a test file (honest redo
via TESTS re-cross, attempt 1).

Task: spec-dialect-floor (oneshot lane, AI-plan-verify freeze @v1),
milestone quality-floors.
author: Tin Dang
…lary (quality-floors 3+4)

Task dialect-check-and-data-vocab (quality-floors levers 3+4, gate PASS,
frozen @v1 via ai-plan-verify). Two more zero-turn floors closing the
wm2 input-dialect class from the WV1 benchmark:

- TASK.md.tmpl `### Deep checks` gains the DIALECT line ("tests speak
  the same value formats the spec's examples use") — audit-counted by
  the existing `shallow` machinery, zero engine code; TASK.fast.md.tmpl
  §6 gains the condensed twin ("input dialect held").
- GLOSSARY.md.tmpl `## Sensitivity classes` + this project's
  .add/GLOSSARY.md + sensitivity.md skill guide gain the PROSE rule:
  datetime, money, or timezone arithmetic ⇒ declare `data` (full lane),
  wm2 evidence cited. No new sensitivity token minted —
  _project_sensitivity_domain proven () over a fresh render.
- Byte fences held by compression, not rebaseline: TASK.md.tmpl 11391B
  (≤11400), skill pool/tree back under 51885/145974 via ~183B trimmed
  from sensitivity.md prose.
- 5 sibling pins amended via an explicit TESTS re-cross, as the frozen
  least-sure flag predicted: 4 Deep-checks fixtures now fill the
  DIALECT placeholder (guarantee-lints, advisor-review-step,
  advisor-verdict-audit, verify-record-rollup); fast-lane-skips'
  task-local empty-git-diff guard re-pinned to its durable invariant
  (skip machinery stays fast-lane-only).
- New red suite test_dialect_vocab_lines.py (6 pins). All twins synced
  incl. the 4th gitignored dogfood tree. Full suite 3374 passed.
- §6 OBSERVE: lever-1 false positive found dogfooding — _dialect_gaps
  scans §3 raw body incl. the engine's own freeze timestamp; left as an
  open SPEC delta.

refs: quality-floors milestone (task 2/3) · benchmark/results/2026-07-wv1-rep0.md
author: Tin Dang
… input-format boundary (quality-floors 2)

Task fast-lane-boundary-line (quality-floors lever 2, gate PASS, frozen
@v1 via ai-plan-verify). The last of the 4 zero-turn floors closing the
WV1 wm2 input-dialect class:

- TASK.fast.md.tmpl §1 gains, directly after Accept:, a `Boundary:`
  line — >=1 format-variant per external input shape the tests must
  speak (e.g. aware vs naive timestamp), or an explicit "none — no
  external input".
- cmd_freeze refuses a task whose Boundary value is still the bare
  template placeholder (or empty): `boundary_unfilled`, fired in the
  shared validate block directly after unflagged_freeze — BOTH freeze
  paths (human and --ai-plan-verify), validate-then-write (zero bytes
  land on refusal). A task with NO Boundary: line is grandfathered:
  legacy fast tasks and the full lane gain no new refusal. Placeholder
  rule = empty or bare unfenced `<...>`, backtick-exempt (mirrors
  _section_unfilled).
- New red suite test_fast_boundary_line.py (9 pins, live-CLI board:
  refusal exit codes + byte-identical state on refusal + both paths +
  grandfathering + §3-fence text never triggers).
- 2 test_fast_lane_skips fixtures amended via an explicit TESTS
  re-cross (they freeze fresh-rendered fast tasks, which now scaffold
  the placeholder line): shared _fill_boundary helper.
- ENGINE_MD5 re-aimed 16cd7cca (prior 7f96609e); SEAMS
  scope-token-grammar pin x18 (:5337); add.py + fast template synced
  across all twins incl. the 4th dogfood tree. Full suite 3383 passed.

refs: quality-floors milestone (task 3/3) · benchmark/results/2026-07-wv1-rep0.md
author: Tin Dang
…hipped)

All 4 human-picked input-dialect floors from the WV1 wm2 miss are live
and gated PASS:
  1. spec-dialect floor      (f9d2303) — tests->build dialect_gap warning
  2. fast-lane Boundary line  (b2483be) — freeze refuses boundary_unfilled
  3. §6 dialect check line     (bb72452) — Deep-checks DIALECT bullet
  4. datetime/money/tz => data (bb72452) — sensitivity vocabulary

milestone-done wrote RETRO.md; archive-milestone removed it from active
state (files on disk untouched). Balance principle held: every floor is
a ~zero-turn mechanical check at an existing seam — the lean lane keeps
its cost, the failure class is closed without re-added ceremony.

One SPEC delta left open (task 2 gate record): lever 1's _dialect_gaps
scans the §3 raw body incl. the engine's own freeze timestamp, a
self-referential false positive found dogfooding — candidate future task.

refs: quality-floors milestone
author: Tin Dang
Comment on lines +89 to +90
"Least-sure flag surfaced at freeze: [contract] narrow "
"shape — cost: one re-freeze.",
import unittest
from pathlib import Path

import add
Run: python3 -m unittest test_fast_boundary_line -v
"""
import io
import json
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