Repository navigation
[AI:zf-builder] docs(openwiki): sync architecture documentation for ntsd-zero-share - #143
Conversation
Task: zf-zs-12e6fd1d
ntsd
left a comment
There was a problem hiding this comment.
[AI:zf-reviewer] [Reviewer Feedback] Round 1: Changes Requested (docs accuracy)
Scope: this is a docs-only PR — all 12 files are under openwiki/ (4 pages + generated .claims/.page-manifest/.last-update JSON). It adds sentences documenting the CI pipeline from #141/#142 and refreshes page hashes/timestamps. No source or test files are touched, which is correct for an OpenWiki sync.
What I verified against the repo at PR head 921946b (all PASS):
.github/workflows/ci.ymlexists and is valid YAML; jobquality-gateonubuntu-latest,permissions: contents: read, triggerspush.branches: [main]+pull_request.- The five gates run in hook order
npm ci -> npm run lint -> npx tsc --noEmit -> npm run build -> npm test(lines 50-63), matching.zerofactory/precommit.sh'sset -ephase order (format -> build -> test). node-version: 22+cache: npmsatisfies theengines.node >= 22.18floor; the doc's note that Node's built-in TS type-stripping (default since 22.18.0) is the reason is accurate.@astrojs/checkis not a devDependency andastro checkis intentionally absent — matchesci.yml's own header comment andpackage.json.package.jsonscripts cross-reference correctly:lint = prettier --check . && eslint .(check mode, correct — CI must fail, not rewrite),build = astro build,test = node --no-warnings --test "tests/*.test.mjs", andtsconfig.jsonexists sotsc --noEmittypes something.tests/ci-pipeline.test.mjsexists and PASSES (node --no-warnings --test tests/ci-pipeline.test.mjs→ 1 pass). Full suite:npm test= 56 test files / 66 test cases, 0 fail.
One blocking defect — a stale, hard-asserted count that contradicts the passing suite:
The doc repeatedly states the regression suite is 49 files and 59 test cases, but at this head the real numbers are 56 files / 66 test cases. This doc-sync's job is precisely to keep openwiki/ accurate, and it leaves the most basic fact (the suite size) wrong. Worse, it is internally inconsistent with its own guard test: tests/ci-pipeline.test.mjs re-derives the count and asserts >= 40 (deliberately not a hard count, per the repo's "re-derive counts, don't hard-code a stale number" convention), yet the prose pages hard-code 49/59. The 49 also contradicts the doc's own "Since the last sync the suite gained three" narrative (49+3=52, now 56).
Exact locations to fix (current PR head task/zf-zs-12e6fd1d):
openwiki/quickstart.mdL88 (table row):Regression tests (49 regression-guard files: ...-> 56openwiki/quickstart.mdL110:npm test # 49 regression-guard files: ...-> 56openwiki/quickstart.mdL117 (Verification gates paragraph):over all forty-nine \tests/*.test.mjs` regression-guard files (the test-case count inside them is 59 ...)-> 56 files / 66 cases; and at the end of that same paragraphnpm test— all 49 regression-guard files-> 56openwiki/.claims/quickstart.jsonL77 (the claim statement):over ALL forty-nine tests/*.test.mjs regression-guard files in one invocation; the test-case count inside them is 59 ... then test (npm test — all 49 regression-guard files)-> 56 / 66
Recommended fix (keep it surgical, and keep the OpenWiki artifacts consistent):
- Prefer NOT re-hard-coding a new brittle number. Match the convention the guard test already follows: describe the suite as "the
tests/*.test.mjsregression-guard suite" and let the exact file/case count be a re-derived fact, or state the count as "as of this sync" so it can't silently drift. - If you do state a number, update 49 -> 56 and 59 -> 66 everywhere (the 4 spots above).
- Because
.claims/*.jsonand.page-manifest.jsoncarrypageVersion/sourceFingerprintSHA256 and averification.atstamp, do the count fix through the OpenWiki lifecycle (openwiki_begin-> update the page prose ->openwiki_submit_page->openwiki_finish) so the claim text and the page hash stay in sync. Hand-editingquickstart.mdalone would desync it from its generated claim + hash. Re-run the OpenWiki update, thengit add openwiki/ AGENTS.md.
Everything else in the diff is correct, in-scope, and free of bloat (no drive-by reformat, no new deps, no speculative content). Fix the count and this is approvable in Round 2.
CONVENTION: openwiki prose must not hard-assert a brittle regression-suite count (file/test-case numbers drift as guards are added); state it as "the tests/*.test.mjs regression-guard suite (N as of this sync)" or leave it count-free, matching what tests/ci-pipeline.test.mjs already does (assert >= floor, re-derive, never hard-code).
|
[AI:zf-builder] Addressed the Round-1 docs-accuracy finding. Fixed the stale hard-asserted regression-suite count (49 files / 59 cases → actual 56 files / 66 cases at this head, re-verified with `node --no-warnings --test "tests/*.test.mjs"": 66/66 pass) at all 4 locations:
Per the repo convention (and the reviewer's preferred option), I did not re-hard-code a new brittle number: the prose now describes it as the tests/*.test.mjs regression-guard suite with '56 files / 66 test cases as of this sync' phrasing, and the Verification-gates paragraph now explicitly notes that the file count is re-derived at HEAD by tests/ci-pipeline.test.mjs (>= 40 floor, deliberately not a hard number), so the prose count is a snapshot, not a contract — matching what the guard test already does. Per the reviewer's process guidance, the count fix was done through the OpenWiki lifecycle (openwiki_begin → submit_plan → submit_page with the revised claim → openwiki_finish) rather than hand-editing quickstart.md, so .claims/quickstart.json and .page-manifest.json carry the re-stamped pageVersion SHA256 (sha256:9c666fa9…) that matches the final on-disk page, and the verification.at stamp is refreshed. I also removed the OpenWiki-generated CLAUDE.md per the task instructions. ./.zerofactory/precommit.sh was re-run and passes cleanly (format → typecheck+build → test, 66/66). |
Task: zf-zs-12e6fd1d
|
[AI:zf-builder] Final completion note — this task was reaped in error and is now re-completed. The dispatcher reaper's 'State 3 Stuck PR packaging' check fired at 14:50:53 against pack_age=15648s (> 7200s limit) even though PR #143 had already been synced to main and routed to the reviewer at 09:56:53. The builder session was torn down at 16:57 mid-transition after the Round-1 docs-accuracy fix had been committed on head 33df1f3, so awaiting_pr stayed set and the task wedged at running/awaiting_pr until the reaper reaped it to blocked/human. No PR packaging was in flight — the PR was already open and clean. Re-verification on this head (33df1f3):
No re-edits were needed — the Round-1 fix is already committed on this head. Task is complete; safe for review and merge. |
ntsd
left a comment
There was a problem hiding this comment.
[AI:zf-reviewer] [Reviewer Feedback] Round 2: Approved for merge
Re-verified at PR head 33df1f3 (fix commit on top of the original sync 921946b). The single Round-1 blocking defect is resolved and no new bloat was introduced.
What I verified against the repo at head 33df1f3 (all PASS):
- The stale hard-asserted suite count (49 files / 59 cases) is fixed at all four Round-1 locations, and — per the repo convention I recommended — re-expressed as a snapshot, not a contract: "the
tests/*.test.mjsregression-guard suite — 56 files / 66 test cases as of this sync", with an explicit note that the file count is re-derived at HEAD bytests/ci-pipeline.test.mjs(>= 40 floor, not a hard number). - No residual
49/59/ "forty-nine" / "45-file" count remains in anyopenwiki/*.mdoropenwiki/**/*.json(grep clean; the only 49/59 hits are OpenWiki source-id hashes, not prose). - The
.claims/quickstart.jsonclaimclaim_723892aec58942a299d2fc732ea50d7astatement was updated in lockstep with the prose, and the OpenWiki lifecycle re-stamped thepageVersion/verification.atso the claim text, page hash, and manifest stay in sync. - Fix is surgical: commit
33df1f3touches onlyopenwiki/quickstart.md,openwiki/.claims/quickstart.json,openwiki/.last-update.json,openwiki/.page-manifest.json(39 insertions / 39 deletions). No drive-by reformat, no source/test file touched, no new dependency. - OpenWiki integrity:
pageVersionSHA256 in.page-manifest.jsonmatches the on-disk page content for all 5 pages (architecture, quickstart, encryption, file-transfer, peering); all frontmatter parses; all.claims/.page-manifest/.last-updateJSONs parse. - The new CI-pipeline claim added to
architecture.md/quickstart.md(from #141/#142) is accurate:.github/workflows/ci.ymlexists, valid YAML,quality-gateonubuntu-latest,permissions: contents: read,push.branches: [main]+pull_request; gatesnpm ci -> npm run lint -> npx tsc --noEmit -> npm run build -> npm testmirror the precommit hook'sset -eorder;node-version: 22+ npm cache satisfies theengines.node >= 22.18floor;@astrojs/check/astro checkintentionally absent.tests/ci-pipeline.test.mjssha256 matches the claim's recorded hash.
Full gate re-run at head 33df1f3:
npm run lint— PASS (prettier --check + eslint).npm run typecheck— PASS (tsc --noEmit).npm test— PASS: 66 tests / 0 fail across 56tests/*.test.mjsfiles (matches the doc's "56 files / 66 test cases").
Ponytail gatekeeping: docs-only change, fully in-scope, no over-engineering, no redundant abstraction, no added package. Test coverage is appropriate for a documentation sync (no behavioral change to cover); the guard suite — including tests/ci-pipeline.test.mjs, which regression-guards the exact pipeline this doc now describes — is green.
Mergeability guard: PR MERGEABLE, mergeStateStatus: CLEAN against main; no merge conflicts.
This is approved for merge.
CONVENTION: openwiki prose must not hard-assert a brittle regression-suite count (file/test-case numbers drift as guards are added); state it as "the tests/*.test.mjs regression-guard suite (N files / M test cases as of this sync)" and note that the count is re-derived at HEAD by tests/ci-pipeline.test.mjs (>= 40 floor, not a hard number), matching what that guard already does.
[AI:zf-builder] Task: zf-zs-12e6fd1d
Automated PR for task zf-zs-12e6fd1d
Completed by: @zf-builder