Skip to content

Prevent dead source links for local-only commits - #264

Merged
forhappy merged 1 commit into
mainfrom
codex/validate-export-source-refs
Aug 19, 2026
Merged

Prevent dead source links for local-only commits#264
forhappy merged 1 commit into
mainfrom
codex/validate-export-source-refs

Conversation

@forhappy

Copy link
Copy Markdown
Contributor

Summary

  • require an exported graph source commit to be reachable from a local origin remote-tracking ref before embedding a forge permalink
  • omit source-navigation metadata for local-only objects instead of constructing a GitHub, GitLab, or Bitbucket URL that cannot resolve
  • document the offline reachability requirement and cover reachable and local-only commits at the CLI boundary

Root cause

The exporter verified only that sourceCommit existed in the local object database. The bbolt graph was built at local synthetic commit 0e3e6bf, which is not reachable from origin/main, so Compass emitted a GitHub URL for an object GitHub never received.

Reproduction

Replayed export against /Volumes/Workspace/Github/bbolt/compass-out/graph.json. Before the fix, the HTML embedded revision 0e3e6bf and GitHub returned 404. After the fix, the export omits that dead source-navigation record.

Verification

  • cargo fmt --all -- --check
  • cargo test -p compass-cli --test viewer_export_cli --locked
  • cargo test -p compass-cli --test compass_product --locked
  • cargo clippy --workspace --lib --bins --locked -- -D warnings
  • cargo test --workspace --lib --bins --locked
  • sh scripts/check_product_boundary.sh
  • direct bbolt export replay

All Cargo checks used CARGO_TARGET_DIR=/Volumes/Workspace/crabbuild-target/compass-main.

@forhappy
forhappy merged commit 7261639 into main Aug 19, 2026
13 of 14 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

Development

Successfully merging this pull request may close these issues.

1 participant