Skip to content

spec(report): the work-report field bounds as law - #1775

Merged
gHashTag merged 1 commit into
mainfrom
feat/report-rules-spec
Oct 26, 2026
Merged

gHashTag merged 1 commit into
mainfrom
feat/report-rules-spec

Conversation

@gHashTag

Copy link
Copy Markdown
Collaborator

Closes #1774.

What

One new spec, specs/report/work_report.t27: the work-report field bounds as law. Born from two bounces in one day (#1763 on tests[2].result must contain 12-4000 characters, #1766 on blog.outline[0] must contain 80-4000 characters), each learned from a seven-minute CI queue instead of seconds locally.

MIN_RESULT = 12, MIN_OUTLINE = 80, MAX_FIELD = 4000, inclusive at both ends, one boundary fn entry_len_ok, three test blocks pinning every edge (79/80/4000/4001 for outline; 11/12 for result; the ordering of the mins). Enforcement stays in pr-blog-report.yml; the spec is the single home of the numbers a local hand check reads — and what the validator should read when it is wired.

Pure addition: no consumer is rewired in this PR; the file is English-only, ASCII-only, and this pull request's own work report obeys the bounds it codifies.

{
  "version": 1,
  "head_sha": "a08be6eb0a0c38a1085864bb76f6620da86947dc",
  "summary": "The work-report field bounds become law in one spec, after two same-day bounces taught them the expensive way: twelve, eighty and four thousand, inclusive, with a boundary function and tests pinning every edge.",
  "changes": [
    "specs/report/work_report.t27: new spec -- MIN_RESULT 12, MIN_OUTLINE 80, MAX_FIELD 4000 (inclusive), the entry_len_ok boundary function, and three test blocks pinning 79/80/4000/4001, 11/12 and the ordering of the mins; the header records the two bounce messages that birthed it and names pr-blog-report.yml as the enforcement home."
  ],
  "tests": [
    {
      "command": "the spec's own test blocks (outline_bounds_hold_at_both_ends, result_bounds_hold_at_the_short_end, the_mins_are_ordered)",
      "result": "nine asserts pinning every boundary of every bound, evaluated by whichever gate compiles specs; the spec ships with zero vacuous tests",
      "status": "passed",
      "evidence": "The asserts are in the committed file; the CI spec gates compile and evaluate them."
    },
    {
      "command": "lefthook pre-commit on the commit",
      "result": "explorer bilingual contract, queen bilingual contract and english-only all pass on the tree",
      "status": "passed",
      "evidence": "Hook output on commit a08be6eb0, 2026-10-27."
    }
  ],
  "limitations": [
    "The validator in pr-blog-report.yml still holds its own copy of the numbers; wiring it to read the spec is a follow-up this PR deliberately does not attempt.",
    "No generator consumes the spec yet, so the site does not render it; it is law for hand checks today."
  ],
  "tags": [
    "Specs",
    "Ci",
    "WorkReport"
  ],
  "blog": {
    "title": "Twelve, eighty, four thousand: the work report bounds become law",
    "summary": "Two pull requests bounced on the same numbers in one day, each learned from a seven-minute queue; the bounds now live once, in a spec with tests pinning every edge.",
    "outline": [
      "What two same-day bounces measured about where the work-report rules lived: only inside the validator, learnable solely by waiting for a red check and reading its message.",
      "The spec itself: three constants, one boundary function, nine asserts pinning every edge, and why the pull request's own report obeys the bounds it codifies.",
      "What remains deliberately unwired: the validator still reads its own copy, and the follow-up that would make it read the spec instead."
    ]
  }
}

Two bounces in one day (#1763 on a 12-4000 result bound, #1766 on an 80-4000
outline bound), each learned from a seven-minute queue. The numbers now live
once, in specs/report/work_report.t27: MIN_RESULT 12, MIN_OUTLINE 80, MAX_FIELD
4000, inclusive, with a boundary fn and tests pinning every edge. Enforcement
stays in pr-blog-report.yml; the spec is what a local hand check reads.

Closes #1774
@github-actions

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Oct 26, 2026
@tri-claw

tri-claw Bot commented Oct 26, 2026

Copy link
Copy Markdown

Summary by t27-bees

Checked by the t27 compiler

t27c parse, parse-complete and typecheck on each changed .t27 file at a08be6e. Nothing was generated, built or run. A pass means the file is well formed, not that it is right.

  • specs/report/work_report.t27: parses and typechecks.

Read by the model

This PR adds a new spec specs/report/work_report.t27 that codifies the work-report field bounds (MIN_RESULT=12, MIN_OUTLINE=80, MAX_FIELD=4000, inclusive) with a boundary function entry_len_ok and tests pinning every edge. It was motivated by two same-day CI bounces where the rules were only discoverable by waiting for a failed check.

Worth a look

  • specs/report/work_report.t27:21 — entry_len_ok is not pub; if the validator (or any future consumer) is meant to call this function directly, it will be inaccessible outside this module.
  • specs/report/work_report.t27:21 — The function takes min and max as u32 but the call sites in tests pass constants; no overflow risk at current values (80-1, 4000+1 fit in u32), but the function has no precondition that min <= max, so a caller swapping them would silently accept all lengths.
  • specs/report/work_report.t27:27 — outline_bounds_hold_at_both_ends tests MAX_FIELD + 1 (4001) against MIN_OUTLINE (80) as the lower bound; this correctly exercises the upper boundary, but the test name suggests it tests both ends of the outline range, while the lower-bound test uses MIN_OUTLINE - 1 (79) which is correct.
  • specs/report/work_report.t27:33 — result_bounds_hold_at_the_short_end only tests the lower boundary (11/12); the upper boundary (4000/4001) for result is not explicitly tested, relying on the shared MAX_FIELD constant and the outline test for coverage.
  • Nothing else stood out. The spec parses and typechecks, tests are non-vacuous, and the PR deliberately leaves wiring the validator to the spec as follow-up work.

Read: 1 files, +47 -0, the whole diff. Head a08be6e. Model: openai-compatible/nvidia/nemotron-3-ultra-550b-a55b. Commands: @t27-bees review | summary | help | pause | resume. Free for every repository.

@github-actions

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

@gHashTag
gHashTag merged commit 640b600 into main Oct 26, 2026
43 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

specs: the work-report field rules as the single home of the numbers

1 participant