fix(check): detect generated-output drift#99
Conversation
|
Hi @VVeb1250 — thank you for the excellent issue report and for following it up with a working PR. The repro in #98 was precise, and the read-only findStaleGeneratedOutputs refactor here is genuinely clean work. I want to be upfront: we had a fix for #98 in flight on our side, and after comparing the two approaches carefully I'm going to land ours as the base — but there are pieces of your PR I'd like to bring in on top of it. Here's the reasoning. Where the approaches differ Your PR makes check run the full generation pipeline (generate --check internally) and compare the live canonical projection against disk. Ours records checksums of every generated output in .agentsmesh/.lock at generate time (a new outputs map), and check simply re-hashes those paths. We went with the lock-checksum route for four reasons:
The one real trade-off in favor of your approach: it works on existing locks with zero migration. Ours needs one agentsmesh generate to upgrade the lock — until then check reports outputsChecked: false with a hint, rather than failing. What I'd like to adopt from this PR
The implementation commit is here and you can compare it directly. Thanks again — both the report and the PR moved this forward materially, and I'd be glad to have the stale-detection piece land under your name. |
Summary
agentsmesh checkfail when generated outputs are modified, missing, or stalecanonicalDriftandoutputDriftoutputModified,outputRemoved, andoutputStalepathsRoot cause
agentsmesh checkonly compared canonical files under.agentsmesh/with.agentsmesh/.lock. It never projected the current canonical state and compared the generated files on disk, so direct output edits could pass CI.Stale outputs also do not appear in the current generation result. The existing cleanup path knew which output locations AgentsMesh manages, but that discovery was only used by write-mode generation. This change extracts read-only stale discovery for
check; deletion remains exclusive to normalagentsmesh generate.Validation
Fixes #98