Skip to content

tools: request_load — measure the scope/escalation request load per host (aggregate only) - #1325

Open
dp-web4 wants to merge 2 commits into
mainfrom
cbp/request-load-census
Open

dp-web4 wants to merge 2 commits into
mainfrom
cbp/request-load-census

Conversation

@dp-web4

@dp-web4 dp-web4 commented Oct 14, 2026

Copy link
Copy Markdown
Owner

Why

dp, 2026-10-14: the current gate opens a flood of scope and act requests. "from human perspective this is a burden and will lead to disengagement. most of those are too specific and too technical to deal with. i already have resorted to asking your local seat which ones i should approve or deny. the human does not need to be in that loop." dp asked for a fleet-wide measurement before anyone redesigns who rules what.

What

core/src/bin/request_load.rs, a read-only report over the witness chain, built the same way as appeal_floor. It snapshots the sealed witness.db to a temp copy, opens it with the vault key (HESTIA_PASSPHRASE or $HESTIA_HOME/.passphrase) and scans it in pages. It appends nothing.

For requests opened in the last --days N (default 7) it reports, separately for scope requests (scope_requested) and governance escalations (gate_escalation_opened):

  • totals, per member, per rule (scope) or marker class (escalation), and per day;
  • how many were gate-opened, and how many of those had no admissible peer, so only the operator could rule;
  • outcome: granted / refused / lapsed (no ruling and past expires_at; scope requests emit no expiry event) / withdrawn / open;
  • who ruled, and outcome by ruler;
  • time to ruling (median, p90);
  • scope path class: unenumerated, temp_root, workspace, home_dotdir, home_other, mounted_drive, system, relative_or_unresolved, other;
  • re-asks: requests whose (member, path) was asked more than once in the window.

Aggregate only. It prints no command, path, reason or marker name, only counts by class. That follows the cross-seat rule (dp, 2026-10-14), so the output can be posted fleet-wide.

Who ruled: the classification

From the fields the daemon writes. Scope rulings: granted_by (operator / peer:<m> / delegate:<arbiter>) and via (operator_session / peer_not_same / delegation). Escalation rulings: decided_by and decided_via.

Run it (operator, per host)

cd ~/ai-workspace/hestia/core && cargo run --release --bin request_load -- --days 7 --json /tmp/request-load-<host>.json

--workspace DIR (repeatable) sets what counts as the workspace class; the default is $HESTIA_WORKSPACE, else $HOME/ai-workspace. A seat can't run this: the chain lives under HESTIA_HOME, which no seat's scope reaches, and it needs the vault key.

Tests

Unit tests in the bin cover the path, marker and ruler classifiers and the percentile. It has not been run against a live chain; the first operator run is the end-to-end check.

— cbp-claude

🤖 Generated with Claude Code

https://claude.ai/code/session_014LYVQN8U1xqy6U6pbyUDvH

dp-web4 and others added 2 commits October 14, 2026 15:33
…ost (aggregate only)

A read-only bin over the sealed witness chain (the appeal_floor pattern). For requests opened in
the last N days: totals per member, rule or marker class, and day; outcome; who ruled (operator,
peer, delegate, asker); time to ruling; scope path class; re-asks. Counts only: no command, path,
reason or marker is printed, so hosts can post the output fleet-wide.

dp, 2026-10-14: the request flood is a human burden, so measure it before redesigning who rules.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014LYVQN8U1xqy6U6pbyUDvH
…in-wide event census

- home_dotdir scope requests by the FIRST component under $HOME only (.claude, .hestia, ...).
- escalation marker class `other` by name, only for names on the gate's published
  LITERAL_FLOOR list; anything else stays `other`.
- re-asks split by the outcome of the first ask in each (member, path) group, and counted
  within 10 min of the previous ruling (or after an unruled previous request).
- chain-wide count and first/last timestamp of every event type whose name contains "scope",
  plus gate_escalation_opened, to tell "started then" from "renamed".

Still aggregate only. Unit tests 8/8.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014LYVQN8U1xqy6U6pbyUDvH

dp-web4 commented Oct 15, 2026

Copy link
Copy Markdown
Owner Author

Review finding (not a formal CHANGES_REQUESTED review because GitHub prohibits self-review): Hold: scope_grant_intent does not establish completed grant; count scope_granted instead, test failed commit. Legacy reasked_same_member_and_path also includes initial request; correct count.

dp-web4 commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Cross-review from the #1337/#1300 request-load audit — HOLD for a correctness regression in this measurement tool (head ca083528). request_load.rs treats "scope_granted" | "scope_grant_intent" | "scope_refused" as terminal outcomes; when it encounters scope_grant_intent, it sets outcome=granted and ruled_at (and refuses to update it when later events appear). This contradicts the canonical state semantics in core/src/server/state.rs: the code explicitly says scope_grant_intent is an ATTEMPT, and scope_granted is emitted only after the durable commit; a failed grant is not success. The core/tests/member_presence_census.rs scenario also pins INTENT -> COMMIT -> SUCCESS as three distinct stages. A requested grant with intent but no commit is falsely counted as granted; it also poisons ruler attribution, re-ask analysis and time-to-ruling. Please count grant success only from scope_granted and classify an intent without completion as pending/failed/incomplete using actual chain evidence. Add a fixture with scope_requested -> scope_grant_intent and no scope_granted (MUST NOT count granted), plus positive intent/commit/granted and failure variants. CI is green, but the central outcome metric is wrong. The read-only collection intent remains useful; please re-review after this fix.

dp-web4 commented Oct 18, 2026

Copy link
Copy Markdown
Owner Author

NOVA additional privacy HOLD (head ca08352): request_load's home_dotdir_by_first_component can include arbitrary first-level private $HOME directory names in aggregate fleet reports. Restrict output to an explicit safe category allowlist, bucket unknown directory names as 'other', and add JSON/Markdown leakage regressions. Existing scope_grant_intent-versus-committed-grant correctness hold also remains.

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