Repository navigation
feat: list published pages a run never reached in the functional report - #92
Merged
Merged
Conversation
|
🔱 Poseidon started reviewing this PR — central run. |
There was a problem hiding this comment.
🔱 Poseidon Review
Summary — The functional merge now re-reads the site's published pages after a wall-held run and records them as published, the renderer shows them under Methodology, and the validator refuses published/linkChecks[] without a capture hash. Risk is low: the fetch reuses the vetted published() path, it's skipped for wall-refused runs, and the tests cover both branches.
Walkthrough
- ✨ New —
publishedadded to the functional schema, merge (scripts/page-capture.js),RUN_FIELDSrestore and the HTML report's "Published pages not reached" block - 🐛 Fix —
mergeis now async, and the CLI catches a rejection and sets exit code 1, sorun-qa-report.shstill stops on a failed merge - 🧪 Tests —
tests/no-network.jspreload keeps wrapper tests offline; a stub-site test covers the real fetch; validator, renderer and correction tests extended - 📝 Docs — AGENTS.md describes the merge's
publishedand the new validator refusal
💡 Nitpicks (1)
- scripts/validate-report.js:L88 — The new
linkChecks?.length && !captureSha256refusal also applies to archives made before this PR: the old merge wrotelinkChecks[]even when no capture existed. Re-rendering or correcting such an archive now fails, which goes against the "an archive from before the wall still re-renders" rule elsewhere. If that's intended, add a sentence to AGENTS.md; if not, apply the check only topublished, or only on a fresh merge.
🤖 Prompt for AI agents — fix all findings
Verify each finding against the current code and only fix it if
needed.
Nitpicks:
In `scripts/validate-report.js`:
- Line 88: The new branch `type === 'functional' &&
!report.provenance?.captureSha256 && (report.published ||
report.linkChecks?.length)` in `checkReport` refuses any functional
report with non-empty `linkChecks[]` and no capture hash. Before
this PR, `merge` in scripts/page-capture.js set `report.linkChecks`
whether or not a capture existed. So an archived functional report
from a run with no capture now fails validation when it is
re-rendered with generate-report.js or corrected through
run-qa-report.sh. That breaks the stated rule that old archives
still re-render. Decide whether this is intended. If it is, say so
in the AGENTS.md paragraph on the validator. If it isn't, narrow
the `linkChecks` half of the condition so old archives keep
rendering, e.g. check only `report.published`, or refuse
`linkChecks[]` in the merge itself. Keep the `published` refusal
and the existing `rows?.length` branch above it unchanged.
ℹ️ Review info
- Commit: 8f7aa98
- Files reviewed: AGENTS.md, schemas/qa-report-functional-schema.json, scripts/generate-report.js, scripts/page-capture.js, scripts/validate-report.js, tests/generate-report.test.js, tests/no-network.js, tests/page-capture.test.js, tests/run-qa-report.test.js, tests/validate-report.test.js
- Files skipped: none
- Model: claude-opus-5-5
# Conflicts: # AGENTS.md
There was a problem hiding this comment.
🔱 Poseidon Review
No new issues found on this pass. The only change since the last review is the merge of trunk (#91, the capture guard's shell pre-filter), and the PR's own changes are the same as before.
♻️ Previously flagged
Still outstanding
⚠️ scripts/validate-report.js:L88 —report.linkChecks?.length && !captureSha256still refuses functional archives from before this PR that have link checks but no capture, which conflicts with the rule that old archives still re-render. AGENTS.md now says a fresh run like this is refused, but it says nothing about existing archives.
ℹ️ Review info
- Commit: 7a8b6e2
- Files reviewed: AGENTS.md, schemas/qa-report-functional-schema.json, scripts/generate-report.js, scripts/page-capture.js, scripts/validate-report.js, tests/generate-report.test.js, tests/no-network.js, tests/page-capture.test.js, tests/run-qa-report.test.js, tests/validate-report.test.js
- Files skipped: none
- Model: claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
scripts/page-capture.jspublishedagain after a run held to the site and writes it into the report ({ source, total, notReached }or{ error }); a run refused for its wall never asks the sitepublishedthe model wrote; a correction restores it from the archived copy (RUN_FIELDS) instead of refetchingPublished pages not reached: N of M, or why they couldn't be read--unhandled-rejections=warnwould let it exit 0scripts/generate-report.jsadds "Published pages not reached" under Methodology: the list, a "loaded each one" line (saying "each of the 100 kosh read" when the REST list was capped) or the errorscripts/validate-report.jsrefuses a functional report holdingpublishedor a non-emptylinkChecks[]with nocaptureSha256schemas/qa-report-functional-schema.jsonadds optionalpublished, with a non-emptyerrortests/no-network.jsreplacesfetchin the scriptstests/run-qa-report.test.jsspawns, so its merges never ask a real site; a stub-site test covers the real fetchAGENTS.mdcovers the abovewhy
inventoryalready shows the model the site's published pages nothing links to, but the report didn't. on a second test site, one run saw 13 unreached pages, opened 1 more and left 12. itstestMethodologydidn't mention them. those pages held stale event sign-ups and a garbled fees section that another run reported as highs. with this change, the report lists them whatever the model does with the inventory.the validator guard closes the other side: a report that skipped the merge could carry a hand-written list rendered as "read by kosh".
notes
totalis counted before the off-host filter. both only matter on unusual sites, so they're deferredco-authored by claude opus 5.5 🧭