Repository navigation
DO NOT MERGE — merge train: 4436,4453,4383,4272,4361,4243,4426 - #4463
Closed
trinity-ability wants to merge 93 commits into
Closed
trinity-ability wants to merge 93 commits into
trinity-ability wants to merge 93 commits into
Conversation
…ited, the saved-token fork takes a session, and no grant rests on an agent-only check - MCP listing: each tool whose route needs a person or a signed-in session is listed through one shared predicate, so no key is shown a tool its scope can never call; within a listed scope the route still decides. The descriptions state each route's rule. - MCP refusal reasons: a backend 403 whose detail is the person_required object, or the signed-in-session sentence, maps to the human-only answer. - Audit: the human-only primitives raise HumanOnlyRefused, and an app handler records one row per refused attempt, bounded per principal and route, with no request body; the response is unchanged and an audit failure still answers 403. - Agent creation: the arm that spends the creator's saved token as the new agent's is a credential bind and takes a signed-in session. - A static scan fails any grant route that rests on an agent-only check alone; it lists one reviewed deferral. The feature-flows index carries one row for the issue. Part of Abilityai/trinity-enterprise#719
Brings in the four earlier parts of Abilityai/trinity-enterprise#719 and everything dev landed since 2026-10-27. Conflicts: - fork_to_own.py: the saved-token refusal keeps this branch's rule (a signed-in session only) and name, and takes dev's MCP-aware remedy (ent#1007). dev's test_ent1007_mcp_fork_body.py imports the renamed function. - tests/registry.json: dev's file plus this branch's three new entries and its test_human_only_principals.py description. - requirements/auth.md: both §2.8 table rows; dev's census paragraph (section §2.13) with this branch's "Not closed here". - architecture/mcp-server.md, user-docs mcp-server.md and faq: dev's rows and counts (apply_system, ask_for_credential, the fork block, 177 tools) with this branch's listing sentences; inject_credentials and setting a per-agent PAT are PERSON on dev, so the sentences say so. - feature-flows.md: dev's rows, with the issue's row on top. - feature-flows/credential-injection.md, audit-trail.md: both sides.
… person's key On dev, writing a credential the caller supplies into its own agent takes a person (the ruled exception in requirements/auth.md §2.8): POST .../credentials/inject and PUT .../github-pat are require_person. The listing still treated inject as a signed-in-session bind (shown to no key) and said setting a per-agent PAT needed a session, so a person's own user key was hidden a tool its route admits. Both now take the person predicate; the visibility tests follow (3 + 14 + 13 refusals, 10 person/interactive rows, 10 user-listed tools on a fresh install). Part of Abilityai/trinity-enterprise#719
The create_agent fork block (ent#1007) relies on the backend spending the caller's saved GitHub token. That arm makes the token the new agent's own, a credential bind, so it runs only from a signed-in session, and an MCP call never is one. The tool description and the docs that said the tool spends the saved token now say a fork made through it is refused FORK_PAT_REQUIRED for every key and is created from the web UI. Part of Abilityai/trinity-enterprise#719
The Workspace door admits the system key for the Workspace's uses, and it resolves to the admin who owns the install, so the dial's owner check alone let it release a person's held class and rewrite the guard cap (both 200 before this). Releasing is a grant in the route's own words. Both writes now refuse a caller that is not a person first, as the readiness, canvas-pin and seat-decision writes beside them do. The grant scan found both, and the agent's own seat-decision record: its two agent-only checks narrow an agent key to its running turn and grant nothing, so they are listed as reviewed non-grants. Mutation: with the two person checks removed, four system-key cases in test_ent719_workspace_autonomy_person_only.py go red and the scan reports both routes. Part of Abilityai/trinity-enterprise#719
…eir follow-up The scan's one deferral and the census baseline's remaining entries are tracked in trinity-enterprise#985, the follow-up filed for this issue. Part of Abilityai/trinity-enterprise#719
…es inject and a PAT set Follows the listing change: inject_credentials and setting a per-agent PAT take a person on dev, so the lines that said they take a signed-in session, or that a user key can only clear a PAT, now say a person's own user key reaches both. Part of Abilityai/trinity-enterprise#719
CodeQL reads url.startsWith(BACKEND) as an incomplete URL check. In these stubs it only routes a stubbed fetch, but comparing the origin says the same thing exactly and clears the alert. 70/70 pass in both files. Part of Abilityai/trinity-enterprise#719
…e-flows index rows (#4243) — mechanical, per the merge-train note on the PR Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…4243) — train decision at Gate 1, see the PR note #4232 (trinity-enterprise#341) landed on dev after this PR's last dev merge and added the send block, services/tool_access_guard.py::assert_tool_allowed, in front of nine send routes. It is a per-agent tool restriction, never a grant, so the ent#719 scan lists it under NOT_GRANT_GUARDS with the nine routes. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…cal, after a sibling landed Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…r workspace volumes Two places where apply's dry run said something different from what the real run then did: - A member apply creates from a `local:` template: the dry run marked every declared schedule `pending_template_resolution`, while the run updated a same-named template row (which keeps its own, often disabled, state) or reported the template's own rows. The snapshot now reads the template's schedules the way create does, and the plan maps them through the same function the executor uses on its post-create read, so both runs report the same changes. A predicted update error is a blocker before any write. `github:` templates are not probed and stay pending. The executor re-reads whenever the template has (or may have) schedules, even if the manifest declares none, and the real-run report lists each schedule once. - A free name whose `agent-<name>-workspace` volume is a leftover (#1667): the dry run planned `create` and the real create answered 409. The snapshot now probes it through create's own predicate (`crud.workspace_volume_exists`) and refuses with the non-retryable `member_workspace_volume_leftover`; a probe error is the retryable `member_reads_unavailable`. Create's own behaviour (409, fail-open on a probe error, the same text) is unchanged. Create mode's dry run also warns when a manifest schedule shares its name with one its `local:` template declares, since deploy keeps the template's row. A preview without a collision is unchanged. Part of Abilityai/trinity-enterprise#984
… them back - Both runs list a created member's schedules over rows in one fixed order (the post-create read is newest first, the prediction is template order). - A `github:` member's preview says its template's own schedules are known only after create, since the run now reports them. - When the executor never read a created member's schedules back (the create or the re-read failed), the real run reports them as `pending_template_resolution` again, beside the failure, never as the prediction. - Pins the stand-in row's `enabled`, the executor's own refusals of an invalid row and an ambiguous name, the planner's refusal of a repeated template name, the warning's de-duplication and the create 409 text. Part of Abilityai/trinity-enterprise#984
…19-pr5 # Conflicts: # docs/memory/architecture/mcp-server.md # docs/memory/feature-flows.md # src/mcp-server/src/tools/operator_queue.ts # tests/registry.json
…made stale #4204 (ent#1062) made the seat-decision doors agent-only, so the person path these entries described is gone and the scan reports them stale.
…ynthesis (#4228) send_message removes every staged credential value (the ent#279 runtime_secret_scrub seam) from a body before it is delivered. Neither voice send did: send_voice_reply (in-session) and send_proactive_voice (the addressed path) handed the agent's raw text to text-to-speech, so a value an agent had fetched could be sent to the TTS provider, spoken to the recipient, and hosted as a WhatsApp voice.ogg. The addressed path also wrote the first 100 characters of the raw text into the append-only audit log as message_preview, on every outcome past the gate: delivery, not_authorized, rate_limited, recipient_not_linked and suppressed. Both functions now scrub at the top, in the same shape send_message uses, so everything downstream reads the scrubbed text: the audit preview, the text_too_long cap (and the length its guidance quotes), and synthesis on every channel. The cap therefore judges what synthesis receives: the 14-char marker can make a text longer or shorter, and judging the raw text would let a note that grew past the cap through to tts_service's own cost cap, which refuses it before any provider call and surfaces it as synthesis_failed. A store outage fails open, as it does for send_message. The ent#279 parity guard now pins both voice sends as direct sinks. The tests use a value no credential pattern matches, so only the staged-value store can catch it.
…re TTS, and the parity guard pins both remaining speech sinks (#4359) synthesize_portal_tts handed the text the Workspace client sent straight to tts_service.synthesize_mp3. The reply was scrubbed when it was saved, but a value staged after that save (or text that never went through a scrubbed save) reached the third-party TTS provider as given. It now removes staged values first, the same way send_message and the voice sends do: fail-open on a store outage, and the shared cost cap inside synthesize_mp3 judges the scrubbed text. The parity guard's _REQUIRED_SCRUBBERS now lists synthesize_portal_tts and direct_voice_service._speak_sentence, so deleting either scrub turns CI red. Its comments no longer carry a count that goes stale with each new sink. Docs: the runtime-secret-scrub flow lists every speech sink, and the seam's "behaviour-neutral for OSS" docstring is corrected — OSS code stages values too. Closes #4359
…d value with edge whitespace still matches (#4359) The Workspace secret field stages a value as typed, edge whitespace included. synthesize_portal_tts stripped the request text first, which broke the exact match when the value sat at the text's edge and sent it raw to the provider. Scrub now runs on the text as sent; the strip and empty check follow. Docs: the sessions bullet moves back above the speech-sink heading, and the flow names services/gemini_voice.py tool results as an uncovered residual instead of implying the speech-sink list is complete.
…manifest trinity_version read GIT_COMMIT_SHORT, which nothing sets, so it was always "unknown". Use utils.app_version.resolve_release_version() instead.
…b at synthesis (#4228) Review follow-up on the voice-note scrub. - runtime_secret_scrub gains SPOKEN_PLACEHOLDER ("redacted") for text that is read aloud, a marker argument on scrub_text, and scrub_staged(text) for a sink that scrubs one text. The placeholder is no longer than the staging floor, so a scrub never lengthens spoken text. - Both voice sends scrub after the channel, destination and gate refusals, so a refused call never reads the store, and the cap judges the text as the agent wrote it. Its answer and the length it quotes no longer depend on what is staged, which closes a probe of the shared store through that length. The addressed path's audit preview keeps the stored marker. - tts_service.synthesize_mp3 scrubs too, so any caller (and synthesize_voice_note) is covered; it is pinned in the parity guard, which now also counts scrub_staged as a scrub call. - send_message uses scrub_staged; behaviour unchanged.
…to AndriiPasternak31/issue-4359 # Conflicts: # tests/unit/test_ent279_scrub_parity.py
…ud judges the cap as sent (#4359) Review follow-up. - DirectBridge.speak_execution scrubs each stream text block and the persisted reply before sentences() runs speakable(), which drops `__`, `**` and `~~` anywhere, so a value holding one no longer slips past an exact-match scrub on the rewritten text. A stored marker already in the saved reply is said as the spoken placeholder. _speak_sentence keeps its scrub as the floor for every line. speak_execution is pinned in the parity guard. - synthesize_portal_tts runs its refusals before it reads the store, judges the cost cap on the text as the client sent it (the spoken placeholder never lengthens text), and speaks the spoken placeholder. The status a client gets no longer depends on what is staged.
…p as written, and scrub at synthesis (#4359)
… the scrub flow (#4228) The ent#279 flow did not list the two voice sends or synthesize_mp3 as scrub sinks, nor the marker parameter, scrub_staged or the spoken placeholder this PR adds. It now does, with the rule that a cap judges text as written, the positive pins in the parity guard, the reformatted-value residual and the new test file.
…to AndriiPasternak31/issue-4359 # Conflicts: # docs/memory/feature-flows/runtime-secret-scrub.md
docker/frontend/Dockerfile deleted package-lock.json and ran npm install, so every dev-stack build floated the whole dependency tree to the newest registry versions. It now runs npm ci, matching Dockerfile.prod. The lockfile carries the musl bindings for x64 and arm64 (rolldown, lightningcss); vite 8 no longer installs rollup. Built on linux/arm64 and linux/amd64 from a macOS arm64 host: vite build succeeds and 0 installed versions differ from package-lock.json. src/frontend/Dockerfile is removed: nothing builds it and it ran npm install with no lockfile. tests/unit/test_4435_dockerfile_npm_ci.py fails when a tracked Dockerfile installs project dependencies with npm install or deletes a lockfile. Global tool installs (npm install -g) are exempt. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Conflict: tests/registry.json (both sides appended entries at the end of test_files); kept every entry from both sides.
…etires Google retires gemini-3.1-flash-live-preview on 2026-11-17 and names gemini-3.8-live as the replacement. The default in config.py and the three compose files would start failing for every deploy that never set VOICE_MODEL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…19-pr5 # Conflicts: # docs/memory/architecture/mcp-server.md # tests/registry.json
…T_GRANT_GUARDS On the merged tree the grant scan reported six routes resting on an agent-only check alone. None is a grant: - trinity-enterprise#1135 returns an ended ask to its room on the agent's next start, so start, chat, task result and system deploy/restart now reach the room wake, and through the engine's reply post, `tagger_for`. That post carries no tags (`post_message` asks for a tagger only for a sender's own tags), so the check never runs there. - trinity#4302's Continue reaches `tagger_for` the same way, and calls `assert_tool_allowed` for parity with `/messages`. Its person check is `_is_room_person` in the service.
…f digesting it (Abilityai/trinity-enterprise#863) The access snapshot only needs to notice that the stored password hash changed. It held a SHA-256 of that hash, which code scanning reads as a password hashed with a fast algorithm (py/weak-sensitive-data-hashing). The input was already the stored hash and the value was never persisted or checked against a password, but a cryptographic digest was the wrong tool for a change detector. A snapshot is compared only with another read made by the same worker process, so Python's per-process salted hash() of the stored hash is enough: it tells two hashes apart and the snapshot still never holds the hash itself. A new test pins both properties.
…y-enterprise#984 PR1 - A failed post-create schedule read with no manifest schedule is a warning, not a failure: nothing was planned to be written, so the member stays applied and its schedules are listed as pending. - A member whose create failed gets no line for its template's own schedules (there are none); its manifest entries stay pending. - The leftover-volume refusal text no longer promises an automatic reclaim the #3214 sweep does not make for unlabelled volumes. - Create mode warns about a template collision only when the manifest entry differs from the template's row in a field deploy would write. - template.yaml is read once per member per preview: _preflight_template returns the template's declared schedules, and apply's snapshot stores its verdict for the plan. - Create's guard and apply's snapshot ask one function, crud.create_volume_refusal, so a new create-time volume refusal is refused by the dry run too. - The planner's unreachable `ambiguous` branch is removed. - _apply_report reconciles a member's lines in one pass and builds the pending schedule lines from the op's entries; the plan no longer keeps a copy of them. Part of Abilityai/trinity-enterprise#984
…63-live-connections
… — mechanical, per the merge-train note on the PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 11, 2026
Merged
Contributor
|
Train complete: all seven members merged individually. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Integration surface for #4436, #4453, #4383, #4272, #4361, #4243, #4426. Never merged; members merge individually once green.
🤖 Generated with Claude Code