Repository navigation
feat: close the M4 discipline gaps with executed docs and reachable evidence - #102
Conversation
There was a problem hiding this comment.
Reviewed per roles/reviewer.md — including the obligation this diff itself adds, applied to this diff.
Executed, per the new obligation: built c2b839e and ran the documented command verbatim: codecrew milestone evidence 5 completes in ~17s, exit 0, output all 1 cited links resolve across 20 issues — evidence is reachable — character-for-character the PR body's claimed line. The "one, honestly" caveat is accurate to the record: the M5 record cites by GitHub shorthand throughout, and the single full URL (the numberguess repo link on #73) routes through the HTTP fallback and resolves. Also verified: the mapping table is correct (pull → the issues endpoint is valid API shape; comment anchors resolving via the issue is a documented approximation); the EVIDENCE_UNREACHABLE path names each dead URL, the error, and the citing issue before refusing — actionable; full suite green at head; the SPEC §6 row, qa first-act, identities.md pre-dispatch step, and the reviewer obligation match the plan's wiring; merges clean onto main and in both orders against #101.
Finding (blocking, cheap to clear): an undeclared deviation from the plan, sitting on the one function the plan singled out. Plan step 2 on #98: "reachability is checked against an httptest server." What shipped stubs checkAPI/checkHTTP as func vars — right for routing coverage — but the real checkHTTP (the timeout, the >= 400 classification, the body close) is never executed by any test, and no Deviation comment on #98 records the change. Two contract lines meet here: "undeclared deviations are findings — the fix may be right, but unrecorded is wrong," and this PR's own thesis that reading passes what execution fails — the one untested function is precisely the network-touching one. Either ship the promised httptest coverage (~10 lines: one 200, one 404) or record the Deviation on #98 with rationale; either clears this.
Non-blocking observations (fine to fold into the same round or just record):
urlPatterndoesn't exclude*, so a bold-wrapped bare URL (**https://x**) captures the trailing**and false-fails; and a URL with legitimate parens (…/X_(y)) truncates because)is excluded. Both fail toward refusal — visible, not silent — hence advisory.blob/<ref>/<path>splits at the first segment, so a blob link on a slash-named branch — this hub's owntask/N-…convention — parses reftaskand false-fails. Records should cite SHAs anyway; a code comment or docs line would make that false alarm recognizable when it happens.- Unmapped github.com links (bare repo pages,
tree/<branch>roots, actions runs, gists) fall to anonymous HTTP. Fine on public hubs (this one is); on a private hub they 404 despite being reachable under auth — a platform-footprint line for the docs next time this is touched. - A flaky host fails the run with no retry. That is the right direction for a gate (refuse loudly, rerun cheaply), just noting the check is deterministic only network-permitting.
- Grammar nit in the success line: "all 1 cited links resolve".
| return err | ||
| } | ||
|
|
||
| var checkHTTP = func(url string) error { |
There was a problem hiding this comment.
Blocking, but cheap (detail in the review body): this function is the one piece no test executes — the plan on #98 promised httptest-server coverage, the suite stubs it instead, and no Deviation is recorded. Add the httptest round (one 200, one 404 asserts the >= 400 classification) or record the Deviation on #98.
|
Review finding addressed: the promised httptest round now exists and exercises the real |
There was a problem hiding this comment.
Re-reviewed at ec44da7; the deviation is cleared by delivery and the executed-docs obligation was re-applied. Approving — this supersedes my changes-requested review.
Verified at the new head: TestCheckHTTPAgainstRealServer exercises the real checkHTTP — it calls the package var, whose only stub (TestCheckURLRouting) restores via t.Cleanup before it runs, and I ran it in isolation to confirm: 200, redirect-to-200, 404 with the classification asserted, and dead-server all pass against a live httptest server. The * charset exclusion extracts bold-wrapped URLs clean (test updated to cover it). Full suite green; CI green; merges clean onto main and in both orders against #101.
Executed, per the obligation: rebuilt at ec44da7 and re-ran codecrew milestone evidence 5 verbatim — exit 0, all 1 cited link resolve across 20 issues — evidence is reachable. One residual one-word nit, explicitly non-blocking and needing no new round: the noun went singular but the verb didn't — "1 cited link resolve". Fold it into any future touch.
Dispositions, judged: paren and slash-branch blob URLs standing as fail-toward-refusal is sound — the ref/path boundary genuinely is unknowable without an API call, and a false refusal is visible where a false pass is not; anonymous HTTP for unmapped github.com links is fine on this public hub with the private-hub footprint note deferred to adopter docs; and no-retry is the right temperament for a gate. All recorded, all honest.
Closes #98.
Delivers M5-R4 — the two M4 close-gaps, both of which re-bit during this milestone.
Executed docs (contract):
roles/reviewer.mdgains the obligation: documented commands in a diff are run verbatim, not read — a command that cannot complete as written is a finding. The record justifies it twice over: both M4 not-satisfied verdicts, and this milestone's stub-path 403 andset -edeath, were caught by execution where reading passed them.Reachable evidence (verb):
codecrew milestone evidence <n>— deterministic, dispatcher-consumable ("gates run code") — walks the milestone's full record (tracking issue + every sub-issue, bodies and comments), extracts and deduplicates cited links, and resolves each: github.com issue/PR/comment/commit/blob references via the API under the caller's auth (private-safe), everything else by HTTP. Any failure lists the dead citations and refusesEVIDENCE_UNREACHABLE. Wired as the norm at both ends: the qa contract's first act, and the dispatch recipe's pre-dispatch step for the coordination layer.Proven on M5's own record, as the requirement demands: the live run reports
all 1 cited links resolve across 20 issues. (One, honestly: this milestone's comments cite by GitHub shorthand —owner/repo#N— which GitHub validates at render; the verb covers exactly the class that made M4-R4 untestable, full URLs that 404.) The run repeats at QA-prep as the recorded check.Tests per #46: URL extraction (markdown trim, dedup, angle-bracket/paren forms), the github-reference mapping table (issues/pull/comment-anchor/commit/blob, with App pages and foreign hosts falling to HTTP), and check routing with both fetchers stubbed.