Skip to content

Add: specs for the two test targets, taking src/ to 100% spec coverage - #22

Merged
0xLeif merged 1 commit into
mainfrom
spec/promise-and-cli
Sep 19, 2026
Merged

0xLeif merged 1 commit into
mainfrom
spec/promise-and-cli

Conversation

@0xLeif

@0xLeif 0xLeif commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

Summary

fledge atlas reported 64% and four orphans. Two of those were a bug in atlas, not a gap here — CorvidLabs/fledge-plugin-atlas#19 fixes them. This PR closes the one real gap and the scope difference.

  • The real gap: src/promise.rs, 386 LOC — exactly the 8696 - 8310 specsync coverage was short. specs/promise/ covers it and tests/promise.rs together, since they are two halves of one property: the serial half can ask Workspace::load which section a criterion came back in and cannot fork; the concurrent half can fork and can only see bytes. The spec records why the postcondition compares (id, section, text, note) rather than ids — DECISIONS.md §35, where every id was still readable and a retired criterion had come back to life carrying somebody else's reason — and why none of the six generated_body fixtures is a file hi would have written (§26).
  • tests/cli.rs, 1,819 lines, the largest file in the repository and the only place argv routing, exit codes and the stdout/stderr split are tested at all. specs/cli/ records the three Repo constructors and why the choice between them is load-bearing (Repo::new pre-creates hi/, so it cannot reach the bootstrap lock path at all), the register of five reproduced id defects in an_id_is_never_handed_out_twice, and the strength ladder for "a refusal writes nothing" — file snapshot, then absence of INTENT.md/AGENTS.md/.hi.lock, then a byte-level listing of the whole tree.

Both carry the four companions and cite the hi criteria they serve. tasks.md and testing.md name what is genuinely not covered rather than claiming it is: no shrinking on a property failure, no coverage of hi issue --create, no single-process bootstrap capture, no CRLF capture through the binary, and the fixture rule that nothing automated enforces.

CLAUDE.md's architecture table was missing src/lock.rs and src/promise.rs — both added, with a note on the two test specs.

I did not add tests to source_dirs. I tried it: spec-sync ignores test paths for coverage regardless, so the line would have been a misleading no-op.

No source change. Nothing in src/ or tests/ is touched.

Test Plan

  • fledge lanes run verify — all 8 steps (fmt, lint, test, view-behaves, intent, index, spec, nudge-behaves, plugin-validate)
  • specsync check --force — 10 specs checked, 10 passed, 0 warnings, 0 failed
  • File coverage 15/15 (100%), LOC coverage 8696/8696 (100%), up from 14/15 and 8310/8696
  • cargo test — 67 tests in tests/cli.rs, 5 in the promise targets, all green
  • With the atlas fix applied: 100% of hi's code is covered by a spec. Every source file is under a spec. — 0 orphans, 0 phantoms, empty action plan, and the phantom workspace "spec-sync reports drift" review flag gone

🤖 Generated with Claude Code

`specsync coverage` reported one uncovered file, `src/promise.rs` at 386 LOC,
which is exactly the 8696 - 8310 the LOC number was short. `fledge atlas`
reported `tests/cli.rs` and `tests/promise.rs` alongside it. All three make
claims nothing else in the repository makes, so all three get a spec rather
than an exclusion.

specs/promise/ covers src/promise.rs and tests/promise.rs: the property tests
of the one promise (hi: ID-5, ID-5.a, FILE-22.c). It records why the
postcondition compares (id, section, text, note) and not ids, which is
DECISIONS.md section 35 and cost a release; why the two halves are two, since
the serial half can ask Workspace::load about a section and cannot fork while
the concurrent half can fork and can only see bytes; and why none of the six
generated_body fixtures is a file hi would have written, which is section 26.

specs/cli/ covers tests/cli.rs, at 1,819 lines the largest file here and the
only place argv routing, exit codes and the stdout/stderr split are tested at
all. It records the three Repo constructors and why the choice between them is
load-bearing, the register of five reproduced id defects in
an_id_is_never_handed_out_twice, and the strength ladder for "a refusal writes
nothing": file snapshot, then absence of INTENT.md / AGENTS.md / .hi.lock, then
a byte-level listing of the whole tree.

Both carry the four companions and cite the hi criteria they serve. Their
tasks.md and testing.md name what is genuinely not covered rather than claiming
it is: no shrinking on a property failure, no coverage of `hi issue --create`,
no single-process bootstrap capture, and the fixture rule that nothing
automated enforces.

CLAUDE.md's architecture table was missing src/lock.rs and src/promise.rs;
both added, with a note on the two test specs.

No source change. `fledge lanes run verify` passes all 8 steps, `specsync
check` reports 10 specs, 15/15 files and 8696/8696 lines.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@0xLeif
0xLeif merged commit 3d037e0 into main Sep 19, 2026
9 checks passed
@0xLeif
0xLeif deleted the spec/promise-and-cli branch September 19, 2026 17:29
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