feat: sourcemap explain mode, health report, and protocol upgrade playbook - #721
Merged
Conversation
…ley76#706) Introduces ExplainTrace and ExplainEntry models that record every stage attempted during WASM-to-source resolution, with acceptance status and reason for each decision. FallbackMapper.ResolveWithExplain threads the trace through all five DWARF stages; Resolver.ResolveWithExplain covers the source-discovery pipeline (build manifest, cache, registry, GitHub, local override). A new `glassbox sourcemap explain` CLI command exposes both paths in text and JSON output. Unit tests cover input-guard firing, all-stages-rejected, cargo-manifest accepted, cache-hit and registry-hit scenarios. closes pugsley76#706
…y76#625) Adds scripts/health-report.sh, a language-aware scanner that identifies stale TODO/FIXME/HACK/PLACEHOLDER markers, placeholder implementations, unreferenced docs, generated-file drift, and compatibility shims. A JSON suppression file (.glassbox-health-suppress.json) allows owners to intentionally defer findings with an expiry date; stale suppressions (past their expiry) cause a non-zero exit so CI surfaces forgotten commitments. Regular findings are reported but do not block merges. Suppression file format and CI integration documented in docs/health-report.md. closes pugsley76#625
Adds docs/protocol-upgrade-playbook.md covering the full lifecycle of integrating a new Stellar protocol version: discovery (CAP + XDR), capability negotiation via protocolreg, XDR/RPC struct updates, fixture and synthetic transaction requirements (one per supported version), source-mapping regression checks via explain mode, compatibility matrix updates, rollback plan, and release notes checklist. Each section includes copy-paste shell commands so any maintainer can run the steps without prior context. closes pugsley76#624
|
@Machundii Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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
glassbox sourcemap explaincommand withExplainTracemodel that records every DWARF and source-discovery stage (full_dwarf → partial_dwarf → symbol_heuristic → cargo_manifest, plus cache/registry/GitHub/override). Supports--format textand--format json. Unit tests cover input-guard, all-stages-rejected, cargo-manifest accepted, cache-hit, registry-hit, local-override-accepted, and invalid-contract-ID scenarios.scripts/health-report.shthat scans Go/Rust sources for stale TODO/FIXME/HACK/PLACEHOLDER markers, placeholder implementations (panic("not implemented")), unreferenced docs, generated-file drift, and compatibility shims. A JSON suppression file (.glassbox-health-suppress.json) lets owners defer findings with an owner and expiry date; stale suppressions cause a non-zero exit. Regular findings are informational only. CI integration and suppression format documented indocs/health-report.md.docs/protocol-upgrade-playbook.md: a step-by-step guide covering CAP discovery, capability negotiation viaprotocolreg, XDR/RPC updates, fixture requirements (one representative transaction per supported version), source-mapping regression checks via explain mode, compatibility matrix updates, rollback plan, and release notes checklist.Test plan
go test ./internal/sourcemap/...— explain_test.go passes (ExplainTrace model, FallbackMapper.ResolveWithExplain, Resolver.ResolveWithExplain)go build ./internal/cmd/...— sourcemap_explain.go compiles cleanglassbox sourcemap explain --wasm <path> --addr 0x1234— prints staged decision trailglassbox sourcemap explain --wasm <path> --addr 0x1234 --format json— emits valid JSONscripts/health-report.sh— runs without error on a clean reposcripts/health-report.sh --json— emits valid JSON