Skip to content

feat: sourcemap explain mode, health report, and protocol upgrade playbook - #721

Merged
pugsley76 merged 3 commits into
pugsley76:mainfrom
Machundii:main
Jul 30, 2026
Merged

feat: sourcemap explain mode, health report, and protocol upgrade playbook#721
pugsley76 merged 3 commits into
pugsley76:mainfrom
Machundii:main

Conversation

@Machundii

Copy link
Copy Markdown
Contributor

Summary

  • closes Add a Source-Map Explain Mode for DWARF Resolution #706 — Add glassbox sourcemap explain command with ExplainTrace model that records every DWARF and source-discovery stage (full_dwarf → partial_dwarf → symbol_heuristic → cargo_manifest, plus cache/registry/GitHub/override). Supports --format text and --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.
  • closes Issue 118: Add repository health and stale-code reporting #625 — Add scripts/health-report.sh that 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 in docs/health-report.md.
  • closes Issue 117: Add upgrade notes for Stellar protocol changes #624 — Add docs/protocol-upgrade-playbook.md: a step-by-step guide covering CAP discovery, capability negotiation via protocolreg, 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 clean
  • glassbox sourcemap explain --wasm <path> --addr 0x1234 — prints staged decision trail
  • glassbox sourcemap explain --wasm <path> --addr 0x1234 --format json — emits valid JSON
  • scripts/health-report.sh — runs without error on a clean repo
  • scripts/health-report.sh --json — emits valid JSON

…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
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@pugsley76
pugsley76 merged commit 3be0322 into pugsley76:main Jul 30, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants