Skip to content

merge: integrate verified fixes from #417 through #424 - #425

Merged
StepenkoAnatoli merged 9 commits into
mainfrom
merge/pr-417-424
Oct 16, 2026
Merged

StepenkoAnatoli merged 9 commits into
mainfrom
merge/pr-417-424

Conversation

@StepenkoAnatoli

@StepenkoAnatoli StepenkoAnatoli commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

This integrates the eight reviewed fixes from #417 through #424 in that order. Empty remote inputs, invalid snapshot ages and malformed recipes receive the correct refusals; Git and ledger errors identify their actual cause; finding extraction avoids quadratic recovery; oversized panel requests receive HTTP 413.

what changed

Retained every source fix and all 16 added regressions. Reconciled the shared changelog and architecture documentation and updated the combined inventory to 1,861 tests. All eight original source heads are merge parents, so their original commits remain in history.

why

The source PRs start from the same main commit and independently change shared documentation and test counts. This integration validates their combined result before updating main.

what it touched

23 files: the source CLI/library fixes and tests, CHANGELOG.md, docs/ARCHITECTURE.md, and research-kit/README.md. Captured evidence, ledgers, nested decision projects and the top README preview remain unchanged.

what you verified

  • verified: all eight original heads passed all seven required CI jobs and had no outstanding review comments.
  • verified: the integration audit retained all 16 added regression declarations, checked all 20 changed JavaScript files, confirmed every source architecture addition, checked the 1,861-test inventory, and found no unexpected files or evidence changes.
  • verified: root handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing; existing unstamped-brief warning), doctor READY on the collector with Firecrawl CLI fetch/search.
  • observed: the first normal local commit gate was refused by one live Chromium stalled-resource deadline test outside these eight fixes (1,846 passed, 1 failed, 14 unsupported). A focused browser-transport rerun passed 36/36 in 43.7 seconds, including that case. The partial count is not the combined inventory result because the first gate stopped in the browser group.
  • verified: the normal full local commit hook then completed and created a332996b08159875411b29b53fc9abeafbc25a14, with the audited tree e3dd49ee5d1b6f73bf60b9ef97acbdbf2ec121e4, the base followed by all eight source heads as ordered parents, and a clean checkout. No hook or check was bypassed.
  • verified: GitHub Actions run 38869308447 completed successfully: archive tree, node (24), node (26), platform (ubuntu-latest), platform (ubuntu-26.04), platform (windows-latest), and suite all passed.
  • untested: live collection and vendor egress; no such calls are required by these fixes. Local unsupported capabilities are not claimed as passing.

what you got wrong and fixed

Mistake: the initial documentation combiner handled table rows but omitted CLI prose. Where: the local integration helper before committing. Impact: documentation from three source PRs was absent from the unpublished integration tree; code, tests, source PRs and main were unaffected. Cause: an overly narrow parser. Fix: apply each complete architecture patch in source order and audit every added source line. Verified: all full architecture patches applied cleanly and the strengthened integration audit passed.

Tooling note: the local PowerShell receipt wrapper reported exit 99 after the successful commit because it treated the hook's informational stderr announcement as a terminating native-command error. Git state is authoritative here: the normal hook ran, the merge commit exists with the expected tree and parents, and the checkout is clean. The wrapper issue affected only its sidecar receipt, not the repository or validation.

Merge using a merge commit to preserve the source heads; do not squash or rebase this integration.

Source PR Issue Fix
#417 #287 Reject empty remote collection values
#418 #343 Distinguish invalid snapshot ages from stale evidence
#419 #320 Enforce the positive decompose search limit
#420 #326 Report the cause of auto-collect Git failures
#421 #296 Distinguish unreadable ledgers from missing evidence
#422 #334 Bound excerpt recovery on long paragraphs
#423 #356 Reject recipes without named dimensions
#424 #324 Return HTTP 413 for oversized panel requests

Fixes #287.
Fixes #343.
Fixes #320.
Fixes #326.
Fixes #296.
Fixes #334.
Fixes #356.
Fixes #324.

what changed
Added repository, topic, client-ref, prior and prefer to collect-remote's existing value validation. Added CLI regressions for empty equals/separate spellings and bare optional flags, and kept the architecture map, changelog and test inventory current.

