Skip to content

[AI:zf-builder] docs(openwiki): sync architecture documentation for ntsd-zero-share - #143

Merged
ntsd merged 2 commits into
mainfrom
task/zf-zs-12e6fd1d
Nov 4, 2026
Merged

ntsd merged 2 commits into
mainfrom
task/zf-zs-12e6fd1d

Conversation

@ntsd

@ntsd ntsd commented Nov 2, 2026

Copy link
Copy Markdown
Owner

[AI:zf-builder] Task: zf-zs-12e6fd1d

Automated PR for task zf-zs-12e6fd1d

Completed by: @zf-builder

@ntsd ntsd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[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.yml exists and is valid YAML; job quality-gate on ubuntu-latest, permissions: contents: read, triggers push.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's set -e phase order (format -> build -> test).
  • node-version: 22 + cache: npm satisfies the engines.node >= 22.18 floor; the doc's note that Node's built-in TS type-stripping (default since 22.18.0) is the reason is accurate.
  • @astrojs/check is not a devDependency and astro check is intentionally absent — matches ci.yml's own header comment and package.json.
  • package.json scripts 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", and tsconfig.json exists so tsc --noEmit types something.
  • tests/ci-pipeline.test.mjs exists 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.md L88 (table row): Regression tests (49 regression-guard files: ... -> 56
  • openwiki/quickstart.md L110: npm test # 49 regression-guard files: ... -> 56
  • openwiki/quickstart.md L117 (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 -> 56
  • openwiki/.claims/quickstart.json L77 (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.mjs regression-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/*.json and .page-manifest.json carry pageVersion/sourceFingerprint SHA256 and a verification.at stamp, 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-editing quickstart.md alone would desync it from its generated claim + hash. Re-run the OpenWiki update, then git 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).

@ntsd

ntsd commented Nov 2, 2026

Copy link
Copy Markdown
Owner Author

[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:

  • openwiki/quickstart.md L88 (table row)
  • openwiki/quickstart.md L110 (npm test comment)
  • openwiki/quickstart.md L117 (Verification gates paragraph — both the opening count and the trailing precommit-hook sentence)
  • openwiki/.claims/quickstart.json (claim claim_723892aec58942a299d2fc732ea50d7a statement)

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).

@ntsd

ntsd commented Nov 3, 2026

Copy link
Copy Markdown
Owner Author

[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):

  • gh pr view 143: state=OPEN, mergeable=MERGEABLE, mergeStateStatus=CLEAN, no open CHANGES_REQUESTED.
  • tests/.test.mjs: 56 files, 66/66 pass (node --no-warnings --test "tests/.test.mjs", 51.7s, 0 fail).
  • openwiki/quickstart.md L88 (table row), L110 (npm test comment), L117 (Verification gates paragraph — both the opening count and the trailing precommit-hook sentence) all read '56 files / 66 test cases as of this sync'.
  • openwiki/.claims/quickstart.json claim_723892aec58942a299d2fc732ea50d7a statement updated to the same phrasing; the pageVersion sha256:9c666fa9… matches the final on-disk quickstart.md.
  • No stale '49 regression-guard files' / '59 test cases' / 'forty-nine' prose remains anywhere under openwiki/ (grep -rn across openwiki/ is clean).

No re-edits were needed — the Round-1 fix is already committed on this head. Task is complete; safe for review and merge.

@ntsd ntsd left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

[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.mjs regression-guard suite — 56 files / 66 test cases as of this sync", with an explicit note that the file count is re-derived at HEAD by tests/ci-pipeline.test.mjs (>= 40 floor, not a hard number).
  • No residual 49 / 59 / "forty-nine" / "45-file" count remains in any openwiki/*.md or openwiki/**/*.json (grep clean; the only 49/59 hits are OpenWiki source-id hashes, not prose).
  • The .claims/quickstart.json claim claim_723892aec58942a299d2fc732ea50d7a statement was updated in lockstep with the prose, and the OpenWiki lifecycle re-stamped the pageVersion/verification.at so the claim text, page hash, and manifest stay in sync.
  • Fix is surgical: commit 33df1f3 touches only openwiki/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: pageVersion SHA256 in .page-manifest.json matches the on-disk page content for all 5 pages (architecture, quickstart, encryption, file-transfer, peering); all frontmatter parses; all .claims/.page-manifest/.last-update JSONs parse.
  • The new CI-pipeline claim added to architecture.md/quickstart.md (from #141/#142) is accurate: .github/workflows/ci.yml exists, valid YAML, quality-gate on ubuntu-latest, permissions: contents: read, push.branches: [main] + pull_request; gates npm ci -> npm run lint -> npx tsc --noEmit -> npm run build -> npm test mirror the precommit hook's set -e order; node-version: 22 + npm cache satisfies the engines.node >= 22.18 floor; @astrojs/check/astro check intentionally absent. tests/ci-pipeline.test.mjs sha256 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 56 tests/*.test.mjs files (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.

@ntsd
ntsd merged commit 4b87bc9 into main Nov 4, 2026
1 check passed
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