Repository navigation
Release: v0.8.5 - #1781
Release: v0.8.5#1781
Conversation
Points .claude at trinity-dev 57c8b5c: adds a canonical Product Quality Bar section to DEVELOPMENT_WORKFLOW.md (six adoption/ease-of-use principles) and hooks it into the dev pipeline — /create-issue (acceptance criteria), /autoplan (scope calibration → taste decisions), /implement (build-time checklist), and /review (new 4.15 catch-in-diff check). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
* chore(.claude): bump dev-methodology submodule — Product Quality Bar Points .claude at trinity-dev 57c8b5c: adds a canonical Product Quality Bar section to DEVELOPMENT_WORKFLOW.md (six adoption/ease-of-use principles) and hooks it into the dev pipeline — /create-issue (acceptance criteria), /autoplan (scope calibration → taste decisions), /implement (build-time checklist), and /review (new 4.15 catch-in-diff check). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs(announcements): v0.8.0 release announcement record (all channels) --------- Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…eme block Avatar refinement runs each identity prompt through GEMINI_TEXT_MODEL to append a fixed technical block (background #1a1f2e/#111827, indigo rim #6366f1, head-and-shoulders framing, 85mm lens, 5600K key) — the sole source of avatar color scheme and cross-generation consistency. The refinement call capped maxOutputTokens at 512. Since #1130 the default model is gemini-3.5-flash, a *thinking* model whose reasoning phase draws from the output budget. Reasoning consumed ~491 of 512 tokens, truncating the refined prompt (finishReason=MAX_TOKENS) to a ~90-char fragment that dropped the entire technical block. Avatars were then generated from a bare subject description — wildly inconsistent and off-palette. Fix in _call_gemini_text: - Disable thinking (thinkingConfig.thinkingBudget=0) — refinement is a deterministic rewrite that needs no chain-of-thought. - Raise maxOutputTokens 512 -> 4096 as headroom even when thinking stays on. - Retry once WITHOUT thinkingConfig on HTTP 400: a thinking-mandatory model (e.g. gemini-2.5-pro) rejects budget=0, and refine_prompt silently falls back to the raw prompt on error, so an unhandled 400 would re-break avatars. Verified end-to-end against the live model: all 6 technical-block tokens now survive refinement (was 0/6). Adds 3 regression tests. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
#1533) (#1554) * fix(channels): count inbound client messages on the Sharing-tab roster (#1533) The roster showed `message_count = 0` for every external client, `last_active` was frozen at `/login` time, and clients who never ran `/login` never appeared at all. All three share one cause: `get_or_create_chat_link` and `increment_message_count` (Telegram + WhatsApp) had zero callers outside the `database.py` facade. The shared inbound path writes `public_chat_sessions`, a different table, so `*_chat_links` rows were only ever created by `set_*_verified_email` — the `/login` flow. Note: the issue's Context paragraph states that `last_active` "is touched on inbound traffic via `get_or_create_chat_link`". It is not — that function was dead, and returns early for an existing row without writing anything. Revive the write path behind a default-no-op `ChannelAdapter.record_inbound_activity` hook, called once per delivered DM from `ChannelMessageRouter._handle_message_inner` at step 5c: after the access gate, so an unauthenticated stranger who messages the bot cannot create unbounded chat-link rows, and skipped for groups, since a chat link is keyed by (binding, user) and counting group traffic would list members who never DM'd the agent. Telegram and WhatsApp override it; Slack and VoIP inherit the no-op (Invariant #9). The call is best-effort — a counter write never blocks message processing. Replace `get_or_create` + `increment` with one atomic `INSERT … ON CONFLICT DO UPDATE` (`record_inbound`), which removes a cross-worker SELECT-then-INSERT race under `--workers 2`, halves the writes per message, and refreshes a stale display name via `COALESCE(excluded, existing)`. Since `increment_message_count` was `last_active`'s only live writer, one call fixes the count and the timestamp together. Delete the now-dead methods, their facade delegations, and the `_row_to_chat_link` helper they alone called. Historical counts are not backfilled; the roster's "Messages" header says so. Tests: dual-backend (SQLite + PostgreSQL) roster read-back 0->1->2, `last_active` advance, username backfill, and `/login` interplay through the real `db_backend` harness; the real `_handle_message_inner` for the DM, group, access-denied and counter-failure paths; and the adapter override bodies executed for real — mutation-verified, a typo'd metadata key turns the suite red. A facade-delegation guard covers the wholesale-mock blindness recorded in docs/memory/learnings.md. Verified against a live instance: real Telegram webhook payloads through the real transport drive the roster 0->1->2; a group message reaches the router and is not counted; an access-denied message creates no row. Follow-up #1552 records the read-time-derivation reframe (deriving the roster from public_chat_messages) that this tactical fix deliberately defers. Fixes #1533 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * test(channels): use an example.com placeholder email in the #1533 access-denied case The public-repo rule in CLAUDE.md calls for `[email protected]`-style placeholders. `[email protected]` was copied from the neighbouring access-gate test and was also inconsistent with the rest of this file, which already uses `[email protected]`. No behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…ui opt-in (#1526) (#1551) The frontend-e2e Playwright suite ran ONLY on `ui`-labeled PRs, so most PRs never triggered it and the suite rotted silently — specs broke against structural/UX changes and sat red on `dev` for weeks (four documented instances: #1134, #1508, #1378). The gate itself was the root cause. Add automatic triggers so a red suite is always visible: - Nightly `schedule` (07:00 UTC) on `dev` — the durable signal. A red nightly opens/updates a single tracking issue (new `report` job, label `frontend-e2e-nightly`), à la #1185; a green nightly closes it. - Auto-run on any PR that touches `src/frontend/**` (dependency-free `changes` job via `gh pr diff`), so frontend authors see their own breakage. - The `ui` label still works as a manual opt-in on non-frontend PRs and to force a run (preserved for the heavier @visual/@Interactive tiers, #596). - `workflow_dispatch` for on-demand runs. DECISION (AC): advisory, NOT a required merge gate. The recurring failure class is modal/overlay flake on a fresh zero-user-agent stack, so a hard gate like #715's unit gate needs a flake budget first (#596). Recorded in the workflow header. Per-job least-privilege permissions; concurrency keyed per-PR (cancel) vs per-ref (schedule, no cancel). Only @smoke runs in CI, unchanged. Related to #1526
…118 Part A) (#1555) * feat(mcp): make per-agent MCP connector OSS-core (trinity-enterprise#118 Part A) Relocate the per-agent MCP connector (ent#46/#55/#51, shipped v0.8.0 entitlement- gated as `mcp_connector`) from the private enterprise submodule into OSS core, and drop the entitlement gate front and back. Decision (Eugene, 2026-07-09): sharing agents via individual MCP connectors is a platform-adoption surface, not a paid module. Backend (router → service → db, Invariants #1/#2/#14): - routers/connector.py — /api/agents/{name}/connector* (config, mint/regenerate/ revoke key, playbooks), mounted unconditionally in main.py; no requires_entitlement. - services/connector_service.py — snippet builder + playbook resolution. - db/connector.py (ConnectorOperations) — config CRUD + scoped-key mint/revoke into mcp_api_keys (scope='connector'); facade delegators on database.py. - models.py — ConnectorConfigUpdate/Status/KeySecret/Playbook/ClientSnippet. Schema: enterprise_connectors table re-homed onto OSS dual-track (db/tables.py, db/schema.py, db/migrations.py:enterprise_connectors_table + Alembic 0015_enterprise_connectors). Name kept so existing enterprise installs adopt their data with zero migration (CREATE TABLE IF NOT EXISTS, no duplicate-table drift). Delete/rename cascade via an enterprise_connectors AGENT_REF. Frontend: ConnectorChannelPanel un-gated in SharingPanel.vue (dropped the isEntitled('mcp_connector') v-if + the now-unused enterprise store wiring). The MCP proxy tools (connector.ts), the connector-scope auth fence (dependencies.py), and ExposedToolsPanel.vue were already OSS and edition-agnostic. `mcp_connector` is removed from the entitlement registry by the paired enterprise PR (deletes register_module). Docs: requirements mcp.md §7.5 + feature-flows/mcp-connector.md + architecture/index. Tests: tests/unit/test_118_mcp_connector_oss.py (11) — service helpers, config CRUD, key mint/regenerate/revoke, scope='connector' validate contract. Part B (email-auth onboarding, #848) deferred pending design sign-off. Related to trinity-enterprise#118 Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * chore(submodule): bump enterprise to post-#121 so the connector isn't double-mounted (#118) #1555 makes the per-agent MCP connector OSS-core. The enterprise submodule was pinned at 630cca9e, which still ships backend/mcp_connector/ and registers it via register_enterprise() — so an enterprise build would double-mount the connector router alongside the new OSS-core one. Bump the pin to f5d69be6 (enterprise main post trinity-enterprise#121), where the private module is removed. This forward-integrates two already-on-enterprise-main commits into the pin: - trinity-enterprise#121 — removes backend/mcp_connector/ (the intended pair) - trinity-enterprise#120 — ENTERPRISE_LOCAL_DEV docs (docs only) - trinity-enterprise#106 — client-portal umbrella (already on enterprise main) OSS-only CI is unaffected (submodule is update=none / "boots without enterprise"). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> Co-authored-by: Eugene Vyborov <[email protected]>
…g-token-truncation fix(avatar): prevent thinking-token truncation dropping the color-scheme block
chore(.claude): bump dev-methodology — Product Quality Bar
chore: back-merge #1553 (email-header outlined logo) main → dev
…ication ENTERPRISE.md documents the open-core seam mechanism (correct) but never said WHERE the feature-level OSS/enterprise split lives or WHY it isn't here. Add a short "Why there's no feature catalog here" note: the standing rule trinity-enterprise#45 (enforced by enterprise-docs-guard.yml) keeps the paid-feature catalog private, and entitled customers find it in the private enterprise repo. Point readers at the runtime source of truth for "what's enabled on this instance" (GET /api/version + feature-flags). Mechanism-only, no named features — enterprise-docs-guard grep verified green. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Record of the "sovereign, isolated AI agents per client" webinar video announcement (https://youtu.be/8w98dA6hDew) sent via /announce to Discord, Slack, Telegram, Twitter/X (trinity + default), and GitHub Discussions. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Bumps the patch-and-minor group in /src/mcp-server with 1 update: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node). Updates `@types/node` from 26.1.0 to 26.1.1 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-version: 26.1.1 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: patch-and-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…t lifecycle (#1560) (#1568) * fix(reliability): clear per-agent Redis runtime state across the agent lifecycle (#1560) `agent:circuit:{name}` (transport breaker) is keyed by agent NAME, not container identity, and carries no TTL. Nothing in the lifecycle cleared it, so a container replaced under the same name inherited its predecessor's `dormant` verdict and fast-failed every execution with "Agent circuit breaker open — agent is unhealthy" — without the backend ever contacting the agent. Adds `services/agent_runtime_state.py` as the single enumeration point for every name-keyed per-agent Redis keyspace (the Redis-side twin of the `AGENT_REFS` registry in `db/agent_cleanup.py`), with two entry points whose blast radii differ by whether a container is running: clear_agent_breakers heartbeat + transport circuit + dispatch breaker (safe on a live container) clear_agent_runtime_state the above + execution slots (teardown paths only — force_clear_slots would drop capacity accounting for an in-flight #1083 execution) Wired into six lifecycle points. The issue's acceptance criteria named delete, rename and create; none is the reachable path: * create is unreachable — `is_agent_name_reserved` sees soft-deleted rows and 409s, locking the name for the whole retention window; * the name only unlocks at the retention purge, which cleared no Redis state; * the reachable path is `start_agent_internal`, whose `needs_recreation` branch replaces the container on any config drift (subscription switch, resource change, auth-token rotation), so one fleet-wide rotation resurrects every stale verdict. So start/recreate, purge, and the `trinity-system` bootstrap were added beyond the written criteria. The start-path clear runs before the recreate, since `containers_run(detach=True)` brings the replacement up, and is guarded on `needs_recreation or not was_already_running` so a no-op start cannot reset a breaker protecting a wedged agent. Tests: a bidirectional parity guard fails CI when a new `agent:*` keyspace ships unregistered; wiring tests pin all six call sites and that lifecycle.py never clears slots; an integration test exercises the real Lua (fakeredis has no EVALSHA) plus an opt-in leg driving the full recreate path over HTTP. Both guards are mutation-tested. Complementary to #1561, which removes the source of breaker poisoning; this removes the inheritance. Both are needed. Fixes #1560 Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> * test(1560): stop bare sys.modules mutations in the new test files (#762) The `lint (sys.modules pollution check)` CI gate flagged 7 new violations. They were real, not a lint technicality: the integration test replaced `sys.modules["services"]` with a bare stub module and never restored it, so every later test in the same session that imported the real `services` package would have seen the stub — the exact cross-file pollution class #762 introduced this gate for. - Unit files: drop the `sys.modules[mod_name] = module` registration in `_load` entirely. `agent_runtime_state.py` is a stdlib-only leaf with no `@dataclass` needing `sys.modules[cls.__module__]` to resolve annotations, so the registration bought nothing and risked pollution. Per-test stubs already go through `monkeypatch.setitem`, which restores itself. - Integration file: keep the bindings (they are what makes the production lazy imports resolve to the real modules against real Redis — monkeypatch cannot reach an import performed inside the function under test) and add the sanctioned `_STUBBED_MODULE_NAMES` + autouse `_restore_sys_modules` snapshot/restore pair, per tests/unit/test_telegram_webhook_backfill.py. Verified: `python tests/lint_sys_modules.py` clean; running the integration file followed by a suite that imports the real `services` package passes. Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…ump (#1563) The fleet permissions matrix was hard to read (text-xs, 32px cells) and the grid jumped on every grant/revoke: the toast rendered inline between the toolbar and the grid, so it pushed the grid down on appear and snapped it back on the 3.5s auto-dismiss. - Bump base font (text-xs → text-sm), cells (w-8 h-8 → w-11 h-11), checkmark (text-base), row/column agent labels (font-medium), corner hints (10px → text-xs), and column-label headroom (8rem → 10rem). - Move the toast into a reserved min-h-[2.5rem] slot so appear/dismiss no longer reflows the grid. Presentation-only — grant/revoke logic and endpoints unchanged. Grant/revoke verified end-to-end via the backend API. Related to #1562 Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…gents (#1561) (#1565) `list_git_enabled_agents()` selected from agent_git_config on sync_enabled alone, without joining agent_ownership or excluding deleted_at. Soft delete keeps the git_config row, so the 60s SyncHealthService poller kept issuing HTTP calls to removed containers forever — each httpx.ConnectError poisoned the transport circuit breaker, eventually driving it DORMANT and emitting a bogus circuit_breaker_dormant operator-queue alert for a nonexistent agent. GET /api/fleet/sync-audit (same accessor) also listed dead agents. - Join agent_ownership + filter deleted_at IS NULL, mirroring the #834 hardening on list_all_enabled_schedules(). Fixes both consumers at once. - git_service.get_git_status: bare print() → logger.warning (structured). - Regression tests: soft-deleted agent is excluded from the accessor and never polled (zero HTTP, no sync_state row, no operator-queue entry). Audit sweep (per AC): list_git_enabled_agents was the sole background-loop accessor missing the deleted_at filter. Other per-agent HTTP pollers (monitoring, operator-queue) enumerate from Docker, so removed containers are inherently excluded; scheduler already filters (#834); capacity drain is DB-only (no agent HTTP). Companion breaker-inheritance defect tracked in #1560. Related to #1561 Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
…04 (Phase 4) (#1497) * test(canary): unblock canary_invariants fixture broken by #1472 merge Two pre-existing breakages landed via #1472 (367a5e1, merged today) in root-level tests/test_canary_invariants.py — a file the CI unit job (tests/unit/ only) does not run, so they merged undetected: 1. Duplicate `CREATE TABLE agent_schedules` in the `canary_db` fixture DDL — the E-06 work added a second definition next to the pre-existing one, so `executescript` raised "table agent_schedules already exists" and every fixture-dependent canary test errored. Removed the older, unused block (its `message`/`owner_id` columns have no consumer; `_add_schedule` and the E-06/L-03 collectors use only the kept block's columns). 2. `test_run_invariants_all` expected registry set omitted "E-06" (added to the invariants registry by the same PR). Added E-06 to the expected set and asserted it is green on a clean platform. Restores a green baseline (92 passed) so the #1450 B-01 work can be verified. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(canary): B-01 queue-status coherence — backend-consistent Side B + confirm-re-read (#1450) B-01 compared two reads that were neither temporally atomic nor backend-consistent (both latent while the canary is default-OFF and SQLite makes the two reads hit one file): (a) Temporal non-atomicity — a concurrent enqueue/backlog-drain landing between the two reads produced a transient count mismatch → spurious critical + green→red Slack alert. (b) Backend divergence (#300/#1093) — Side A (`db.get_queued_count`) honors `get_engine()`/DATABASE_URL; Side B read raw sqlite3 at DB_PATH. On Postgres those are two different databases, so B-01 compared Postgres truth to a stale/absent SQLite file (fatal under the Postgres direction + SQLite EOL, #1278). Production-side residue of #1446 (PR #1452), which fixed only the test-harness `sys.modules` leak and deferred these two gaps. Fix (localized to B-01): - New `_collect_queued_ids_via_engine` reads B-01's Side B through the SAME `get_engine()` seam as the accessor, on a dedicated `queued_ids_via_engine` snapshot field. Independent code path (SELECT id/literal 'queued' vs COUNT(*)/the QUEUED enum) — shares a database, not a code path, so a cache/status-filter regression still surfaces (non-tautology, AC #3). No cache / second count of the queue (AC #4). - The collector performs one confirm-re-read on a mismatch: a transient race self-heals; a persistent drift survives and fires (AC #2). An engine-read or unconfirmable confirm degrades to a B-01 skip — it never compares an engine count against the raw-sqlite id-set (the blocker the reviews surfaced). - `queued_exec_ids` (raw sqlite) stays untouched for B-02/E-02, so blast radius is B-01-only and the sibling #1077 merge stays clean. The running-side / known-agents reads remain raw-sqlite (half-migrated collector); the collector-wide migration + a dark-canary tripwire are a filed follow-up. Tests (test_canary_invariants.py): retarget the synthetic B-01 tests at `queued_ids_via_engine`; add the AC #5 regression net — a diverged-backend proxy (raw ≠ engine temp files) that false-fires pre-fix and is green post-fix, a transient-race confirm-absorb + persistent-drift-still-fires pair, and an engine-read-failure→skip test. New split fixtures (`canary_db_split` / `reload_canary_split`) model the diverged backend without a live PG. Convert the file to the sanctioned `_STUBBED_MODULE_NAMES` + `_restore_sys_modules` escape hatch so its import-time stubs no longer leak (the #1446 mechanism) and the reimport `del`s are lint-clean. Docs: architecture.md Canary B-01 row updated for the engine-backed read path + confirm-re-read. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(feature-flows): add #1450 canary B-01 Recent Updates row Sync-feature-flows: canary-internal change, no dedicated flow doc (architecture.md is canonical); append one Recent Updates row. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(canary): fix duplicate agent_schedules DDL + reconcile E-06 in registry test The canary_db fixture had two `CREATE TABLE agent_schedules` statements in one executescript (a #1472 merge artifact), so it raised `table already exists` and reddened the whole file. Merge them into one definition carrying every column the canary reads (next_run_at/enabled/deleted_at + agent_name). Add duration_ms/queued_at/backlog_metadata to schedule_executions and extend _add_execution for the #1077 E-03/E-04 collector work. Reconcile E-06 (already registered) into test_run_invariants_all's expected key-set. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(canary): terminal-row collector for E-03/G-03 (#1077) Add _collect_terminal_rows(window_seconds) + Snapshot.terminal_rows. Windowed on started_at (not completed_at, so E-03 can see NULL-completed_at rows), scoped to success/failed/cancelled via a local _E03_TERMINAL_STATUSES subset that excludes skipped (which legitimately has no completed_at/duration_ms). PRAGMA guard skips the source entirely when completed_at/duration_ms are absent (column-absent != value-NULL) rather than false-firing. Window = max per-agent timeout + 300s; bounded ORDER BY started_at DESC LIMIT 5000 with a logged sampled flag (no (status,started_at) index over 90-day retention; tripwire, not backfill audit). Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(canary): register E-03 (completed_at populated) + G-03 (clock sanity) (#1077) E-03 (A/major): terminal rows must have completed_at NOT NULL. Predicate is completed_at-only — the catalog's + duration_ms clause false-fires on healthy queue-terminated rows (cancel/fail/expire set completed_at but never duration_ms). G-03 (A/minor): started_at <= completed_at with a ~1s cross-worker clock-skew tolerance, UTC-aware parsing (E-06 _to_utc shape) so a #1474 mixed naive/Z pair compares without raising. Both are leading-edge tripwires over the shared terminal-row collector and catch all producers incl. the standalone scheduler's raw-SQL writers a unit test never exercises. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(canary): E-03/G-03 synthetic + collector + end-to-end coverage (#1077) Per-invariant synthetic tests (holds-clean, fires-on-violation), collector tests (started_at window in/out, NULL-completed_at still collected, skipped-status excluded, column-absent DDL -> unavailable, LIMIT cap + sampled flag), and end-to-end collect_snapshot tests through the real collector: the C1 cancelled-from-queue holds-clean guard (completed_at set, duration_ms NULL -> zero E-03), half-written fires E-03, bad-clock fires G-03, sub-second skew does not, and the #1474 naive-vs-Z compare-without-raising case. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(canary): document E-03/G-03 Phase 4 invariants (#1077) architecture.md canary table gains E-03/G-03 rows + Phase 4 lookup-key line; requirements/infrastructure.md §31 gains a Phase 4 bullet (and reconciles the stale 'Phase 2 deferred' note now that #882/#1472 shipped); orchestration-invariant-catalog.md annotates E-03/G-03 as shipped with explicit registry-id mapping, notes the E-03 completed_at-only predicate deviation and G-03 started_at<=completed_at reduction, and flags the catalog-id vs registry-id E-06 drift (catalog #129 != registry #1472). Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(feature-flows): index row for canary Phase 4 E-03/G-03 (#1077) Canary is an internal invariant harness (no user-facing flow / dedicated flow doc); follows the #1446 precedent of a Recent Updates row pointing at architecture.md. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(canary): queued-row metadata collector for E-04/G-04 (#1077) Capture queued_at + backlog_metadata for status='queued' rows in the existing _collect_executions query, keyed by execution_id in a new AgentSnapshot.queued_meta map. Both columns are PRAGMA-guarded (added by BACKLOG-001): when either is absent on an older/minimal DDL the map is left empty so E-04/G-04 skip those eids (older-image fail-open). Scoped STRICTLY to queued rows — never terminal — so #1449's deferred terminal-row backlog_metadata NULL-out cannot make E-04 false-fire. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(canary): register E-04 (queued metadata) + G-04 (no creds in metadata) (#1077) E-04 (Tier A, major): every status='queued' row has queued_at NOT NULL AND a non-NULL, JSON-parseable backlog_metadata — the backlog_service.drain_next replay contract. A malformed blob raises JSONDecodeError and stalls the FIFO. Reports only the failed-predicate reason code + ids, never the raw metadata (may carry credentials; violations persist to canary_violations). G-04 (Tier A, critical): a queued row's backlog_metadata matches no known secret prefix (sk-/ghp_/gho_/ghs_/ghu_/github_pat_/xoxb-/xoxp-/ AKIA/AIza/sk_live_), word-boundary anchored so common substrings don't false-fire. Rides E-04's collected bytes. Reports only the matched pattern NAME + ids, one violation per row (stops at first match) — never the secret, surrounding bytes, or raw metadata. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(canary): E-04/G-04 synthetic + collector + end-to-end coverage (#1077) Collector test proves queued_meta is populated for queued rows only (a terminal row carrying backlog_metadata is excluded — #1449-safe). E-04: holds on valid rows; fires with the right reason code on NULL queued_at, NULL backlog_metadata, and non-JSON metadata; skips an eid absent from queued_meta (older-image fail-open); e2e over a real temp DB. G-04: holds on benign metadata (incl. "task-" substring that must not false-fire); fires on github_pat / openai / slack / aws exemplars; skips NULL metadata (E-04 owns it). Every G-04/E-04 test asserts the secret / raw metadata bytes appear NOWHERE in the persisted violation record. The runner test now expects E-04 + G-04 in the registered invariant set. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(canary): document E-04/G-04 Phase 4 invariants (#1077) architecture.md lookup-key table gains E-04 + G-04 rows and the Phase 4 line now lists all four (E-04/G-04 stacked on #1450). requirements infrastructure.md Phase 4 bullet expands to the full four-predicate set with the credential-safety note. Catalog flips E-04/G-04 from "gated on #1450" to SHIPPED, records the json.loads-vs-json_valid implementation note, the queued-only scope, older-image fail-open, and the report-reason/pattern-name-only security discipline; G-04 notes the implemented check covers the backlog half of the title (log-line scanning out of scope for #1077). Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(feature-flows): index row for canary Phase 4 E-04/G-04 (#1077) Also corrects the header/separator ordering left malformed by the earlier E-03/G-03 index-row commit (a data row had slipped above the |---| separator). Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Eugene Vyborov <[email protected]>
…NABLED, PUBLIC_ACCESS_REQUESTS_ENABLED through compose (#1485) (#1493) * fix(config): honor cross-tool DO_NOT_TRACK convention for operator intake (#1486) The operator-intake kill switch only disabled the outbound POST when DO_NOT_TRACK was one of {"1","true","True"}, so DO_NOT_TRACK=yes|on|2|TRUE leaked despite the obvious opt-out intent — breaking the very consoledonottrack.com convention config.py's own comment cites. Flip to a tracking-allowed whitelist: any value not in {0,"",false} (case/space-insensitive) disables intake. Unset -> "0" -> tracking allowed (unchanged). Add tests/unit/test_1486_do_not_track_truthiness.py so a revert to the exact-tuple check fails loudly. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(config): forward operator-intake, dispatch-breaker & public-access levers through compose (#1485) Same packaging-gap class as PR #1067 (VOIP vars): a lever read by src/backend/config.py that neither compose file forwards into the backend container, so setting it in .env silently no-ops (compose reads .env only for ${VAR} interpolation, and neither backend service uses env_file). Forward in both docker-compose.yml and docker-compose.prod.yml backend environment: blocks, mirroring the existing PUBLIC_CHAT_URL idiom: - PUBLIC_ACCESS_REQUESTS_ENABLED (#1488) — secure default false - OPERATOR_INTAKE_ENABLED / DO_NOT_TRACK / OPERATOR_INTAKE_URL (#1486) privacy kill switch. OPERATOR_INTAKE_URL keeps its FULL non-empty default — a bare :- would arrive set-but-empty and shadow the code default (#1076 set-but-empty class). - DISPATCH_BREAKER_ENABLED (#1487) — global gate for the #526 dispatch breaker; without it the owner-facing PUT .../circuit-breaker toggle silently no-ops (two-tier gating needs both flags on). .env.example: add the missing DISPATCH_BREAKER_ENABLED block (documenting the two-tier gate) and a settable DO_NOT_TRACK=0 line. Backend-only — src/scheduler reads none of these five vars. Fixes #1486 Fixes #1487 Fixes #1488 Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(feature-flows): note DISPATCH_BREAKER_ENABLED compose-forwarding fix (#1487/#1485) The dispatch-circuit-breaker flow already documented the DISPATCH_BREAKER_ENABLED env var, but before this PR that var never reached the container (the #1039/#1067 packaging-gap class), so a reader following the doc would set it and the owner toggle would silently no-op. Add a one-line Config-surface accuracy note + a Recent Updates index row. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Eugene Vyborov <[email protected]>
…how correct relative times (#1474) (#1496) * fix(scheduler): serialize timestamps as UTC with explicit 'Z' (#1474) The standalone scheduler wrote execution/schedule timestamps via datetime.utcnow().isoformat() (no 'Z'), while the backend writes through utc_now_iso() (Z-suffixed). In a non-UTC browser, JS new Date(naive) parses the naive string as local time, shifting schedule-triggered rows by the viewer's UTC offset. Data on disk was fine; only display was wrong. Vendor a byte-parity mirror of the backend timestamp helpers into src/scheduler/utils.py (same regenerate-from-backend discipline as failure_classifier.py): utc_now_iso / to_utc_iso emit 'Z'; parse_scheduler_ts reads tolerantly and returns naive UTC. Write + read land together (atomic): once writes emit 'Z', datetime.fromisoformat("...Z") returns a tz-aware value on 3.11+, and the duration math (datetime.utcnow() - started_at) would raise aware-naive. parse_scheduler_ts converts-then-strips so the historical naive model type is preserved and the subtraction stays naive-naive. All 24 read-parses route through it; every write site (started_at/completed_at/last_run_at/next_run_at/ retry_scheduled_at/validated_at + process-schedule variants) emits 'Z'. Updates the #1472 next_run_at comments to note the mapper now returns naive-UTC (instant preserved), so both compare branches stay correct. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(executions): normalize naive timestamps to UTC 'Z' at read boundary (#1474) The summary/list readers returned raw dict(row) values straight from the DB, so a scheduler-written naive started_at/completed_at serialized naive out of Pydantic and JS new Date(naive) parsed it as local time — the reported schedule-triggered relative-time shift. This fixes historical rows for all consumers at the source (unit-testable, unlike the frontend layer). Reuse the existing parse_iso_timestamp helper (assume-UTC for naive) + the Z-emitting to_utc_iso — the same normalization the already-correct sibling readers (_row_to_execution) apply — via a small _norm_ts shim: - db/schedules.py: get_agent_executions_summary (TasksPanel), get_fleet_executions (ExecutionsPanel), get_agent_schedules_summary last_run_at (Overview/Schedules). - db/activities.py: _row_to_activity / _mapping_to_activity (UnifiedActivity) started_at/completed_at/created_at. None passes through untouched. No data migration. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(ui): parse backend timestamps as UTC in the 5 execution panels (#1474) Defense-in-depth for the read side (covers WebSocket-pushed timestamps and any un-audited endpoint, alongside the backend read-boundary fix). Each panel hand-rolled `new Date(backendStr)`, which parses a naive (no-'Z') string as *local* time. Replace only the internal parse with the shared idempotent `parseUTC` (appends 'Z' when no tz indicator present → correct for legacy-naive, new-'Z', and '+00:00' alike); `new Date()` "now" calls are left untouched and per-panel display formats are unchanged. - TasksPanel: formatRelativeTime + inline log-detail timestamp - SchedulesPanel: formatRelativeTime, isOverdue, formatOverdue, formatDateTime - ExecutionsPanel: timeAgo - UnifiedActivityPanel: formatTime - OverviewPanel: fmtDateTime Established pattern (stores/network.js, ReplayTimeline.vue). Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs: record #1474 scheduler Z-suffix + read-boundary under Invariant #16 Extend Architectural Invariant #16 (the #476 ISO-Z rule) with its write-side/ read-boundary cousin: the scheduler vendors src/scheduler/utils.py (Z-suffixed writes, naive-UTC tolerant reads); the leaking backend read boundaries normalize via parse_iso_timestamp; the 5 panels parse via parseUTC. Notes honestly that next_run_at stays mixed-format across writers (safe — Python-compared only) and that main.py SchedulerStatus.last_check is out of scope. Update the #1472 learnings entry: the scheduler DB mapper now returns naive-UTC (convert-then-strip, instant preserved), so the "schedules store AWARE next_run_at" premise is true of the backend writer, not the scheduler read path. Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs(feature-flows): document #1474 scheduler Z-suffix timestamp contract Add a "Timestamp serialization contract (#1474)" subsection to scheduler-service.md (vendored utils.py, Z writes, naive-UTC tolerant reads, backend read-boundary + panel normalization, next_run_at mixed-format caveat) plus a Revision History row; add the index Recent Updates row. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(scheduler): cover _update_business_status validated_at Z-suffix (#1474) The service-layer VALIDATE-001 write path (service.py::_update_business_status) is the one #1474 timestamp write site outside database.py. Add sibling-path coverage per the incomplete-fix rule: assert validated_at is stored 'Z'-suffixed. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]> Co-authored-by: Eugene Vyborov <[email protected]>
…pages One page per topic (getting started, agents, chat/sessions, credentials, scheduling, collaboration, channels, MCP/API, operations, sharing, deployment, security, advanced, troubleshooting) plus a generated question index. Answers derived from user docs and verified against code; .claude pointer picks up the generate-user-docs FAQ step. Co-Authored-By: Claude Fable 5 <[email protected]>
… authentication Co-Authored-By: Claude Fable 5 <[email protected]>
New src/helper-mcp/ package (@abilityai/trinity-docs-mcp): an npx-runnable stdio MCP server exposing the public ask-trinity docs Q&A endpoint (DOCS-QA-001) to any MCP client — no Trinity instance or API key required. - Tools: ask_trinity (multi-turn; detects the endpoint's silent session reset and warns when context was lost) + get_agent_requirements (agent guide fetched live from GitHub, quick-reference fallback) - Guards: 4k question cap, 50s abort timeout, no auto-retry, redirect:"error", non-JSON guard, structured error text; session_id handled as opaque string (live values exceed 2^53) - Deps: official @modelcontextprotocol/sdk + zod only; console.error-only logging (stdout is the JSON-RPC channel); Node >=18 launcher guard - Tests: 26 unit (mocked fetch) + pack-and-run stdio smoke test asserting JSON-RPC stdout purity; CI workflow helper-mcp-test.yml - Publish: publish-helper-mcp.yml (npm provenance; documented one-time manual first-publish bootstrap for trusted publishing) - Corpus: sync-docs-to-vertex.yml now also indexes the agent guide; feature flow corrected (user-docs/FAQ were already indexed) and extended with the verified endpoint contract (no citations field, silent session expiry) - Docs: requirements/mcp.md entry, README + user-docs install blocks, package README Fixes #1459 Co-Authored-By: Claude Fable 5 <[email protected]>
…e + spawn provenance (trinity-enterprise#69)
Disposable "ghost" agents: created with a hard budget (max_executions and/or
TTL — expiry ALWAYS stamped, ceiling 24h default), volume-less (container
writable layer; ghosts never recreate), hard-discarded at budget with no
soft-delete/retention/name-reservation. Creation is entitlement-gated
(ephemeral_agents; fail-closed — inert until the enterprise module registers);
all lifecycle mechanics are edition-agnostic OSS primitives.
Lifecycle:
- Schema: 5 additive agent_ownership columns (is_ephemeral, budget, expiry,
spawned_by_agent/key_id); dual-track migration (SQLite + Alembic 0016)
- Creation gates (crud.py): entitlement 403 → ephemeral-caller refusal
(chain-spawn kill) → per-parent spawn rate limit → TTL ceiling 400 →
server-suffixed name (hex8) → atomic per-owner Redis quota (INCR-with-cap,
NX reseed, DB fallback); ghosts skip volume/avatar/cred-injection/auto-sync,
default max_parallel_tasks=1
- Budget: gate at the TOP of CapacityManager.acquire (terminal+active >= max
or expired ⇒ EphemeralBudgetExhausted → 410 Gone / FAILED
ephemeral_exhausted; covers every admission surface); post-CAS-win
apply_result hook (backgrounded, fail-open) triggers discard at budget
- Hard discard (services/agent_service/ephemeral.py): SETNX-locked,
crash-convergent — intent marker → CAS-fail non-terminal rows
(ghost_discarded) → force-remove container → clear Redis state BEFORE purge
→ cascade purge (executions KEEP) → audit. DELETE routes ghosts here before
the container lookup (half-discarded state force-discardable)
- GC (cleanup_service._sweep_ephemeral_agents): DB pass + Docker-as-truth
orphan pass with 15-min newborn grace; capped per cycle
Part 2 — spawn provenance + parent control:
- Any agent-spawned creation persists spawned_by_agent/key_id and auto-grants
the agent_permissions parent→child edge (created_by="spawn:{parent}") so a
parent can immediately chat/list/info the child it spawned
- BEHAVIOR CHANGE: agent-scoped keys may start/stop/delete ONLY agents they
spawned (name AND key-id match; interim until #948); sharing, permission
grants, rename, and credential ops are now human-only (403 for agent keys)
- Ghost-key containment fence at the single auth entry point: a ghost's own
key reaches only heartbeat/result-callback/reports/notifications/self-info
Fleet hygiene: heartbeat watch + fleet health exclude ghosts; operator-queue
polling keeps them; exec/cost stats stay inclusive; schedules on ghosts → 400;
AgentStatus.ephemeral surfaced + GHOST badge.
Tests: tests/unit/test_69_ephemeral_agents.py (40, db_harness real-engine) —
accessors, facade delegations, acquire-gate matrix, key-fence matrix, Part 2
guard matrix, budget hook, discard idempotency/crash-convergence, atomic
quota. Full unit suite verified; residual order-dependent flakes reproduced
on clean dev (pre-existing, documented in learnings.md).
Refs abilityai/trinity-enterprise#69 (Phase 0 record on the issue; closed
manually at release — cross-repo keywords don't auto-close).
Co-Authored-By: Claude Fable 5 <[email protected]>
…— fixes seed-12345 order flake CI's regression-diff (head seed 12345) caught the discard test flaking: string-form monkeypatch targets resolve through sys.modules at PATCH time, which under some pytest-randomly orderings is a sibling test's leaked stale entry — the patch lands on the wrong module object while discard's call-time import (under the _own_real_modules pin) resolves the real one, so get_agent_container fell through to the real function (container=None, removal skipped). Same hazard removed from the gated_capacity and ghost_fence fixtures (bare fixture-time imports), and the audit assertion moved to an instance-method patch on the pinned singleton. Verified: full suite green under all three CI seeds (12345/67890/99999), 3775 passed each. Co-Authored-By: Claude Fable 5 <[email protected]>
… entries — patch by object Co-Authored-By: Claude Fable 5 <[email protected]>
feat(helper-mcp): standalone Trinity docs Q&A MCP server (#1459)
…026-07-10 docs(announcements): webinar video announcement record 2026-07-10
docs(enterprise): explain the private feature catalog + runtime verification in ENTERPRISE.md
…host-agents # Conflicts: # docs/memory/learnings.md
…ents feat(agents): ephemeral ghost agents — budgeted hard-discard lifecycle + spawn provenance (trinity-enterprise#69)
…odules-leak flake (#1582) (#1584) The trio (test_acquire_clamps_above_ceiling / test_get_slot_state_clamps / test_get_all_states_clamps_each) failed order-dependently under pytest-randomly on clean dev (5/7 observed runs), passed in isolation and under -p no:randomly. Root cause (the #762/#1446 family): `_patch_ceiling` patched `get_max_parallel_tasks_ceiling` on the settings_service resolved via `from services import settings_service`, but `capacity_manager.acquire` imports `clamp_to_ceiling` at call time from `services.settings_service`. When a sibling's module-level stub (e.g. test_fleet_status_resilience installing a fresh `services` package with a real `__path__`) leaves two module objects for `services.settings_service` in play, the patch lands on one and `clamp_to_ceiling.__globals__` reads the other — the patch is silently never hit and the clamp assertion sees the unpatched (default) ceiling. Fix (the pattern documented for this leak family): - Capture the real `services` / `services.settings_service` / `services.capacity_manager` at collection time (this file sorts before every known leaker, so the import is leak-free). - Autouse fixture re-pins them into sys.modules per test (monkeypatch auto-restores) so the code-under-test's call-time import and the test's patch target resolve to the SAME object — last-write-wins over any leak. - `_patch_ceiling` now patches the captured real module object directly, never a bare re-import that could resolve a leaked stub. Verification: 25/25 in the file; 4/4 trio; 32 passed across 6 random seeds with test_fleet_status_resilience co-resident; 111 passed / 0 ceiling failures across 5 full-unit randomized seeds. Related to #1582 Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
SlackAgentBotPanel: configure an agent's dedicated Slack bot from the Sharing tab, mounted beside the existing workspace SlackChannelPanel. - Entitlement-gated on `slack_per_agent_bots` via the enterprise store, so it is hidden entirely in OSS / unentitled builds — never a blank or broken section. - Paste bot (xoxb-) + app-level (xapp-) tokens; on save the backend validates them against Slack auth.test and the panel then shows the RESOLVED identity (bot name, bot_user_id, team) rather than echoing anything secret. Tokens are write-only — a read never returns them. - Enable/disable without re-entering credentials, replace tokens, and remove. - Refusals surface the backend's NAMED code (wrong token type, bot already bound to another agent, Slack unreachable) instead of a generic failure, so the operator knows what to fix. Verified the component compiles under Vite (HMR, no build errors); the flows themselves still need a live per-agent Slack app to exercise end to end. Related to trinity-enterprise#222
…nt#224)
The e2e job failed the mcp-server image build:
src/tools/chat.ts(296,9): error TS2353: Object literal may only specify known
properties, and 'parent_execution_id' does not exist in type '{...}'
chat.ts passed parent_execution_id into apiClient.task(), but the client's
options type never declared it, so tsc rejected the call and the Docker build
exited 2.
Two changes, because the type fix alone is not enough: the request body in
client.ts is assembled field-by-field rather than spread, so the property would
have been silently DROPPED at runtime even once it compiled — the delegated task
would never have inherited the channel context and ent#224 would have been a
no-op in production. Declared it on the options type AND forwarded it into the
body.
Verified with the same toolchain CI uses: tsc --noEmit clean, npm run build
exit 0, 87/87 mcp-server tests pass.
Related to ent#224
The base-vs-head regression diff flagged two new failures:
test_1649_group_message_history.TestRoutersPersist
::test_slack_router_persists_at_the_posted_ts
::test_slack_router_uses_the_parent_thread_when_replying
Both stub get_slack_channels_for_agent with a binding dict that has no
allow_proactive, so the ent#223 consent gate refuses the post with 403 and the
send — the thing these tests actually assert on — never happens. The tests cover
#1649 persistence, not consent, so the fixture should represent a CONSENTED
channel.
Also fixed the third stub in the same class, which the diff did NOT flag because
it was passing for the wrong reason: test_slack_router_does_not_persist_a_failed
_send asserts pytest.raises(HTTPException), and the consent 403 is an
HTTPException — so it short-circuited before ever reaching the 502 send-failure
path it exists to cover. A false green is worse than a red.
Related to ent#223
…#224) Both findings in this PR were classes, not one-offs, and /autoplan reads this file before planning: * a capability-GRANTING endpoint must reject agent principals — ownership and role checks all pass for an agent's own key, because it resolves to the owner; * a new egress sink inherits the payload's credential hazard but not the sanitisation the original sink applied. Related to ent#223, ent#224
…re Slack (ent#223/#224) Two critical findings from /review, both invisible to the existing tests, which covered the db/service layer but neither the PRINCIPAL nor the EGRESS. C1 — an agent could grant ITSELF proactive consent. set_slack_channel_proactive gated only on can_user_share_agent, but an agent-scoped key resolves to the OWNER on REST (dependencies.py:423), so that check passes for the agent's own key. The agent could flip on the exact control ent#223 adds, making consent self-serve. Added reject_agent_principal: granting consent is a human decision; SENDING under it stays agent-callable. Same class as trinity-ops-agent#232. C2 — unsanitised failure text was posted into a customer Slack channel. The #1578 emit chokepoint credential-sanitises summary_or_error before egress precisely because a failure terminal can carry secrets (event_dispatch_service.py:311). This sink reused that payload, truncated it, and never sanitised — so a token in an error message would be posted verbatim to a persistent, externally hosted, human-visible surface. Now sanitises over a 2x window BEFORE truncating, the same order #1578 uses, because a bare slice can cut a secret so the pattern no longer matches and it survives. Truncation is decided on what was actually cut rather than by comparing against the raw input: redaction changes length, so the naive comparison appends a phantom ellipsis to text that was never truncated. Covered by its own test. Related to ent#223, ent#224
…agent Slack bots (ent#222) trinity-enterprise#232 merged to enterprise main (6f073c7), so dev's pointer at 594b0afd predates the private slack_per_agent_bots module. Without this bump the OSS half in this PR ships INERT: adapters/per_agent_bot.py has no resolver registered, so per-agent routing silently does not exist and ent#222 would look like it simply did not work — the ent#185 class. Pointer moves 594b0afd -> 6f073c73, which carries backend/slack_per_agent_bots/ (module + manager + cascade wiring) and the enterprise Alembic 0012 slack_agent_bindings revision. Also picks up nothing else: 6f073c7 is a direct child of 594b0afd, which dev already had. Related to ent#222
…oard skill + P-37 catalog entry Co-Authored-By: Claude Fable 5 <[email protected]>
…nterprise#124) On a genuinely fresh install, auto-deploy a bundled starter fleet once, right after first-time setup — the multi-agent generalization of the Cornelius seeder (ent#107), driven through the resilient deploy path (ent#125). - Extract the deploy orchestration verbatim from routers/systems.py into services/system_service.py::deploy_manifest (Invariant #1; router is a thin HTTP wrapper). Default create_agent_fn lazily resolves the routers/agents ws-broadcasting facade so agent_created broadcasts are preserved on every deploy path. - New services/system_seed_service.py: ensure_first_run_seeded() resolves a PERSISTED first-run verdict (first_run_fresh — computed once BEFORE Cornelius provisions; cornelius_seeded forces not-fresh) and runs both seeders under that one decision, closing the cross-pass count-poisoning bug. Durable default_system_seeded flag + seed-info JSON, SETNX lock, reserved-name existence backstop (the deploy path suffixes collisions instead of 409ing), flag policy deployed/partial=set failed/error=retry, operator-queue alerts (system-seed-* ids, #1632 reserved prefix) on partial/failed/error/unreadable-override/interrupted-converge. - cornelius_agent_service.ensure_seeded gains an optional precomputed fresh verdict (legacy count when None). - Bundled config/manifests/default-system.yaml: the in-tree acme trio (local:scout/sage/scribe) as the coherent team its content assumes — no schedules, no prompt. TRINITY_DEFAULT_SYSTEM_MANIFEST env override / disable sentinels; baked into the image AND dir-mounted in both compose files (the dev src mount shadows image COPYs). e2e stack pins the disabled sentinel to keep its zero-agent baseline. Refs trinity-enterprise#124 (closed manually at release — closing keywords don't cross repos). Co-Authored-By: Claude Fable 5 <[email protected]>
…-seed feat(systems): first-run seed of a default system manifest (trinity-enterprise#124)
…ernal facade (#1768) (#1769) The deploy-local path (#950) passes adopt_existing_workspace=True through create_agent_fn, but the router facade create_agent_internal never accepted the kwarg (added to the service layer in #1667), so every POST /api/agents/deploy-local and MCP deploy_local_agent call died with "TypeError: unexpected keyword argument 'adopt_existing_workspace'" -> 500. Add the kwarg (default False) to the facade and forward it to the service-layer call. All other callers are unaffected. Validated live against the dev stack: the 7 failing tests from the issue plus the rest of test_deploy_local.py (16/16) now pass; red baseline reproduced the exact TypeError before the fix. Fixes #1768 Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
… /release-plan skills, P-38 catalog entry (#1770) Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
…sh commands + audit pins (trinity-enterprise#239) (#1767) * test(seed): pin CLAUDE.md existence for bundled-manifest templates (trinity-enterprise#239) v0.8.5 pre-release audit of config/manifests/default-system.yaml: the tree-existence guard only pinned template.yaml, so a template shipping without CLAUDE.md would deploy 'successfully' but seed an agent with no instructions — failing the zero-cred useful bar the audit enforces. Audit outcome: manifest passes all checks (local:-only, no schedules, no prompt override, deliberate full-mesh + shared folders, all three templates present and zero-cred clean) — nothing trimmed or replaced. Co-Authored-By: Claude Fable 5 <[email protected]> * fix(templates): ship real slash-command files for the seeded starter trio (trinity-enterprise#239) Live first-chat exercise of the deployed acme fleet surfaced that every documented command in scout/sage/scribe fails as typed: Claude Code intercepts any leading-/ message before the model sees it, so /research returns "Unknown command: /research" and /status hits the disabled built-in — while the agents' own onboarding replies teach exactly that syntax. Ship .claude/commands/<name>.md for all 15 declared commands (the pattern trinity-system/demo-* templates already follow; a shipped status.md shadows the built-in, verified live), and pin declared↔shipped command parity for every manifest-referenced template in the ent#124 seed suite. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
Brings dev up to date with 13 commits that landed directly on main: hono 4.12.31 (#1738), fast-uri 3.1.4 (#1736), body-parser 2.3.0 (#1733), llms.txt, FAQ + PAT-scope user docs, open-research folder, architecture explainer video links, and the earlier enterprise-pointer alignment on main. Required before the v0.8.5 dev→main cut so the release merge is conflict-free. Co-Authored-By: Claude Fable 5 <[email protected]> # Conflicts: # .claude # docs/user-docs/faq/channels-and-messaging.md # docs/user-docs/integrations/github-pat-setup.md # src/backend/enterprise
…t#220 rooms security fix (#1776) Re-points src/backend/enterprise from 6f073c73 to e898cef8 (enterprise-main TIP) so v0.8.5 ships rooms WITH the ent#220 fix: moderator-only lifecycle mutations + participant-cap re-check on add. The stale pin was the ent#185 class flagged in the 0.8.5 freeze-plan recheck (2026-07-26). Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
chore: reconcile main into dev before the v0.8.5 cut
…rd (#1778) Adds the two behavior-change notes the 2026-07-26 recheck found missing from the pre-cut seed (base-image rebuild/recreate requirement; ent#125 continue-on-error default flip), the full Known-limitations block for the generated notes, and the recheck addendum to the freeze plan. Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
* docs(user-docs): reconcile user docs for the v0.8.5 pre-release Reconcile docs/user-docs against everything shipped since v0.8.0 and add the user-facing v0.8.5 release highlights. New pages: - whats-new/v0.8.5.md - collaboration/rooms.md (shared multi-agent sessions, enterprise) - automation/agent-reminders.md (one-shot deferred self-triggers) - operations/telemetry.md (local capture + opt-in fleet sharing) - sharing-and-access/customer-portal.md (enterprise client chat app) Corrections / rewrites: - advanced/voice-replies.md rewritten to the v2 per-message model - operations/monitoring.md retention (blast-radius guard, all 7 windows, community floor) and operating-room.md (retention sweep) - operations/dashboard.md + collaboration/agent-network.md: remove the decommissioned Graph view - Slack: per-channel proactive consent, completion report-back, configurable rate limits, per-agent dedicated bots (enterprise) - github-pat: per-user personal token (three-tier resolution) - skills: full-directory packages + skill runner - loops: failure policy (abort vs continue) - models: Fable 5 / Sonnet 5; model-specific context window - SSH access corrected to key-only; unattended + agent-driven install FAQ: new grounded Q&As and stale-answer fixes across every topic; index regenerated from live headings (288 questions). README: fix the Cornelius template links in the root and onboarding READMEs to point at github.com/Abilityai/cornelius. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]> * docs(user-docs): sync abilities plugin docs with live marketplace Two skills shipped to abilityai/abilities after the last docs sync: - /agent-dev:add-orchestrator (agent-dev 19 -> 20): system-aware orchestrator installing /discover-agents, /compose-system, /orchestrate; new Orchestration section with System Manifest and Fan-Out cross-links - /create-agent:review (create-agent 13 -> 14): read-only agent audit pairing with /create-agent:adjust; review-then-adjust flow documented Also: utilities example block now lists all 7 skills; counts fixed in overview, marketplace page, building-agents guide, and README index. Co-Authored-By: Claude Fable 5 <[email protected]> --------- Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
Bumps VERSION 0.8.0 → 0.8.5 and folds the full grouped issue lists (78 public + private-tracker features) into docs/releases/0.8.5.md, preserving the pre-cut seed's upgrade notes + known limitations. Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
| """ | ||
|
|
||
| def __init__(self): | ||
| self.library_path = SKILLS_LIBRARY_PATH | ||
| self._last_sync: Optional[datetime] = None | ||
| self._last_commit_sha: Optional[str] = None | ||
| # list_skills metadata cache keyed by library commit SHA — walking every |
| # label) permanently stale, which the #1581 orphan sweep once read as | ||
| # "this volume's agent no longer exists" — and force-removed the LIVE | ||
| # agent's home volume during a recreate gap. `db.rename_agent` therefore | ||
| # pins `agent_ownership.volume_base_name = old_name` atomically with the |
| # #1664: that makes the volume's own identity (name + `trinity.agent-name` | ||
| # label) permanently stale, which the #1581 orphan sweep once read as | ||
| # "this volume's agent no longer exists" — and force-removed the LIVE | ||
| # agent's home volume during a recreate gap. `db.rename_agent` therefore |
| # `/home/developer` on every rename is the only alternative. The agent | ||
| # keeps its existing `agent-{old_name}-*` volumes and the container | ||
| # carries the same mounts forward (recreate_container_with_updated_config | ||
| # rebuilds the mount set from the old container's Mounts). |
| # volume nor editing its (immutable) labels, so copying gigabytes of | ||
| # `/home/developer` on every rename is the only alternative. The agent | ||
| # keeps its existing `agent-{old_name}-*` volumes and the container | ||
| # carries the same mounts forward (recreate_container_with_updated_config |
| # For simplicity in this implementation, we'll keep the volume name | ||
| # and update the container mount on next start | ||
| # This is handled by recreate_container_with_updated_config | ||
| # Docker volumes are NOT renamed: Docker supports neither renaming a |
| now = utc_now_iso() | ||
| for key, value in COMMUNITY_FRESH_INSTALL_SEED.items(): | ||
| # OR IGNORE: idempotent under a re-run (both migration locks fail | ||
| # open, so two workers can race this) and never clobbers a value an |
| from services.settings_service import ( | ||
| COMMUNITY_RETENTION_FLOOR_DAYS, | ||
| RETENTION_OPS_KEYS, | ||
| ) |
| # `ack_lookup_failed` are fail-closed error states, not approvable, and | ||
| # an already-acked sweep returns allowed=True (so it drops off the list — | ||
| # the single-use, no-stale-state guarantee the panel needs). | ||
| if not _verdict.allowed and _verdict.reason == "over_threshold": | ||
| pending_acknowledgements.append({ |
| content — SKILL.md plus any bundled `scripts/` — so it is executable | ||
| material, not metadata. An agent-scoped key resolves to its owner user, so | ||
| before this gate any agent could pull arbitrary executable content out of | ||
| the library and run it locally: self-acquisition, which is exactly the |
…al rotted out of the 168h window (#1783) (#1784) Fixes #1783 get_agent_schedules_summary computes last_run_at in-window (deliberate #1115 semantics), so the fixed 2026-07-06 literal fell out of the 168h window on 2026-07-13 and test_schedules_summary_last_run_at_normalized has failed on dev since — invisible until the v0.8.5 release PR's base=main regression diff (all 3 seeds). Seed now−1h instead; the naive no-'Z' shape the test pins is unchanged. All 6 tests green locally. Co-authored-by: Eugene Vyborov <[email protected]> Co-authored-by: Claude Fable 5 <[email protected]>
AndriiPasternak31
left a comment
There was a problem hiding this comment.
Validated as the requested reviewer (SOC 2 separation of duties — authored by @vybe, validated by @AndriiPasternak31). Approving.
Payload sanity
VERSION0.8.0 → 0.8.5 ✅docs/releases/0.8.5.mdpresent and rides into the squash commit (Step 6a) ✅- 173 commits ahead of
main;mainhas 0 commits unreachable fromdev— no divergence, nothing stranded ✅ - Release notes are honest: behaviour changes, the unflagged skill-package decision (ent#187) with its backward-compat proof, the base-image rebuild requirement, and a real "Known limitations" section incl. #1741 explicitly not fixed ✅
CI
25 checks green, including the ones that matter for a release: pytest (head+base × 3 seeds — 5/6 complete at review time, all green), schema-parity, pg-migrations, prod-image-smoke, verify-non-root, backend boots without enterprise submodule, gitleaks, enterprise-docs guard.
The two red checks — both non-blocking artifacts of release-PR size, not regressions
1. CodeQL — false attribution, verified.
Reports "71 new alerts (46 high)" but carries its own disclaimer: "Alerts not introduced by this pull request might have been detected because the code changes were too large." Verified against the alert database rather than taken on trust:
- 129 open alerts repo-wide; zero created after the v0.8.0 tag (2026-07-08T20:44Z).
- Every alert cited in the inline annotations dates to 2026-05-19 or earlier (
skill_service.py#157,agent_rename.py#55–59,database.py#18,settings.py#44/#45).
So this release introduces no new CodeQL alerts — all 71 are pre-existing findings already on main, surfaced only because the 603-file diff re-touches the files that host them.
2. changes (frontend-e2e gate) — infra limit, not code.
gh pr diff --name-only returns HTTP 406 ("diff exceeded the maximum number of files (300)") on a 603-file PR, so the gate job errors instead of cleanly deciding, which cascades e2e/report to skipped. Per the workflow's own header, frontend-e2e is advisory, not a required merge gate (AC of #1526). No frontend signal is lost that would otherwise have gated this merge.
Worth a follow-up: make the
changesjob fall back togh api .../pulls/{n}/files --paginateso release PRs don't red-line this gate every cycle.
Post-merge (per /release Steps 9–11)
Tag v0.8.5 · confirm sync-docs-to-vertex fires and publish-cli does not · re-sync dev from main via merge-commit · close trinity-enterprise in-dev issues manually (cross-repo keywords don't fire) · verify /api/version reports 0.8.5 with the squash SHA.
…en (#1782) (#1861) * fix(ci): detect frontend changes via the paginated files API, fail open `gh pr diff --name-only` calls GitHub's diff API, which hard-fails with HTTP 406 `PullRequest.diff too_large` on any PR over 300 files. Under `set -euo pipefail` that killed the `changes` step outright. The visible symptom was a spurious red X on every release PR (routinely 500+ files). The real damage was worse and silent: with the step dead, `needs.changes.outputs.frontend` was empty, the `e2e` job's `if:` fell through to the `ui`-label check, and the suite was SKIPPED on a PR that should have run it. Release PR #1781 (603 files) contains 89 `src/frontend/` files — the correct verdict was `frontend=true`. Swap to the files API, which paginates (3000-file ceiling), and make the step unable to fail: - fail open on a failed PR lookup, a failed file-list call, or a list that cannot be proven complete. This job decides whether e2e runs, so "unable to decide" must mean RUN — never a skip, never a red X. - completeness is proven by comparing the list length against the PR's own `changed_files`. Exact, not a heuristic: it catches truncation at the 3000 ceiling AND a pagination that died mid-way but still exited 0 — the silent-wrong-answer case a `>= 3000` guard cannot see. - captured stderr is echoed into the `::warning::`, so a revoked token or permission regression is visible instead of failing open silently forever. Two deliberate changes a reviewer may read as scope drift: - the `env:` block. The step's command was being rewritten regardless; moving the PR number and repo out of inline `${{ }}` interpolation removes a template-injection class and matches the house style in container-security.yml. - the two `needs.changes.result` clauses on the `e2e` job. Defence in depth, not part of the fix: after this change the step cannot fail from this cause, but a failed or cancelled `changes` job still leaves no verdict, and that must also mean RUN. `cancelled` is covered alongside `failure` so the invariant holds for both. `container-security.yml` detects changed files with `git diff` instead; that job already checks out the repo to build images and this one must not (a full clone of a 96 MB repo turns a ~5s gate into ~40s). The two implementations differ on purpose — noted inline so nobody unifies them. Rejected alternatives: `dorny/paths-filter` (third-party action in CI on a public repo — `tj-actions/changed-files` was supply-chain compromised in March 2025); native `on.pull_request.paths` (workflow-level, would break the `ui`-label manual opt-in #1526 preserved on purpose). Verified — root cause reproduced (`gh pr diff 1781` → HTTP 406, exit 1); 7 stubbed-`gh` cases green against the step text extracted from this YAML, and proven to have teeth (deleting the completeness guard flips the truncation and partial-pagination cases to a wrong `frontend=false`); live: #1781 → `frontend=true`, 603 files, 5s · backend-only #1851 → `frontend=false` · bogus PR → fails open with the 404 in the warning; `actionlint` introduces no new findings (baseline on dev has the same 2). Per CLAUDE.md tiered docs, a bug fix in CI config is commit-message-only: no requirements, architecture, or feature-flow delta — nothing in them governs GitHub Actions config. Fixes #1782 Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> * fix(ci): drop the cancelled clause, correct the stale gh-diff comment The `|| needs.changes.result == 'cancelled'` guard on the e2e job defeated `cancel-in-progress`: GitHub cancels a run by re-evaluating every job's `if` and keeping the job when it returns true, which is what `always()` means. With `cancel-in-progress: true` for PRs, the dominant producer of a `cancelled` result is a superseded push — so the clause turned every superseded push into a full 25-minute Docker-stack + Playwright run, whose failure posts the very red X this issue exists to remove. A cancelled run has been superseded; the replacement run evaluates from scratch. `failure` is kept — that is a real "no verdict" case. Also corrects the job header comment, which still described the mechanism this fix removed ("Dependency-free (gh diff)"). Detection is now the PR files API; the property worth naming is that it needs no checkout. Records the pitfall in docs/memory/learnings.md and marks #1782 fixed in the 0.8.5 known-issues note. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> --------- Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
…2276) Post-release commit reconciliation (#1781 head → #2268 head) surfaced work missing from the notes: five post-v0.8.5 hotfixes promoted to main on 2026-07-28 (#1795 #1790 #1793 #1759 #1830), #2186, #2259, ent#336, ent#339. Removes the incorrect 'not on npm' Known-limitations line (trinity-docs-mcp 0.1.0 is published, unscoped) and corrects the headline count to 155 public + 62 private. Co-authored-by: trinity-ability <[email protected]>
Release v0.8.5 — cumulative changes since v0.8.0.
Payload: 773 commits · 619 files (+97.7k/−14k) · 78 public + ~17 private-tracker issues.
Full curated notes:
docs/releases/0.8.5.md(in this PR — lands on main with the tag).Highlights
ghCLI + REST API (not just git) #1574)docs/releases/0.8.5.md): unflagged skill-package format change (ent#187 decision — additive, backward-compatible); base-image rebuild + agent recreate required for ent#123/#1595/#1596/#1574;deploy_systemnow defaults to continue-on-error (ent#125 — passstrict: truefor the old behavior).Closes #1077
Closes #1142
Closes #1164
Closes #1167
Closes #1296
Closes #1310
Closes #1402
Closes #1449
Closes #1459
Closes #1474
Closes #1481
Closes #1483
Closes #1484
Closes #1485
Closes #1486
Closes #1487
Closes #1488
Closes #1525
Closes #1526
Closes #1533
Closes #1540
Closes #1557
Closes #1558
Closes #1559
Closes #1560
Closes #1561
Closes #1562
Closes #1574
Closes #1575
Closes #1577
Closes #1578
Closes #1581
Closes #1582
Closes #1593
Closes #1595
Closes #1596
Closes #1598
Closes #1600
Closes #1601
Closes #1607
Closes #1609
Closes #1615
Closes #1616
Closes #1617
Closes #1629
Closes #1631
Closes #1632
Closes #1636
Closes #1638
Closes #1639
Closes #1640
Closes #1641
Closes #1642
Closes #1643
Closes #1644
Closes #1646
Closes #1649
Closes #1652
Closes #1653
Closes #1660
Closes #1661
Closes #1664
Closes #1665
Closes #1667
Closes #1671
Closes #1672
Closes #1673
Closes #1689
Closes #1702
Closes #1709
Closes #1711
Closes #1712
Closes #1713
Closes #1714
Closes #1743
Closes #1745
Closes #1747
Closes #1768
Closes #1783
Pre-release checklist passed 2026-07-26. Ready for squash-merge.
v0.8.5sync-docs-to-vertex.ymlfires (user-docs changed);publish-cli.ymldoes NOT (nosrc/cli/**changes, platform tag)trinity-enterprise) in-dev issues are closed manually post-merge (cross-repo keywords don't fire)🤖 Generated with Claude Code