why
Fixes #287. Invalid empty input reached output-directory creation and token lookup instead of being refused by name. This uses the existing value checker and leaves absent-required-flag and run-pickup behavior intact.

what it touched
research-kit/bin/collect-remote.mjs, research-kit/test/cli.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. No new flags, file formats or collection routes.

what you verified
verified: before-fix CLI probes reproduced token lookup for empty repository, topic and prior values. verified: root preflight PASS and handoff OK on the current base. expected: the normal commit gate will run the full offline suite and check the staged architecture map and inventory; final results accompany the PR.

what you got wrong and fixed
nothing to report. The deliberate red regression reproduces the existing issue, rather than an implementation failure.
what changed
Researcher-release validates snapshot-max-age-ms before resolving or reading evidence. The release and snapshot facades classify a non-finite, negative or nonnumeric allowance as INPUT-SNAPSHOT-MAX-AGE / INCOMPLETE. Added CLI and facade regressions and updated the architecture map, changelog and inventory.

why
Fixes #343. NaN or a negative allowance was reported as stale snapshot evidence; a valid package could instead pass if it had no snapshot to judge. Input errors now remain input errors, while a finite non-negative allowance retains real freshness checks.

what it touched
research-kit/bin/researcher-release.mjs, research-kit/lib/release-validator.mjs, research-kit/test/release-validator.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. The error uses the existing input-error reduction, with no new flag, schema or publication behavior.

what you verified
verified: the added regressions were red on the base (14 passed, 2 failed) and the focused release-validator group passed after the fix (16 passed, 0 failed). expected: the strengthened valid-package fixture and full offline suite will run through the normal commit gate; final results accompany the PR.

what you got wrong and fixed
mistake: the initial facade fixture named an artifact in its registry but did not write that record.
where: research-kit/test/release-validator.test.mjs, invalid snapshot-age facade regression.
impact: the initial fixture could not prove that the same package passes with a valid allowance; no shipped validator behavior was affected.
cause: fixture setup wrote the registry and role roster but omitted the artifact file.
fix: wrote the valid envelope and added a baseline PASS assertion before exercising invalid allowances.
verified: the initial focused group passed 16 tests; expected: the normal commit gate covers the strengthened final fixture and full suite.
what changed
Aligned decompose's CLI --limit floor with the library's positive whole-number requirement. Regression coverage refuses zero, negative and nonnumeric limits and accepts limit one with max-scrapes zero. Updated the architecture map, changelog and test inventory.

why
Fixes #320. The CLI claimed a minimum of zero while the library refused zero. The existing library guard remains; max-scrapes still permits zero.

what it touched
research-kit/bin/decompose.mjs, research-kit/test/cli.test.mjs, docs/ARCHITECTURE.md, CHANGELOG.md and research-kit/README.md. No new options or collection behavior.

what you verified
verified: before-fix probes showed the contradictory --limit abc and --limit 0 diagnostics. expected: the ordinary commit gate runs the full offline suite, including CLI and decompose coverage, and verifies the staged map and inventory. Final observed results accompany the PR.

what you got wrong and fixed
mistake: the first test insertion split an existing explanatory comment.
where: research-kit/test/cli.test.mjs, before the new-project regression.
impact: the comment was detached from its original test; no behavior or delivered change was affected.
cause: the patch insertion matched only the first line of the comment.
fix: moved the new limit-boundary test before the complete original comment.
verified: reviewed the final placement and git diff --check passed; the normal gate covers the final test file.
what changed
Added one private Git diagnostic selector and used it for failed Git commands in the auto-collect listener. The selector quotes the first fatal: or error: line, then applies the existing diagnostic bound. Outputs without either marker keep the final-line fallback, and kit child summaries continue to use lastLine.

why
Fixes #326. Multi-line Git failures put their cause before advice; selecting the advice's last line concealed the actionable error. This is a wording bug with one direct remedy under the existing listener contract; no flag, format, provider, or check changes.

what it touched
research-kit/lib/auto-collect.mjs; the listener regression in research-kit/test/auto-reservation.test.mjs; the auto-collect architecture row; CHANGELOG.md; the registered offline test count in research-kit/README.md (1846).

