feat(runtime): report installation provenance - #381
Conversation
neusse
left a comment
There was a problem hiding this comment.
Reviewed current head 504a8c0a9415420c81ea799f105ae6afeac18292 against #380.
The diagnostic is conservative and evidence-based: it reports the serving executable, build identity, verified/unknown installation source, bounded version probes, redacted endpoint information, comparable-version status only when provable, and platform-specific restart ownership. It adds an always-visible public tool, so this is a minor-release change.
Queue position: after #379, and this is the final foundation PR before the stacked ownership/hierarchy train is rebuilt. Please wait for #379 to merge, then update #381 once onto current main, regenerate counts with cargo xtask fix-doc-counts, and rerun the full unfiltered gate. The older #176 also changes the meta-tool catalogue/count area; it may need reconciliation later, but that should not make this branch repeatedly absorb unrelated queue movement now.
After #381 lands, #388 should be rebuilt from the resulting main with only its unique ownership work. Do not try to preserve the copied prerequisite commits in #388.
|
The implementation itself does not currently need a behavioral redesign. To make this PR ready to merge, please:
Once the updated head is clean, 10/10 checks are green, and the issue-closing link remains intact, it should be ready for the final merge check. No unrelated feature changes are requested. |
504a8c0 to
a2c9e20
Compare
|
@neusse #381 is ready for final merge on exact head a2c9e20. It is rebuilt directly on the merged #379 foundation as exactly two patch-identical feature commits; cargo xtask fix-doc-counts reports the documentation current, the complete unfiltered local contributor gate passes, the release binary embeds the exact head, and all 10 hosted checks are green. The author account cannot execute the upstream merge. Please merge when ready; per your queue direction, #388 is next and will be rebuilt from the resulting main with only its unique ownership work. |
Closes #380.
Root cause
Konnect's package semver was the only build identity. Release builds did not embed the exact checkout, client
statusinspected static guidance rather than the serving process, and the runtime had no process-scoped provenance collector or conservative on-disk-versus-running comparison.Implementation
get_installation_infoMCP tool;unknown;kicad-cliwith read-only, kill-on-drop, five-second-bounded--versioncalls;newer_than_runningonly when both values are comparable stable versions;${{ github.sha }}in release artifacts;The diagnostic does not mutate configuration or installation state, scan processes, dump environment data, or expose subprocess error text.
Dependency and branch shape
mainafter merged feat(review): add hierarchy scope to standalone audits #379 (e7aeaa6a1b353fa758c5246b58a18899275d13ef);git range-diffreports both reconstructed commits as patch-identical to the reviewed commits from the previous head.Regression coverage
konnect 0.11.0and contains exact branch heada2c9e20bc643479f7aaf8ecd066eb0529e9711de.Verification on the final head
cargo xtask fix-doc-counts— pass; documentation already current, no rewrite requiredcargo fmt --all -- --check— passcargo clippy --workspace --locked --all-targets -- -D warnings— passcargo test --workspace --locked --lib --tests— pass, unfiltered; installed KiCad demo-board corpus passescargo test --workspace --locked --doc— passcargo test --locked -p konnect-core runtime_info::tests --lib— 5 passedcargo test --locked -p konnect --test protocol_stdio installation_info_reports_the_serving_process_without_leaking_endpoint_secrets -- --exact— 1 passedcargo test --locked -p konnect --test doc_tool_counts— 6 passedcargo test --locked -p konnect --test asset_references— 12 passedcargo build --release --locked -p konnect— pass; version and exact embedded head verifiedRepository-declared ignored tests that require a live KiCad GUI, the intentionally slow wedged-server timeout, or the dedicated KiCad E2E workflow were not forced locally. The changed behavior itself is covered by hermetic unit tests and a real child-process stdio MCP test.
Compatibility and risk
This is additive: no existing tool or argument changes. Baseline
tools/listgrows by one always-visible tool, so the change requires minor-release planning.Provenance remains deliberately conservative: non-PCM standalone channels remain
unknown, prerelease or non-triplet versions produce a null newer comparison, and working-tree state isnot_recorded. Local runtime and release-binary verification is Windows; platform guidance is selected at compile time, while hosted macOS/Linux CI validates those builds.The tool intentionally returns the serving executable and resolved KiCad CLI paths so a user can identify the active binary. It does not enumerate unrelated files. Issue #103 remains the separate process-lifecycle fix.