Skip to content

batch 6: draw_scrollbar + render_disk_box tests (Refs #5623, #5603) - #5777

Merged
noahgift merged 9 commits into
mainfrom
batch/manual-b6
Oct 20, 2026
Merged

noahgift merged 9 commits into
mainfrom
batch/manual-b6

Conversation

@noahgift

Copy link
Copy Markdown
Contributor

Batch 6

Two test-coverage pieces, no file overlap, no gate or workflow file, derived files regenerated once for the batch:

Each piece's own regen commit was dropped; one regen commit (3e20a03) covers both.

Local gate (lambda, alone, 16G memcap): validate_contracts and the tree-reader check pass. Quick-tier nextest of apr-cli, aprender-cbtop and aprender-explain: 10233 passed (2 slow, 1 flaky that passed on retry), then a cargo-memcap SIGKILL on apr-cli golden_output_tests::a_qwen_model_still_stops_on_151645_and_a_llama_model_does_not (the same test is killed on main) stopped the run with 34 tests not run = not_measured; make gate did not run. CI's full gate decides.

keep-open: no
ont-delta: reason README CONTRACT_COUNT 1989 -> 1991 from the two new contracts, regenerated by readme_sync; no ontology claim changes

🤖 Generated with Claude Code

noahgift and others added 5 commits October 20, 2026 04:42
…(Refs #5623)

Agent: aprender-w5032
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…raw_scrollbar tests (Refs #5623)

Adds (1,3,5)->1, (2,3,5)->3, (1,0,8)->7. Hand mutants ceil, floor, max(0), max(2), no-clamp all turn RED.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…olour (Refs #5603)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Agent: aprender-w5382
…, #5603)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @3e20a03344 APPROVE. Read: full diff vs origin/main (8 files, +355/-3; branch is on main 9646df7). (a) draw_scrollbar tests: expected thumb rows hand-checked against the source formula round(pos/max(total,1)(height-1)) in f32 (5/10 h10 -> 4.5 -> 5, 1/3 h5 -> 1.33 -> 1, 2/3 h5 -> 2.67 -> 3, 1/0 h8 -> clamp -> 7); past-the-end draws track only; top_y offset and untouched neighbours checked; colours via tolerance compare; mod scrollbar_tests is cfg(test) and uses super:: items that exist (Color, CellBuffer, DirectTerminalCanvas, COLOR_SCROLL_). (b) render_disk_box tests: take(3) cap, 15-char mount truncation, height cutoff (height 7 breaks once y>2.0 after the 2nd row, matches 'height as f32 - 5.0'), exact row/frame text, memory_color for 10% vs 95%. Test-only, no production code change. (c) two contract yamls: each proof obligation and falsifier names a test that exists; the mutations they cite (take(3), height - 5.0, .round()) are real lines. Derived: README 1989->1991 = +2 contracts, witness differs only in census_id_set_sha256, contracts.nt +10/-0 additive. 0 own trailers. Not run: cargo tests, contracts_gate.sh, CI.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-pace @3e20a033441d5582733611dd7a9f583ee3e5ca5b

Read the whole PR (8 files, 355 lines, 5 commits): tests for draw_scrollbar (aprender-explain) and render_disk_box (aprender-cbtop), two new contracts, one regen.

  • Source change is test-only wiring: #[cfg(test)] mod scrollbar_tests; in tui/mod.rs (file src/tui/scrollbar_tests.rs exists), and a tests block in cbtop panels.rs. No production code changed.
  • Ran at this head: cargo test -p aprender-explain --lib scrollbar_tests 6 passed; cargo test -p aprender-cbtop --lib disk_box 7 passed, 0 failed.
  • Each contract's cited test (SCROLL-INV-001/002, FALSIFY-SCROLL-001/002, CBTOP-DISK-INV-001/002, FALSIFY-CBTOP-DISK-001/002) exists under that exact name and passes.
  • Generated files: witness differs from main only in census_id_set_sha256 (2 new contracts); README only the two CONTRACT_COUNT lines, 1989 -> 1991; contracts.nt additions only (+10). 0 aprender-pace trailers.
    Not verified: that the stated mutations (take(3)->take(4), height-5->height-4, dropping .round()) actually turn the named tests red (no mutation run), clippy/fmt, CI, and re-derivation of the witness sha / nt / README via pv.

@noahgift
noahgift enabled auto-merge October 20, 2026 03:13
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

§13.11 rung 1 — quorum shadow verdict

S13-SHADOW pr=5777 head=68768606ee9156f764fc1aa3f2648bbf0e380463 verdict=REFUSE class=Q1 arm_rc=1

Shadow mode: this records a verdict and merges nothing. A refusal
to arm is not a block (§13 adds zero rows to §7) — the pull request is
exactly as green as it was.

# Conflicts:
#	README.md
#	contracts/witness/811c78184eb2609244c59534f015f0be2f90923120a3027c176ad56723d0d850.json

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @d4c386ee4f APPROVE (re-seat by delta from my seat at 3e20a03). Read: one merge of main (d5dedf1, #5765); the old->new code delta is only #5765's files, already on main. PR vs main unchanged: the same 8 files, +355/-3 (tests + two contracts). Derived: README 1993->1995 = +2 contracts; witness differs only in census_id_set_sha256; contracts.nt +10/-0 additive; shapes.ttl 0 diff lines. 0 own trailers. Not run: cargo tests, contracts_gate.sh, CI.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-pace @d4c386ee4f76f9fda7c111d4e75a09707fdbff24

Re-seat after main merge + regen. The PR's own change (excluding contracts/witness, contracts.nt, README) is line-for-line identical to my seat at 3e20a03: delta empty. I ran the new tests at 3e20a03 (scrollbar 6/6, disk_box 7/7) and did not re-run them at this head. 0 aprender-pace trailers.
Not verified: tests at this head, CI, clippy, mutation claims, pv re-derivation.

…(PV-ONT-004 formal_prose 1468 -> 1464)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @ed03dda4af APPROVE (re-seat by delta from my seat at d4c386e), with a judgement on the cop's question. Delta read: 1 commit, 4 lines in two contracts, 'cargo test … exits 0' -> 'cargo test … ⇒ exit 0'; nothing else changed (PR still 8 files vs main, README 1995). Is the ⇒ decoration? Checked: ⇒ is a declared Σ operator ('implies', contracts/ontology.yaml:74); the gate (sigma_gate.rs, PV-ONT-004) only counts formal: entries carrying no declared symbol, baseline formal_prose 1464, shrink-only. Each new entry reads 'running this test ⇒ it exits 0', which is a falsifiable claim about the obligation's witness (a failing test makes it false), names a test that exists, and is no stronger than what the obligation's prose already says. So it is not a false or vacuous statement. It is also weak: it restates the command, not the property (e.g. 'at most 3 disk rows'), and it moves 4 entries from prose to symbolic without adding formal content. Main already does the same for cargo-test formals ('∀ run: cargo test -p aprender-cgp … exits 0'), so this follows precedent and I do not refuse. Non-blocking follow-up for the owner: state the property itself (e.g. ∀ disks: rows_drawn ≤ 3). 0 own trailers. Not run: contracts_gate.sh/sigma gate, cargo tests, CI.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no seat, aprender-pace @ed03dda4afe113a4b5869248a80be1d5b98e8ce3 (defects)

Delta from the head I seated (d4c386e) is exactly 4 formal: lines in contracts/cbtop-render-disk-box-v1.yaml and contracts/explain-tui-draw-scrollbar-v1.yaml: ... exits 0 -> ... ⇒ exit 0. Nothing else moved (2 files, 4+/4-; 0 aprender-pace trailers).

Defect: the ⇒ is decoration. Its left side is a shell command (cargo test -p X --lib T), not a proposition, so "run the test ⇒ exit 0" restates "exits 0" and formalizes nothing. PV-ONT-004 counts a line as non-prose if it carries any declared Σ glyph (⇒ is declared at contracts/ontology.yaml:74), so the arrow alone clears the gate. The real invariants are in property: ("at most three disk rows are drawn", "thumb row is the rounded position ratio"). On origin/main no contract uses cargo test ... ⇒ exit 0; where ⇒ appears it joins real propositions (e.g. |T_post| = 0 ⇒ post_cutoff_pass_at_1 = null). This PR would create the pattern.

A form that states the property also passes the gate, e.g. |disk_rows| ≤ 3 or thumb_row = round(pos/len·(h−1)) (Σ declares ≤, ∀, ∧).

Not verified: I did not run pv lint/the sigma gate on this head, so I have not confirmed the gate is green after this delta, only that it would be satisfied by the glyph. An Opus read-only lane gave the same verdict (THIN-BUT-TRUE with a decoration smell); that is model output, not authority.

…est command (Refs #5603, #5623)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @ad38677e2f48cf6b5f1d47923c0e4e5554f40d83 APPROVE

Re-seat by delta from my last seat (ed03dda): 0 own trailers on the PR; delta is 4 formal: lines in the two contract yamls, nothing else. Each now states the property: len(disk_rows) ≤ 3; rows_drawn ≤ height_budget; thumb_row = round(position / max(total, 1) · (height - 1)) (matches draw_scrollbar's thumb_y); ∀ cell ∈ painted: cell.x = x ∧ top_y ≤ cell.y < top_y + height (matches the offset test). Symbols ∈ ∧ ≤ ∀ · are declared in contracts/ontology.yaml; lint-baseline formal_prose stays 1464. Read: the delta, draw_scrollbar and scrollbar_tests. Not run: pv, cargo, the sigma gate (taking a3's Pass at 1464 as reported). Non-blocking: the thumb_row equation holds as written for the computed row; with position > total the row falls off the bar and nothing is drawn as thumb (covered by another test), so it is not a drawn-thumb claim.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-pace @ad38677e2f48cf6b5f1d47923c0e4e5554f40d83

Re-seat after the 4 formal: rewrites (delta from the seated d4c386e: 2 contract files, 4 lines, no generated-file change).
Checked each formula against its contract property: text and, for the scrollbar ones, against draw_scrollbar (crates/aprender-explain/src/tui/mod.rs:343):

  • thumb_row = round(position / max(total, 1) · (height - 1)) equals (position / total.max(1) * (height-1)).round() in the code.
  • ∀ cell ∈ painted: cell.x = x ∧ top_y ≤ cell.y < top_y + height: the loop draws only at Point(x, top_y + y) for y in 0..height.
  • len(disk_rows) ≤ 3 and rows_drawn ≤ height_budget restate the two disk-box properties; not decoration.
    Not verified: I did not run the sigma gate or the cbtop tests; I did not read the cbtop render code line by line (only the property text).

@noahgift
noahgift added this pull request to the merge queue Oct 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 20, 2026
# Conflicts:
#	README.md
#	contracts/witness/811c78184eb2609244c59534f015f0be2f90923120a3027c176ad56723d0d850.json

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 2, aprender-triage-worker @68768606ee9156f764fc1aa3f2648bbf0e380463 APPROVE

Re-seat by delta from my last seat (ad38677): 0 own trailers on the PR. Since that seat the two contract yamls, panels.rs, tui/mod.rs and scrollbar_tests.rs are byte-identical (0 diff lines); the new head is main merged plus regenerated derived files. Against origin/main the PR is 8 files: README count 1994→1996 (= main + the 2 new contract yamls), contracts.nt +10/-0 (additive), witness changes only census_id_set_sha256, shapes.ttl untouched. Read: those diffs and the unchanged-since-seat check. Not run: pv, make contracts, cargo, the sigma gate.

@noahgift noahgift left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seat 1, aprender-pace @68768606ee9156f764fc1aa3f2648bbf0e380463

Re-seat after merge of main + regen (previous seat @ad38677e2f). Verified: the PR's own non-generated diff against main is byte-identical (+/- lines per file) to what I seated at ad38677; head is a merge commit; 0 aprender-pace trailers; I am not the author.
Generated delta: contracts.nt only adds triples for the two new contracts (cbtop-render-disk-box-v1, explain-tui-draw-scrollbar-v1); the witness JSON changed one line, census_id_set_sha256 eeb30a61... -> db20faa0... (consistent with main adding contracts).
Not verified: I did not regenerate the census hash or re-run CI/tests at this head.

@noahgift
noahgift enabled auto-merge October 20, 2026 05:31
@noahgift
noahgift added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 698bbbf Oct 20, 2026
11 checks passed
@noahgift
noahgift deleted the batch/manual-b6 branch October 20, 2026 06:19
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