what you verified
verified: the regression failed on unchanged code with 15 passed / 1 failed, quoting "and the repository exists."
verified: node research-kit/bin/selftest.mjs auto-accounting auto-reservation then passed 16 tests, 0 failed, in 26.0s.
verified: root handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and doctor READY on Node 24.20.0, collector role, firecrawl-cli transport. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-326.
verified: git diff --check.
expected: the normal pre-commit gate will run the full staged-tree offline suite and enforce the architecture map and README count before this commit can be recorded; its exit and CI results will accompany the PR.
untested: no live collection or remote synchronization was performed; injected Git failures exercise the listener without network or corpus changes.

what you got wrong and fixed
nothing to report
what changed
readLedger tolerates only an editor's leading byte-order mark outside hashed entries and never rewrites the file. Handoff distinguishes unreadable ledger entries from proven missing files, names their physical lines, and chooses the existing tail-repair or restore-from-git remedy. Secondary chain and unledgered-capture findings cannot establish travel failure or entry loss while parsing is unresolved; independent missing captures still receive the travel remedy. Tail repair recognizes an intact one-entry BOM ledger and preserves its original prefix when dropping a later torn append.

why
Fixes #296, including the torn-tail case in its issue comment. The bytes had arrived but could not be parsed, so collector-push advice sent the same unreadable file again. Entry hashes cover canonical entries, not an editor's leading marker. The existing reader and sanctioned tail repair must agree about that marker to avoid dropping valid evidence. These are corrections to existing reading and remedy behavior; no new check, flag or file format is introduced.

what it touched
research-kit/lib/corpus.mjs, handoff.mjs and provenance.mjs; five regressions across corpus, handoff and provenance tests; those three architecture rows; CHANGELOG.md; the registered offline test count in research-kit/README.md (1850).

what you verified
verified: the initial focused run reproduced all four new reader/remedy regressions (91 passed, 4 failed, 1 unsupported).
verified: after correcting the fixture's verification layer, handoff/provenance/corpus passed 95 tests, 0 failed, with 1 unsupported symlink case (61.2s, LOCAL RESEARCH_KIT_ALLOW_UNSUP=1).
verified: before the tail fix, a disposable one-entry BOM ledger was wrongly dropped from 546 bytes to zero. After the fix, the same probe returns tail-parses and preserves the file byte-for-byte; a later torn append is dropped while preserving the prefix and a valid chain.
verified: final handoff/provenance/corpus group including the tail-repair regression passed 96 tests, 0 failed, with 1 unsupported symlink case in 45.7s (LOCAL RESEARCH_KIT_ALLOW_UNSUP=1).
verified: root handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and git diff --check. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-296.
verified: the shared machine was observed as doctor READY from the issue-326 checkout before implementation, collector role and firecrawl-cli transport on Node 24.20.0.
expected: the normal pre-commit gate will run the full staged-tree offline suite and enforce the architecture map and README count before this commit can be recorded; its exit and CI results will accompany the PR.
untested: local file symlink creation is unavailable under this Windows account; CI must verify that capability. No live collection was performed.

what you got wrong and fixed
mistake: the first BOM acceptance test invoked the commit gate against an unstaged disposable fixture.
where: research-kit/test/handoff.test.mjs, new BOM acceptance assertion.
impact: one false regression failure after the reader fix; no delivered code or real corpus was affected.
cause: selected the commit verification layer instead of the fixture's provenance preflight.
fix: assert runPreflight(dir).pass for the same fixture.
verified: the corrected focused run passed 95 tests, 0 failed, with one unsupported symlink case.

mistake: the first implementation did not align the independent tail parser with the BOM-tolerant reader.
where: research-kit/lib/provenance.mjs, repairLedgerTail.
impact: the existing tail-repair path removed a valid first entry from a disposable 546-byte fixture; found before publication, with no real corpus changes.
cause: the separate bare JSON.parse(tail) check had not been included in the initial reader review.
fix: tolerate the marker only when the tail is the file's first line, leave an intact ledger untouched, and preserve its prefix when dropping a later torn append.
verified: the direct final probe preserves the intact file, removes only the torn append, and verifies the chain; the added regression pins both cases.
what changed
Prose candidates retain their physical paragraph start during the existing scan. Excerpt recovery runs forward from that start and stops once the existing 420-character cap is exceeded, eliminating repeated unshift calls and whole-block excerpt construction. Finding selection, blank/heading boundaries, Markdown filtering, table excerpts and truncation spelling remain the same.

