Skip to content

test(reflect): assert real output in the reflect control; reword the hint tail - #173

Merged
arcaven merged 2 commits into
mainfrom
build/general/kos-171-lows
Nov 3, 2026
Merged

arcaven merged 2 commits into
mainfrom
build/general/kos-171-lows

Conversation

@arcaven

@arcaven arcaven commented Nov 3, 2026

Copy link
Copy Markdown
Member

Three small review lows from #171 and #172 are open, and one of them leaves a test that would pass if kos reflect printed nothing. This closes them so the refusal tests assert what they claim.

Red. Tests at 9de4039, src unchanged: the reflect tests pass (the control was already true, now with real assertions), and the unreadable-manifest tests fail 7 of 8 on the old hint wording (the control passes). The fix commit 3fdf29e turns them green.

ax test and ax lint pass at the head; hooks pass on both commits. Wording only in process.rs; no other behavior changes. Refs: #171, #172

The healthy-repo control only checked that two refusal strings were absent, so
a reflect that printed nothing would pass. It now asserts a zero exit and the
report header and range line. The hint assertion in the unreadable-manifest
test also expects the tail "while it is unreadable"; that fails until the next
commit.

Refs: #171, #172
The hint tail read "until it parses", which suggests the file is the only
thing that has to change. "while it is unreadable" states the condition the
refusal holds for.

Refs: #172

@arcavenai arcavenai left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

APPROVE at 3fdf29e. The three lows from #171 and #172 are closed as the body says. The new hint wording is asserted.

Not reproduced here: I did not reproduce the build, the red-green run or any mutant on this seat, because serde-saphyr 2.0.0 is missing from the offline crate cache it builds from. The checks below are from CI at this head and tracing the source. CI at this head: Test, Clippy, Rustfmt, Cargo Deny, CodeQL, duplicate-finding-ids, Harden-Runner and dependency-review succeed.

The reflect control (tests/reflect_refusals.rs:87-97) now fails if reflect errors or prints nothing. It still cannot tell ok/ from the parent graph, for three reasons:

  • render_markdown prints the header and Range: for any graph root (src/reflect.rs:954-956).
  • Reflection carries no graph id or path (:25-40).
  • In a temp dir with no git history, every git-derived section is empty either way.

So a reflect that resolved the parent would still pass. That is not a blocker, because reflect now uses the shared resolver: a_healthy_repo_still_creates_in_its_own_graph (tests/unreadable_manifest_creating.rs:181-192) already shows that resolver returning ok/_kos from ok/. To show it from reflect itself, ok/ could be a git repo with one commit adding a node under ok/_kos/nodes/. The test could then assert that node's id under "Confidence changes", which the parent graph would not list.

The red is consistent but only stated (low). At 9de4039 the source still says "until it parses". So the new assertion (tests/unreadable_manifest_creating.rs:62) fails in all seven refusal tests, and the control, which does not call refused, passes: 7 of 8. The reflect tests pass there too, as the body says, because reflect in a directory with no git history still prints both lines. 9de4039 has no CI run, so the failing output is not on record.

The hint reads right in the creating commands (low for reflect). The message (src/process.rs:42) now reads "...; while it is unreadable, this command would write into a parent graph and attribute the result to this repo". "While it is unreadable" also fits the cannot-be-read case. kos reflect reaches the same hint through the shared resolver since #171, though, and it writes nothing. "This command would use a parent graph" would be true for every caller.

Public text:

  • Both commits are signed and verified on GitHub, each with one parent (90eaca6, then 9de4039).
  • No em dash, banned word, AI attribution, private name, host name or non-ASCII byte in either message, the body or the added lines.
  • The body leads with why.
  • It corrects #171's "fail on main" in the body, without rewriting history.

Run conditions: everything above came from source reading, and git and gh reads. I ran no kos and no cargo command against this head.

Seat: reviewer / reviewer-claude-g17-1

@arcaven
arcaven merged commit e4ffc90 into main Nov 3, 2026
15 checks passed
@arcaven
arcaven deleted the build/general/kos-171-lows branch November 3, 2026 01:22
arcaven added a commit that referenced this pull request Nov 3, 2026
#174)

The control passed for any reflect that exits 0 and prints the header, so a
reflect that resolved to the parent graph would pass it. ok/ is now a git
repo with a committed node, and the control asserts that node appears and the
parent graph's node does not. Against a reflect that reads the parent graph
the old control still passes and the new one fails.

Refs: #173
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