Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
84a9c49
feat(buzz-agent): add DatabricksAuthCoordinator single-flight OAuth
Aug 11, 2026
004891e
fix(buzz-agent): rejected-aware auth, typed refresh, real process tests
Aug 11, 2026
5e0ffbe
fix(buzz-agent): classify refresh 4xx by OAuth error, add cross-proce…
Aug 11, 2026
69a541c
test(buzz-agent): trim redundant databricks auth coordinator tests
Aug 11, 2026
a7e9a87
fix(buzz-agent): correct three OAuth coordinator classification gaps
Aug 27, 2026
5fba13b
test(buzz-agent): cover exchange transport-timeout classification
Aug 27, 2026
733af9b
fix(buzz-agent): revalidate a joined single-flight result against the…
Aug 27, 2026
40e9b98
fix(agent): make joiner revalidation lossless under contention
Aug 27, 2026
fa98d84
fix(agent): validate 401-recovery result at the true choke point
Aug 27, 2026
25267f1
fix(buzz-agent): use then_some for the disk-recheck token move
Aug 27, 2026
eb83297
fix(agent): guard 401-recovery at the persistence boundary
Aug 28, 2026
cffdb95
fix(agent): address three Carl P1s — token neutralization, cross-proc…
Aug 28, 2026
dec73e8
fix(agent): correct adoption contract, close P1-1/P1-2/P1-3 residuals
Aug 28, 2026
bc4a505
fix(agent): scope in-process and cross-process failure adoption by re…
Aug 29, 2026
971ee2c
fix(agent): close r9 test/CI gaps — fix regressions and ungate Window…
Aug 29, 2026
85629e4
test(buzz-agent): fix r10 regression determinism and CI blockers
Aug 31, 2026
184e445
test(buzz-agent): make headless adoption test deterministic
Aug 31, 2026
f62efd6
Merge remote-tracking branch 'origin/main' into duncan/databricks-aut…
Aug 31, 2026
16cee46
refactor(buzz-agent): consolidate held-refresh stubs behind one param…
Aug 31, 2026
05d273b
Merge remote-tracking branch 'origin/main' into duncan/databricks-aut…
Aug 31, 2026
5f52a55
fix(buzz-agent): reconcile joiner credential state after in-process c…
Sep 1, 2026
d5b89ac
Merge remote-tracking branch 'origin/main' into duncan/databricks-aut…
Sep 1, 2026
27f09d2
fix(buzz-agent): correct preserve-distinct-newer test setup
Sep 1, 2026
1541938
fix(buzz-agent): guarantee joiner state reconciliation under lock; re…
Sep 1, 2026
81216c8
test(auth): add falsifiable regression for awaited joiner reconciliation
Sep 1, 2026
da58ac5
fix(buzz-agent): fence joiner failure cleanup to in-memory state only
Sep 1, 2026
29b5c1e
chore(buzz-agent): remove empty line between adjacent doc-comment blocks
Sep 1, 2026
9441aff
docs(buzz-agent): move expire_rejected doc to correct function; fix t…
Sep 1, 2026
e1c8952
fix(buzz-agent): remove needless borrows on Waker::noop() in tests
Sep 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1214,6 +1214,20 @@ jobs:
# Serial: windows_resolver_tests mutate process-global env
# (BUZZ_SHELL/GIT_BASH/SystemRoot) that SharedState::new reads.
run: cargo test -p buzz-dev-mcp --target $env:TARGET -- --test-threads=1
- name: Test (buzz-agent auth coordinator)
# The auth coordinator single-flights on an OS advisory lock, which is
# LockFileEx on Windows; this integration suite drives real second
# processes on the same lock file, so it only exercises the Windows
# lock runtime if it runs ON Windows. Every other job compiles it but
# never executes it. Tests exercised on Windows: lock serialization
# (two coordinators race for the same key), cooldown sidecar sharing
# across processes, attempt-sidecar adoption (UserInitiated waiter
# adopts a predecessor's denial), and the in-process single-flight for
# same-key coalescing. Tests that are UNIX-ONLY and NOT executed here:
# crash-release (flock drop on SIGKILL, guarded by #[cfg(unix)]) and
# cross-process cache success/race (on-disk token handoff, also
# #[cfg(unix)]).
run: cargo test -p buzz-agent --target $env:TARGET --test databricks_auth_coordinator
# Smoke-test the new host-prereq contract: Git for Windows (which provides
# bash) is available on the runner, a shell command round-trips, and bash
# does NOT resolve from System32 (so WSL's launcher is never picked up).
Expand Down
11 changes: 11 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 15 additions & 8 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,21 @@ test-unit:
# because nothing in CI runs `cargo test --workspace` — workspace
# membership alone buys clippy/check, not a single executed test.
cargo nextest run -p buzz-backend-kubernetes
# buzz-agent model-capabilities corpus: the Rust half of the
# cross-language drift guard. `model_capabilities.rs` embeds
# scripts/model-capabilities.json + scripts/normative-corpus.json via
# include_str! and replays the full locked corpus as pure in-process tests (no
# infra). Enumerated explicitly because nothing in CI runs
# `cargo test --workspace`; without this step a manifest edit that
# diverges Rust from the corpus ships green.
cargo nextest run -p buzz-agent --lib
# buzz-agent: two infra-free concerns run together by executing the
# whole crate (lib + integration tests), because nothing in CI runs
# `cargo test --workspace`, so without this stanza neither the crate's
# library tests nor its integration tests execute remotely.
# * model-capabilities corpus (lib): the Rust half of the
# cross-language drift guard. `model_capabilities.rs` embeds
# scripts/model-capabilities.json + scripts/normative-corpus.json via
# include_str! and replays the full locked corpus as pure in-process
# tests; without it a manifest edit that diverges Rust from the
# corpus ships green.
# * OAuth auth coordinator (lib concurrency matrix + databricks
# integration tests): lock single-flight, cooldown, cross-process
# crash recovery — infra-free via a stub OIDC provider and an
# injected browser opener, no network or Postgres.
cargo nextest run -p buzz-agent
# Admin API auth-boundary tests (api::admin in buzz-relay): the NIP-98
# duplicate-tag rejections, the Host/Origin replay-ordering causal pair,
# the admin.localhost origin/advertisement/canonical-URL pins, and the
Expand Down
23 changes: 23 additions & 0 deletions crates/buzz-agent/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,24 @@ path = "src/main.rs"
name = "fake-mcp"
path = "tests/bin/fake_mcp.rs"

