Skip to content

M12.8 (server): config_source= on gitway diag line (NFR-24)#3

Merged
UnbreakableMJ merged 1 commit into
mainfrom
feature/m12-8-diag-config-source
May 4, 2026
Merged

M12.8 (server): config_source= on gitway diag line (NFR-24)#3
UnbreakableMJ merged 1 commit into
mainfrom
feature/m12-8-diag-config-source

Conversation

@UnbreakableMJ

Copy link
Copy Markdown
Contributor

Summary

M12.8 server-side wiring for NFR-24: adds diagnostic::emit_for_with_config_sources(&AnvilError, &[PathBuf]), which emits the standard gitway diag line plus a config_source=path1,path2 field listing the ssh_config(5) files that were consulted during the failing invocation.

gitway diag ts=2026-04-22T18:43:11Z pid=12345 code=4 reason=PERMISSION_DENIED config_source=~/.ssh/config,/etc/ssh/ssh_config argv=["gitway", "git@github.com", "git-upload-pack", "'org/repo.git'"]

An empty &[] reproduces the existing emit_for output exactly, so the new entry point is a strict superset. Existing emit and emit_for continue to work unchanged.

This is the server side of M12.8. The Gitway-side consumer (computing the deduplicated path list before run() and passing it to the new entry point) lands as a separate PR against Steelbore/Gitway once anvil-ssh 0.3.1 is published.

Versioning

Bumps anvil-ssh 0.3.0 → 0.3.1. Pure addition — no breaking changes — so a patch bump is appropriate. Cargo's ^0.3.0 semver requirement will pull 0.3.1 automatically.

Test plan

  • CI passes (Linux/macOS/Windows + MSRV 1.88).
  • cargo fmt --all -- --check clean.
  • cargo clippy --all-targets --all-features -- -D warnings clean.
  • cargo test --lib --tests --locked green on all platforms (153 lib tests).
  • After merge: tag v0.3.1, publish to crates.io.

🤖 Generated with Claude Code

Adds diagnostic::emit_for_with_config_sources(&AnvilError, &[PathBuf])
entry point. Emits the standard gitway diag line plus an additional
config_source=path1,path2 field listing the ssh_config(5) files that
were consulted during the failing invocation. An empty slice produces
output identical to emit_for, so the new entry point is a strict
superset.

The Gitway CLI consumes this in a follow-up PR (M12.8 client side):
gitway-cli/src/main.rs computes the deduplicated path list before
calling run() and passes it to emit_for_with_config_sources at the
existing emit_for(e) call site.

Cargo.toml: 0.3.0 -> 0.3.1 (additive, no breaking changes).
CHANGELOG: 0.3.1 entry.

Plan: M12.8 of let-us-plan-on-bright-cosmos.md (Anvil server side).
@UnbreakableMJ
UnbreakableMJ merged commit 2cbdeac into main May 4, 2026
5 checks passed
@UnbreakableMJ
UnbreakableMJ deleted the feature/m12-8-diag-config-source branch May 4, 2026 02:23
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