Repository navigation
fix(snapshot): retain schema diagnostics in file failures - #7875
Closed
wunianze666-netizen wants to merge 2 commits into
Closed
wunianze666-netizen wants to merge 2 commits into
wunianze666-netizen wants to merge 2 commits into
Conversation
Contributor
[Medium impact] The reviewed changes appear safe to merge, with the previous test-coverage finding addressed. SummaryThe PR keeps snapshot schema diagnostics through the shared file-error helper. Invalid snapshots remain refused.
Reviews (2) · Last reviewed commit: "test(snapshot): assert full validation d..." · Reviewed by Greptile |
1 task done
gensokyo-dev
added a commit
that referenced
this pull request
Nov 14, 2026
Refs #7442 Fixes #7442 Supersedes #7875 Co-Authored-By: gensokyo-dev <[email protected]>
gensokyo-dev
added a commit
that referenced
this pull request
Nov 14, 2026
Refs #7442 Fixes #7442 Supersedes #7875 Co-Authored-By: gensokyo-dev <[email protected]>
N0zoM1z0
pushed a commit
that referenced
this pull request
Nov 14, 2026
Refs #7442 Fixes #7442 Supersedes #7875 Co-Authored-By: gensokyo-dev <[email protected]>
Collaborator
|
Thank you for this fix. It landed in #10499 with your authorship kept on the commit (adapted where noted in the PR), so I'm closing this PR as superseded. |
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.
Summary
Fixes #7442. Keep the first snapshot schema failure location/message and the count of additional issues through read/write file wrappers and public CLI/MCP diagnostics, while continuing to refuse invalid snapshots.
Problem and expected behavior
A snapshot containing only empty entries/workflow_entries arrays raises a specific ZodError for missing header fields, but the file wrapper replaced it with a constant reason. Invalid entries and serialization had the same loss. Expected schema errors now use the existing bounded first-issue formatter; original TypeError reasons and unknown-cause fallback remain unchanged.
Change and scope
Reuse domain describeValidationFailure in the existing shared snapshotValidationMessage helper. No duplicate formatter, parser, issue-list representation or new error category. Read and write keep the internal cause while the public error includes a concise reason, not a serialized exception.
Follow the contribution scope.
Unresolved scope, authority, side effects, or required verification block
integration. Link the required maintainer scope decision for new providers or
capabilities involving target execution, injection, mutation, or protection
recovery; ordinary fixes within existing boundaries may state "not applicable".
Draft PRs may leave the scope decision pending and the readiness and merge checklists
unchecked. Maintainers can help resolve open questions.
Contract and boundary impact
docs/public/product-catalog.json), package, or installation impact (CI generates and validates ignored catalogs andskills/; edit authored instructions in.agents/skills/reverse-engineer-anything/and never commit build outputs): none; no package/lock changes or generated output committed.Expected effects (check known effects; use documentation-only on its own).
Unchecked items do not establish absence; leave uncertainties visible.
Evidence and regression coverage
For boundary fixes, identify the applicable boundary regressions
and lifecycle regressions
covered by the evidence above, and explain relevant gaps.
For evidence-bearing changes:
Observed, derived, and inferred claims remain distinguishable.
Artifact identity, source provenance, and failed attempts remain preserved.
Unsupported, incomplete, unavailable, or uncertain outcomes remain visible.
Publication-time source-only recheck on frozen main a6295e4: the file wrapper, shared diagnostic formatter and public error schema are unchanged; the domain snapshot schema only adds supported format enum values. Independent merge-tree exits0, tree fa5ba39f5763ddb779b8435a4e216f445510995e. No checkout/build/tests of that new merge tree are claimed; the local results below belong to exact candidate2e3fc980/base570abe95. New PR CI will qualify its actual merge.
Validation performed
Windows10/x64, pinned Node24.22.1/npm11.16.0, existing locked dependencies and genuine matching native6.8 artifact; no new installation.
node scripts/run-development-tests.mjs focused tests/boundary/filesystem/analysisSnapshotInput.test.ts tests/acceptance/analysisSnapshotDiagnostics.test.tson unchanged570 production — build3 passed,13pass/8diagnostic failures. Initial adapter failed on analyze's extra error decoration; its original log is retained and is not a product failure.node scripts/run-development-tests.mjs focused tests/boundary/filesystem/analysisSnapshotInput.test.ts tests/boundary/filesystem/analysisSnapshot.test.ts tests/boundary/filesystem/analysisSnapshotProvenance.test.ts tests/boundary/mcp/analysisSnapshotProvenanceMcp.test.ts tests/acceptance/analysisSnapshotDiagnostics.test.ts tests/conformance/readmeConsistency.test.ts— build3 passed,50pass/1fail/0skip across51; the single POSIX-mode failure was reproduced on unmodified570 (1selected failure,16filtered controls not executed). No permission assertion was skipped or changed.npm run check— failed at4unused exports/types: staticFileUrlPath, AndroidManifestComponentInventory, ObjcClassImportBindingCoverage, AndroidJniRelocationSource. Unmodified570 knip gives the same4.npm run verify:test-discovery—2677files exactly once, discovery rather than execution.Current head
a4dc5f4a27ed636dd364a86bbbe3833551214a84includes maintainer morluto's follow-up commit strengthening the multi-issue fixture: native/streamed readers and CLI/MCP now assert the complete first message and exact additional-issue count. Review thread PRRT_kwDOSB6hVc6xPhmP is resolved. The maintainer reports21 focused tests on macOS plus targeted lint/diff checks; these are their results, not a new local run by the author.Code CI40737617989 completed success, attempt1:37jobs comprise17success/20optional skips. Source tests passed21,313 with15skips. Static/docs/build, all eight built shards, native build, selected Linux package and final gates passed.
Raw primary, all eight shard, native-build and Linux-package checkouts are
5220d2be32f86375f25f48ee02dcbaaee128f588, parentse79ad6ca8ebbf2e96b5095e7c2b8bfaf27ca7559+a4dc5f4a27ed636dd364a86bbbe3833551214a84, treec6239e4365277d6223b5788df3e7b2bb2ccb0667. This is separate from the older locally validated2e3/base570 tree. Input-reader20, persistence17, provenance2, MCP provenance2 and compiled CLI/MCP diagnostics1 passed individually in the raw shard logs; docs9 were observed separately and are not added again. Optional skips do not establish their platform/provider qualifications. Initial run40735888647 was cancelled after the maintainer's newer push, not a code-regression result.Follow-up validation: the multi-issue missing-header fixture now asserts the first message and exact additional-issue count through native and streamed file readers and public CLI/MCP. The focused two-file run passed 21 tests on macOS; targeted lint and
git diff --checkpassed.Compatibility, safety, and release
Author readiness
Human owner: @wunianze666-netizen
Before merge
type(scope): outcome.