# Test-only lock holder: a real second process that takes the coordinator's
# cross-process advisory lock, so the auth tests can prove genuine
# inter-process single-flight and crash-release rather than same-process
# handles. Tiny; only used by the databricks auth integration tests.
[[bin]]
name = "lock-holder"
path = "tests/bin/lock_holder.rs"

# Test-only auth worker: a real second process that runs the PUBLIC auth
# coordinator API (`acquire_with_intent`) with a scripted browser opener and a
# shared temp cache, so the auth tests can prove the cross-process single-flight
# contract end-to-end — durable cooldown sharing and one-grant/one-cache races
# across a genuine process boundary, not two in-process handles. Only used by
# the databricks auth integration tests.
[[bin]]
name = "auth-worker"
path = "tests/bin/auth_worker.rs"

[dependencies]
tokio = { workspace = true, features = ["rt-multi-thread", "macros", "io-std", "io-util", "sync", "process", "time", "net"] }
serde = { workspace = true }
Expand All @@ -45,6 +63,11 @@ url = { workspace = true }
urlencoding = "2"
webbrowser = "1"
dirs = "6"
# Cross-process advisory file lock (flock on Unix, LockFileEx on Windows) for
# the auth coordinator's single-flight. Kept off std's `File::try_lock` so the
# crate stays buildable on the repo's declared 1.88 MSRV (those std APIs are
# 1.89+).
fs2 = "0.4"

[target.'cfg(unix)'.dependencies]
nix = { version = "0.31", default-features = false, features = ["signal", "process"] }
Expand Down
Loading
Loading