Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/hive-c0re/src/dashboard
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas a40c0026cf hive-c0re: test verify_hmac guards and webhook status mapping
`verify_hmac` is the only authentication gate on the public
`/webhook/config-pr` endpoint, and neither of its guard clauses nor the
handler's "unavailable" → 503 / otherwise → 401 mapping had a test.

The tests build a real `AppState` over the tempdir `Coordinator` that
the socket_server schedule tests already use. That helper is widened
from `pub(in crate::socket_server)` to `pub(crate)` and re-exported from
`socket_server` under `#[cfg(test)]`, so non-test code is unchanged.

Removing the missing-secret guard (replacing it with
`unwrap_or_default()`) fails
verify_hmac_rejects_every_delivery_when_no_secret_is_loaded and
config_pr_answers_503_when_no_secret_is_loaded. Deleting the
missing-header guard fails
verify_hmac_rejects_a_delivery_with_no_usable_signature_header. Breaking
the "unavailable" match fails the 503 test.

Without the missing-header guard, an unsigned delivery is still refused
by `verify_signature` (no `sha256=` prefix). The test therefore pins the
guard's own message rather than the bare rejection.

Closes #4654
2026-10-02 18:20:31 +02:00
..
approvals.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
build_logs.rs docs: stop asserting DagView/NodeView after their deletion 2026-08-03 21:47:58 +02:00
health.rs refactor(hive-c0re): one producer for the readiness verdict 2026-08-16 13:12:59 +02:00
journal.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
lifecycle_ops.rs hive-c0re: fail on a malformed agent name and on an unreadable container list 2026-09-27 05:13:21 +02:00
meta_inputs.rs wip(#3001): catch the multi-line .insert( chains the grep missed 2026-08-04 19:57:32 +02:00
misc_api.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
mod.rs github: PATs live in swarm bao; the agent fetches them itself 2026-10-02 17:48:27 +02:00
permissions.rs hive-c0re: fail on an unparseable permission file, write it atomically 2026-09-26 21:11:54 +02:00
schedules.rs remove operator as target for scheduled prompts 2026-09-11 23:32:45 +02:00
state_files.rs docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
state_snapshot.rs docs: point matrix GUI comments at the swarm UI, drop the M4TR1X tab 2026-10-02 14:44:34 +02:00
tombstones.rs Make agent creation swarm-only and refuse a name placed on another hive 2026-09-29 15:47:40 +02:00
webhook.rs hive-c0re: test verify_hmac guards and webhook status mapping 2026-10-02 18:20:31 +02:00