why
Fixes #334. Repeated front insertion made a vendor-controlled unbroken paragraph quadratic. This is an internal performance defect with one direct remedy that preserves the existing output contract; no new command, flag, format, provider or check is introduced.

what it touched
research-kit/lib/finding.mjs; two finding regressions covering an 8 MB paragraph and exact boundary/cap output; the finding architecture row; CHANGELOG.md; the registered offline test count in research-kit/README.md (1847).

what you verified
verified: the unchanged-code baseline remained inside the 8 MB regression beyond its 8-second performance bound and was terminated after 303.7s. No final suite count was produced for that deliberately bounded baseline run.
verified: node research-kit/bin/selftest.mjs finding passed all 32 tests, 0 failed, in 2.5s after the fix, including the same 8 MB input and pinned finding/excerpt.
verified: root handoff OK (33 ledger entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and git diff --check. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-334.
verified: the shared machine was observed as doctor READY from the issue-326 checkout before implementation, collector role and firecrawl-cli transport on Node 24.20.0.
expected: the normal pre-commit gate will run the full staged-tree offline suite and enforce the architecture map and README count before this commit can be recorded; its exit and CI results will accompany the PR.
untested: no live collection or external pages were fetched; all extractor inputs are synthetic strings.

what you got wrong and fixed
nothing to report
what changed
Recipe parsing refuses a blank dimension label with its physical line number. Loading a requested recipe refuses content that provides no dimensions and names the file. Decompose handles INVALID_RECIPE as usage failure (exit 2), before it writes the map.

why
Fixes #356. Existing files were treated as usable recipes even when they contributed no domain checklist, and an empty label became a nameless subtopic. This restores the documented recipe contract with one direct validation remedy; no flag, format, provider or new gate check is introduced.

what it touched
research-kit/lib/decompose.mjs; research-kit/bin/decompose.mjs; two regressions in decompose.test.mjs; the decompose architecture row; CHANGELOG.md; the registered offline test count in research-kit/README.md (1847). Valid shipped recipes and the universal dimensions keep their existing behavior.

what you verified
verified: direct unchanged-code probe accepted a plain document, empty dimensions and a blank label; the CLI returned 0 and wrote a nine-row map for the plain document.
verified: after the fix, all three inputs return INVALID_RECIPE with the file, the blank label names its physical line, and the same CLI probe returns 2 without a stack.
verified: node research-kit/bin/selftest.mjs decompose passed all 39 tests, 0 failed, in 4.6s, including usage exit 2, file/line errors, map/ledger preservation and shipped recipes.
verified: handoff OK (33 entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and git diff --check. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-356.
verified: doctor today from the issue-296 checkout reports READY on the shared machine, collector role, firecrawl-cli fetch/search.
expected: the normal pre-commit gate will run the full staged-tree suite and validate architecture/README before this commit is recorded; exact-head CI will accompany the PR.
untested: no live collection or vendor egress; CLI probes use dry-run and explicit http-keyless transports.

what you got wrong and fixed
nothing to report
what changed
Request-body overflow releases retained chunks and ignores subsequent data/end parsing. The handler sends the existing 413 JSON refusal with Connection: close, so the response flushes before closing the connection rather than destroying the request socket first.

why
Fixes #324. Destroying the request socket inside readBody prevented the handler's intended error response from reaching the client. This corrects response ordering under the existing byte limit; no new route, flag, format or check is introduced.

what it touched
research-kit/lib/panel.mjs; two panel regressions for an oversized POST and the exact byte boundary; the panel architecture row; CHANGELOG.md; the registered offline test count in research-kit/README.md (1847).

what you verified
verified: direct baseline loopback probe produced ECONNRESET for a 16385-byte JSON body, with the next state request returning 200.
verified: the fixed probe receives 413, Connection: close and {"error":"the request is too large"}; the next state request returns 200.
verified: boundary probe admits a complete 16384-byte JSON body to route handling (404 for the unknown test route), returns the intended 413 for 16385 bytes and 3 MB, then answers state with 200.
verified: node research-kit/bin/selftest.mjs panel passed 26 tests, 0 failed, with 2 existing unsupported symlink cases in 5.9s (LOCAL RESEARCH_KIT_ALLOW_UNSUP=1), including both new regressions.
verified: handoff OK (33 entries, 27 evidence rows), preflight PASS (28 passing, 1 existing unstamped-brief warning), and git diff --check. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-issue-324.
verified: doctor today from the issue-296 checkout reports READY on the shared machine, collector role, firecrawl-cli fetch/search.
expected: the normal pre-commit gate will run the full staged-tree suite and validate architecture/README before this commit is recorded; exact-head CI will accompany the PR.
untested: local symlink creation is unavailable for two existing cases; CI must verify that capability. No external service or real operator panel was used; requests go only to disposable loopback servers with scratch machine state.

what you got wrong and fixed
nothing to report
what changed
Combine the source fixes in order #417 through #424, preserving all eight original heads as merge parents. Retain empty remote-input validation, snapshot-age validation, the positive search-limit refusal, Git failure causes, ledger parse remedies, bounded finding excerpts, recipe validation and the panel's HTTP 413 response. Reconcile the shared documentation and the 1,861-test inventory.

why
The user requested merging these eight PRs. They start at the same main commit and independently update shared documentation and test totals. A single reviewed integration checks their combined behavior before main receives them, while preserving the original fix commits and their individual reports. No new interface, feature, collection route or design choice is introduced.

what it touched
23 files: the source CLI/library fixes and regression files, CHANGELOG.md, docs/ARCHITECTURE.md including its CLI prose and library responsibilities, and research-kit/README.md. Existing root/nested evidence, captures, ledgers and the top README preview remain unchanged.

what you verified
verified: all eight unchanged source PR heads have seven successful required GitHub Actions jobs and no outstanding review comments.
verified: node Research-Kit-work-notes/audit-merge-417-424.mjs retained all 16 added test declarations, checked all 20 changed JavaScript files with node --check, confirmed the 1,861-test inventory, checked every source architecture addition, found no unexpected file, and confirmed staged changes only. git diff --cached --check passed. Cwd: C:\Users\PC\Desktop\gittoken\Research-Kit-integration.
verified: handoff OK (33 ledger entries, 27 evidence rows), root preflight PASS (28 passing, one existing unstamped-brief warning), and doctor READY on this collector, Node 24.20.0, Git 2.55.0, Firecrawl CLI 1.25.3 fetch/search. Pre-existing deployment and edit-hook warnings remain recorded by doctor.
observed: the first normal staged-tree commit gate was refused by one live Chromium deadline test outside these eight source changes (1,846 passed, 1 failed, 14 unsupported). The browser-transport focus rerun then passed 36/36 in 43.7 seconds, including the previously failing stalled-resource case; it reported the configured 20-second browser deadline and a 25.388-second test duration. The partial 1,846 count is therefore not the combined inventory result because that gate stopped in the browser group.
expected: rerun the normal full staged-tree commit gate before this merge commit is recorded, using the documented 7,920-second local budget. Combined GitHub Actions must pass before main is updated; its results will accompany the integration PR.
untested: no live collection, vendor calls or operator panel was exercised for integration. Locally unavailable capabilities follow the existing suite policy and are not claimed as passing.

what you got wrong and fixed
mistake: the first documentation combiner handled architecture table rows but omitted CLI prose outside the table. where: the local merge-417-424.mjs docs helper before committing. impact: three source PRs' CLI documentation was absent from the unpublished integration tree; code, tests, source PRs and main were unaffected. cause: an overly narrow table-row parser. fix: apply each complete architecture patch in source order, then audit every added source line. verified: all eight full architecture patches applied cleanly and the strengthened integration audit passed, including every architecture addition and all 16 regressions.
@StepenkoAnatoli
StepenkoAnatoli merged commit 0553724 into main Oct 16, 2026
7 checks passed
@StepenkoAnatoli
StepenkoAnatoli deleted the merge/pr-417-424 branch October 17, 2026 06:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment