WIP: Guard bounded private household query execution #1632

Draft
lytedev wants to merge 29 commits from propose/private-query-tool-guard into main
Owner

See the commits.

See the commits.
feat(chat): bind displayed input actors to canonical authenticated submissions
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
393212d88f
test(chat): verify canonical actor proof across viewers and restart
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
6a49334c97
fix(chat): preserve exact legacy display and close revoked streams
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
dad045a1c1
style(chat): apply the pinned UI formatter to actor parser tests
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
314b9104f2
fix(chat): reject malformed provenance request IDs before SDK reads
All checks were successful
/ check-format (push) Successful in 18s
/ build (push) Successful in 20m37s
777ba11b88
fix(assistant): guard conversation publication with native reply provenance
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 21m13s
7861e47bc0
fix(assistant): preserve fail-closed legacy readers and shared input proof
Some checks failed
/ check-format (push) Successful in 16s
/ build (push) Has been cancelled
9220c89c3e
fix(assistant): require a completed answer witness before publication
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 29m57s
0d3610fac6
fix(assistant): include the current household actor in task audiences
All checks were successful
/ check-format (push) Successful in 16s
/ build (push) Successful in 20m12s
37cc244dff
test(assistant): preserve human readers in service publication fixtures
All checks were successful
/ check-format (push) Successful in 20s
/ build (push) Successful in 20m48s
de7ba504ce
The service-only reader assertion withheld legitimate human history before
entry witness verification. Keep the source-free checks and derive the
expected actor kind from authenticated synthetic principals.

On bigtower, the focused base-1607 fixture passes 83 backend, authority,
publication and result tests. A local-only 65+37 aggregate passes 81 tests,
including sequential service/human/second-human publication with exact
canonical inputs and service provenance. Replacing only authority with the
pre-37 version fails at provider call count 2 versus 3.

The configured nix formatter ran without changes. Broad strict TypeScript
still reports existing unrelated diagnostics; no production guard changed.
test(assistant): withhold revoked projected SSE batches
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
0142b549f9
Exercise both registered signed HTTP profiles with actual canonical
input, native producer/witness validation and one completed synthetic
provider call. Revoke source authorization at the second before-publish
check: projection has completed, but no protected snapshot is sent.

The initial authorized canonical history contains the exact answer and
withholds reasoning. This prevents a 503, empty projection or unrun
provider from passing the negative stream assertion vacuously.

Bound the stream observation gates and abort/join task-owned clients on
all exits; keep the existing two-client session-revocation regression.

Bigtower immutable archive dca06499546b: all 40 backend integration
tests passed on Node 24.15.0, concurrency 2, nice 10. Strict TypeScript
checks passed for the changed test graph. nix fmt passed there with an
explicit archive tree root. No live providers or production changes.
test(andromeda): replace unreachable chat handlers with closed contracts
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 21m19s
f915c1651e
The base proposes legacy closure; it is not main or production. Do not
restore raw native routes to satisfy obsolete handler expectations.
Replace their 200/403 assumptions and unreachable owner/history gates
with GET/POST cloud/local closure checks, including malformed and large
bodies, JSON/SSE negotiation, speech and spokenReply flags.

Contract mapping verified against supported registered adapters:
- assistant_submission_result.test.ts: guarded conversation publication
  reader/source revocation after projection; exact multi-human input;
  reasoning withheld from a real answer; pending/cached result reads
  never resubmit and preserve native stable answer identity.
- assistant_role_ingress.integration.test.ts: queued-logout,
  logout-at-sdk-boundary and interrupt-turn exercise actual admission,
  revocation and cancellation instead of unreachable legacy callbacks.
- assistant_gateway_oauth.test.ts: entered-consumer revocation withholds
  results after asynchronous credential use.
- canonical_assistant_kernel.test.ts: real registered tools/models and
  durable journal across owner incarnations; ignored-abort tool work
  retains native ownership until joined.
- scoped_assistant_models.test.ts and context_source_model_guard.test.ts:
  real model admission preserves scope and pre-cloud private fences.
- command_approvals.test.ts: exact-command, spend-once, same-conversation
  approval remains independently covered without chat generation.
- assistant_gateway_backend.integration.test.ts: signed exact input,
  idempotent submission and private-prefix denial; adds the missing
  nonvacuous post-projection SSE source-revocation race in this series.

Retire the unsupported raw JSON/SSE envelopes, reasoning streaming and
legacy intermediate display format, not the modern privacy contracts.
Keep proxy/peer/Origin denials, query 404s, static/audio/model controls,
real agent/inbox operations, context reset and canonical read receipts.
Malformed bodies still exercise supported /api/messages/read parsing.
No receipt test requires closed history or fake chat generation.

Andromeda speech-presentation/privileged-speech proof is NOT supplied
by modern text tests or Nabu service voice. Keep the rollout blocker in
issues/open/assistant-voice-transport.md; operator review and coordinated
rollout remain necessary.

Bigtower archive dca06499546b: 22 legacy tests and 307 mapped modern
tests passed, alongside the 40 backend tests. Zero skips/cancellations.
Strict TypeScript checking of the changed test graph passed. Node
24.15.0, concurrency 2, nice 10; Nix max-jobs 1/cores 2. nix fmt passed
with an explicit archive root. Temporary GC roots removed on EXIT.
No VM reruns, live providers, goals, merges, deploys or production edits.
feat(assistant): preauthorize configured agent actions and attenuate speech
Some checks failed
/ check-format (push) Successful in 19s
/ build (push) Has been cancelled
fb8522925c
Keep host capability denials authoritative and reserve explicit review for
host-required action kinds. Bind native execution to the authenticated
canonical input, current operator, control access and pinned target.

Validation on bigtower (Node 24.15.0, concurrency 2): the complete source
suite passed 1773 tests, skipped 33 existing optional tests, and failed one
unrelated simultaneous-session gateway assertion (503 instead of 200).
All 172 UI tests and UI strict checking passed. Full source strict checking
still reports the four inherited base errors in agent_management_host,
andromeda_core_composition and command_approvals. Initial focused actual
registered-tool/authority tests passed 67/67. Nix formatting completed;
changed UI files were formatted with vp fmt. Further integrated validation
against the independently owned QA combination is still required.
fix(assistant): preserve fresh agent intent and reject speech approvals
All checks were successful
/ check-format (push) Successful in 16s
/ build (push) Successful in 21m53s
0672741be5
Superseding explicit agent requests must replace an awaiting intent rather
than redisplay the previous action. Non-authorizing assent leaves the exact
pending action available for deliberate review, including when the model
attempts to prepare it again.

Reject speech carrying either approval metadata field before authenticated
input admission. The command field is named explicitly even on the older
base so the attenuation survives integration with command nonce support.

Fix the four remaining production strict errors: serialize the native Pi
endpoint as JSON, import readFileSync, and write valid null records rather
than cast undefined to strings in the old base command ledger. The latter
is a representation fix only; integration must retain the independently
reviewed stronger command-approval implementation.

Bigtower, immutable archive 86daf739d5b74e8e24bdb6c01f07744a:
production plus affected-test strict passed; 263 deterministic Node tests
passed with zero skips, cancellations or TODOs. This includes all 12 agent
and audio suites, native canonical task authorization, speech rejection and
fresh typed/spoken interrupt regressions. Nix formatting completed.

Explicit new DOM file: 3/3 passed. All feature UI: 18 files/172 tests and
strict passed. The requested f915 base independently has 17 files/169 UI
tests, not the 172 tests in the separate QA combination. Both unchanged
f915 and feature gateway-file reruns passed 40/40; the earlier wide-run
simultaneous-session 503 was not reproduced and remains unexplained.
fix(voice-agent): explicitly pin the built-in Home Assistant agent
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 20m3s
099100d64d
Defense in depth, not a change to the existing default semantics.
HA 2026.6.4 already selects its built-in agent when agent_id is absent:
https://github.com/home-assistant/core/blob/2026.6.4/homeassistant/components/conversation/agent_manager.py#L79-L103

Bigtower mock tests: baseline failed both payload assertions; after
the pin, all 12 home_assistant and registered household tool tests pass.
Configured formatter checked only the two explicit files (TS skipped).
Strict checking is blocked by missing node type declarations; unverified.
No live Home Assistant calls or authority/configuration changes.
fix(assistant): bind household effects to canonical task authority
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
b069277880
Keep ordinary human and dedicated household-service preauthorization.
Revalidate the captured task scope after the awaited library lookup.

WIP validation: 77 focused Node tests pass. Strict checking currently
reports eight errors in direct test calls through heterogeneous tool
registrations. The missing Context arguments are fixed; the remaining
fixture typing needs a follow-up without weakening argument validation.

Explicit-source nix fmt processed the four changed TypeScript files
without a configured formatter for that language. The candidate package
build passed on Bigtower under the global exclusive validation lock.
Actual assembleTextCore service factory wiring remains unproven on this
base; service proof currently uses the production authorizer through the
real role, canonical SDK resolver and Kanidm service verifier.
test(assistant): type direct household tool calls at SDK registry boundary
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
bed07478b9
Supply the SDK Context argument in direct unit calls, and use its
heterogeneous Extension boundary when selecting tools by runtime name.
No parameter schemas, assertions, or deadlines are weakened.

Strict TypeScript checking of all four changed files and dependencies
passes. All 77 focused tests pass with no skips or cancellations. The
candidate package builds. Explicit-source nix fmt processes only these
four files; this flake configures no TypeScript formatter.

Checks ran exclusively on Bigtower under the global validation lock.
Logs: ~/Projects/.artifacts/household-tool-task-authority/v3/.
The factory-level service integration limit from the previous commit
remains; this follow-up only resolves the test typing failure.
test(assistant): preserve ordinary household collaborator authority
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
114a81e091
A real read/write collaborator with household authority executes all
three registered immediate media tools without conversation control.
The control denial is asserted before the positive execution.

The existing canonical principal validator rejects an empty role list
before opening a session. Assert that earlier denial and zero inference
and effects rather than fabricating a role-less session or control grant.
A role-less explicitly shared tool invocation remains unrepresentable on
this base; this test does not claim otherwise.

Bigtower exclusive validation: strict checks of all changed files pass,
79 focused Node tests pass without skips, and candidate package builds.
Explicit-source nix fmt traversed only the four changed files and found
no configured TypeScript formatter. Logs are under
~/Projects/.artifacts/household-tool-task-authority/v5/.
test(assistant): use an inert compact household service token fixture
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 20m40s
9bcfb0dc7d
The independently validated prerequisite bundle accepts the actual
compact API-token shape rather than a bare fixture string. Keep its
stricter verifier unchanged; supply inert synthetic compact evidence.

Focused base: 79 tests and strict checks pass. The candidate package
builds, with explicit-source configured formatting before dependencies.
Evidence: ~/Projects/.artifacts/household-tool-task-authority/v6/.

An explicitly unpublished combination with 8cd665bd also passes 80
focused tests and strict checks. Local validation commit
5c7506378c4bd96ef317d32f567959e6ece39a55 extends the existing runtime
fixture to prove actual assembleTextCore signed service input -> current
registered TV tool -> exactly one configured mock effect -> model result.
It is not pushed because aggregate publication was explicitly forbidden.
Combined evidence: the same artifact root under factory6/.

Only Bigtower under the global exclusive lock performed heavy work.
No live providers, production effects, deployments or device I/O.
feat(voice-agent): add bounded named Home Assistant intent adapter
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
ac4d84b53c
test(voice-agent): add WIP loopback HA intent adapter contracts
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 19m31s
49dc2c8b44
feat(assistant): wire bounded household music and Local private queries
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
bfd881dec4
test(assistant): exercise private household reads and output confinement
All checks were successful
/ check-format (push) Successful in 21s
/ build (push) Successful in 19m37s
f6abdfcc08
feat(assistant): constrain private handoffs to host-pinned household queries
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
04580f775b
fix(assistant): keep query handoffs free of capability grants
All checks were successful
/ check-format (push) Successful in 17s
/ build (push) Successful in 21m45s
90695edea7
feat(assistant): guard private query tools at registered execution
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
16b146273c
test(assistant): cover registered private query execution guards
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
2da43a221b
fix(assistant): use actual SDK signatures in guard fixtures
Some checks failed
/ check-format (push) Has been cancelled
/ build (push) Has been cancelled
321a74aa1d
test(assistant): exercise SDK recovery with latest guarded wrappers
All checks were successful
/ check-format (push) Successful in 20s
/ build (push) Successful in 20m32s
1ce5889135
All checks were successful
/ check-format (push) Successful in 20s
Required
Details
/ build (push) Successful in 20m32s
Required
Details
This pull request is marked as a work in progress.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin propose/private-query-tool-guard:propose/private-query-tool-guard
git switch propose/private-query-tool-guard
Sign in to join this conversation.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lytedev/nix!1632
No description provided.