October 2026
Archived entries for October 2026, newest first. For recent work see the live changelog.
🔧 ci: warm one complete Maven cache and retry Central rate limits (2026-10-31)
Repo: EDDI (chore/ci-maven-cache)
What changed and why
A pull request's Build & Test job failed with an HTTP 429 from Maven Central while resolving surefire-junit-platform, before a single test ran. Every Java job used setup-java with cache: maven, which keys one shared cache on the pom.xml hash: whichever job finished first saved it and nothing ever updated it. A compile-only job (CodeQL) could therefore save a repository without the surefire/failsafe providers or the other test-time plugins, and every later job fetched those from Central, concurrently with every other open PR.
New
Maven Cachejob (.github/workflows/ci.yml) is the only writer of~/.m2/repository. It resolves the dependencies and plugins, runspackageonce with tests skipped (formatter, Checkstyle, JaCoCo, Quarkus and its*-deploymentjars), forces the surefire and failsafe JUnit providers, and fetches the SBOM and license plugins, then saves undermaven-v1-<os>-<hash of every pom.xml and maven-wrapper.properties>. When that exact key already exists it does a lookup-only check and stops, so a docs-only PR pays seconds. A miss starts from the nearest older cache. It iscontinue-on-error, so a failed warm-up never blocks the required checks.Build & Test, Integration Tests, CodeQL Analysis, Generate SBOM and Build Image
needit and onlyactions/cache/restorethe same key (with the prefix as fallback); none saves.cache: mavenis gone from them. Job names are unchanged..mvn/maven.configsets Maven Resolver's HTTP retry:aether.transport.http.retryHandler.count=8,.interval=10000,.intervalMax=300000,.serviceUnavailable=429,503. A 429 or 503 is retried, the server'sRetry-Afteris obeyed when sent, and a wait above five minutes fails the request instead of stalling the build.Review fix: the warm-up checks out before it computes its cache key (the key hashed files that were not on disk yet, so it never matched and every run rebuilt the cache), and it also stores the checksum-verified Node archive in the cache so Build Image downloads nothing.
Design decisions
The warm-up is ungated: CodeQL runs on every PR (Scorecard), so a gated warm-up would leave it uncached. The exact-key lookup keeps that cheap.
Caches written on
mainare visible to every PR, caches written on a PR only to that PR, which is why the fallback prefix exists.The Node archive pin in Build Image is unchanged; it now rides in the same restored repository.
codeql.ymlandloadtest-db-ops.ymlstill usecache: maven(separate workflows, not in this change).
🐛 fix(ci): ratings races in the Chat UI and the integration-test stall on main (2026-10-31)
Repo: EDDI (fix/main-ci-ratings-it-hang)
What changed and why
Three CI failures present on main (and so on every PR) at 01c3250.
Chat UI ratings restore clobbered the person's own action.
useRatingsapplied the server's restore read verbatim, so a thumb tapped while the read was in flight was undone (flakyChatWidget.ratings.test.tsx, and a real bug). Changes made since the read left are now kept over the server's older view. The restore effect also closed the rating card whenever it re-ran, including when the profile merely arrived after paint, so a fast click on "Rate this conversation" opened and immediately closed it (the Playwrightratings-feedback.fullstacktimeout waiting forrating-star-1). It now closes only on a switch to another conversation. Both have unit tests inuseRatings.test.tsx.RagWorkflowExtensionITstalled the failsafe fork. It was the one Mongo-backed@QuarkusTestwithout@TestProfile(IntegrationTestProfile.class), so Quarkus restarted the application without the Mongo dev-service connection string. The app then pointed at the unresolvablemongodb:27017and every Mongo-touching bean waited out the driver's 30 s server selection: 250 s on the last green run, ~580 s on main since more stores were added. The 900 s fork timeout then killed whichever class was running (usuallyPostgresGroupVerdictIT, which is innocent). The test now carries the profile.The rating card never opened for an agent that sends no greeting (
ChatWidget.tsx). With no messages the transcript renders its empty state, and the card was only rendered in the non-empty branch, so "Rate this conversation" set the state and nothing appeared. The Backend E2E agent has an empty workflow, so its ratings test waited for a star that was never rendered. The card now renders in both branches; a ChatWidget test covers the empty transcript.Rating state across the restore read (
useRatings,RatingCard), from the review of this PR: an edit is now tracked per rating (in flight, confirmed since the read began, revision). A failed write rolls back to the server's value (from the read or the last confirmed write), never to empty, and only when no newer edit has started; a failed write before the read answers lets the read fill the value in. The per-conversation state is no longer cleared when the profile merely reloads for the same conversation, and the protection is retired when the next read begins. A card opened before the read finishes picks up the restored rating until the person has touched it.
Design decisions
No timeout was raised and nothing was skipped; the stall's cause was removed.
🔒 fix(backup): review findings on export, import and upgrade (2026-10-31)
Repo: EDDI (fix/review-backup)
What changed and why
Verified findings from the CodeRabbit security review and the October code review, all on the backup / import / sync path. Several authorization findings only matter with eddi.workspaces.enabled=true; they are fixed regardless.
Export
The agent and workflow documents are scrubbed like every other archived document — a Dream job's model
apiKeyand legacychannels[].configtokens used to leave verbatim.The export scrubber now redacts query parameters whose name marks a credential (
key,sig,signature,accessKey, … —ConfigSecretRedactor's rule) in relative paths and absolute URLs, so a signed-URL signature an editor's GET hides no longer leaves in the archive. Form bodies are not affected.A URI found anywhere in a workflow other than its step references (which the authoring check vetted) needs
VIEWbefore export or preview reads it; previously a URI in a free field of a step'sconfigpulled another space's configuration into the archive.Snippets are exported only with
VIEW(aUSE-only listing no longer suffices).Connections go through
ConnectionReadRedactorbefore the generic scrubber, so a pre-validation literalpasswordRefis not exported.
Import
A workflow written straight to the store runs
RestWorkflowStore's reference check (now reused viaWorkflowReferenceAccess, walkingRestWorkflowStore.referencedResources).A workflow directory without a workflow document is a 400, not a kept foreign reference.
Repeated workflow URIs in an agent are imported once (no orphan copies).
updateParsernow goes throughupdateTracked, so a failed merge rolls it back too.Connections are created only for an administrator, as over REST; an editor's import skips (and counts) them.
Upgrade / sync
A source resource two workflows share is matched per workflow: extension diffs carry their workflow's
workflowIndex, and the executor looks diffs up per workflow (#8).A 409 is retried against the store's version only when the descriptor lags the store (a lost descriptor write) or when the newer version is one this run wrote itself (a target resource two workflows share is written once per workflow); any other version whose descriptor moved is somebody's edit and is reported, not overwritten.
createExtensiondecodes the JSON beforerequireMayAuthor, so a JSON-escaped${caller:token}no longer passes the check; a created RAG config getsKnowledgeBaseStorageGuard.prepareNew.A newly created workflow runs the reference check before any of its resources is written.
ScrubbedSecretsrestores a literal target credential only when the object's destination (…Url,uri,endpoint,host, absolutepath) is unchanged, compared by origin with scheme and host case-folded and a default port equal to an omitted one; vault references still come from the target. The identity lookup for array elements is indexed once per list instead of a scan per element.Source readers refuse more than 256 workflow references; the remote source fetches each document once per sync.
Archive extraction: a ZIP directory entry carrying data, or an entry nested more than 32 levels deep, is refused.
Dead code: removed StructuralMatcher.readLatestVersionOrDefault and UpgradeExecutor.readLatestVersion; moved the stacked Javadoc in StructuralMatcher onto readLatestVersion.
Design decisions
Export keeps "VIEW on the agent covers the graph beneath it" for the structural step references (a non-cascading share still exports); only references the authoring check never saw need their own
VIEW. That includes the dictionaries a parser document names (the parser store does not vet them on write), so a recipient of a non-cascading share whose agent uses parser-document dictionaries they cannot see now gets a 403 instead of an archive.Minimal edits outside
backup/:RestWorkflowStore.referencedResourcesandConnectionReadRedactor.redactLegacyLiteralsmade public for reuse;SecretScrubbergained the credential-query-name rule.
Not done
Consolidating
RestImportService's per-type create/update methods withUpgradeExecutor.resolveExtensionOpsinto one table: the import side carries per-type behaviour (RAG preparation, storage namespace, v5 LLM defaults) that makes it a larger refactor than this pass.Second review round: an upgrade write that meets a 409 for a version this run did not write is now always reported as "changed on this instance" instead of being retried when the descriptor lags the store (a lost descriptor bump and a save whose descriptor has not moved yet cannot be told apart, so the sync fails safe; preview and sync again). The workflow-reference rule now lives once, in
RestWorkflowStore.requireAccessToReferences, shared with the backup paths.
Files: RestExportService.java, RestImportService.java, UpgradeExecutor.java, StructuralMatcher.java, ScrubbedSecrets.java, WorkflowReferenceAccess.java, ZipArchive.java, SecretScrubber.java, import-export-an-agent.md, agent-sync-guide.md
fix(configs,datastore): review findings in the configuration stores and the datastore (2026-10-31)
Repo: EDDI (fix/review-configs)
Verified CodeRabbit findings and code-review leads (§4 Persistence, §5 dead code) for configs/** and datastore/**.
What changed and why
Configuration stores
Reverse-reference lookups no longer loop on a caller-chosen version.
AgentStore.getAgentDescriptorsContainingWorkflowandWorkflowStore.getWorkflowDescriptorsContainingResourceissued two to four queries per integer version from the?version=the caller sent down to 1, so?version=2000000000&includePreviousVersions=truekept a worker busy for billions of queries. The walk now starts at the referenced resource's LIVE version, read from its own store (ResourceUtilities.clampToLiveVersion; the workflow store for an agent lookup,IResourceClientLibraryfor a workflow lookup), never from its descriptor: descriptors lag every in-process update, and clamping to a stale descriptor version made the cascade-delete and orphan-purge reference checks skip referrers of the live version. When the live version is unknown a walk above 1000 versions is refused (both delete paths read that as "still referenced") instead of being cut short. Only walks are clamped; an exact lookup (includePreviousVersions=false) queries the version it was asked about.JSON Patch cannot relocate a credential the caller cannot read.
ConfigJsonPatcherapplied the patch to the unredacted document, so an editor couldcopy/movea plaintext key intodescriptionand read it back. For anyone but an eddi-admin the patch now runs against a view where every credentialConfigSecretRedactorwould redact is an opaque random token; a token is restored wherever it is a whole value, but one that ends up at another path (anadd/removeearlier in an array shifts the indexes after it) is kept only if the redacted read still hides it there; a credential relocated into a readable field, or embedded in a larger string, is refused with a 400, and atestagainst a credential never sees its value.JSON Patch output is bounded. Operations are applied one by one and each
copyis followed by a size check (nodes plus string length, counted with an early stop) that refuses growth beyond twice the stored document plus 1 MB, before anything is serialised. Shared JSON-P structure let a few copies build an exponentially large result.Workflow references with a non-canonical scheme are checked.
RestWorkflowStore.addReferenceskipped anyconfig.urinot starting witheddi://, but the engine resolves by host and id, soEddi://orx://ai.labs.llm/…ran a configuration the access check never saw. Every URI with a scheme, host and id is now checked.Parser documents check their dictionary references.
RestParserStorecreate, update and duplicate run the workflow store's reference check on the parser's extensions (VIEW on each newly introduced dictionary), so a private dictionary can no longer be reached through the standalone parse endpoint or an export.Agent tests:
maxCostPerRunNaN/Infinity and a non-finiteexpect.maxCostUsdare refused (NaN passed the range check and disabled the budget).Artifact JSON-schema validators evaluate
pattern/patternPropertiesthrough a deadline-bound regex factory sharing one 500 ms budget per validation, like theREGEXvalidator; a runaway pattern refuses the write. The budget is checked before every match as well as during one, so many short matches (everypatternPropertiespattern against every key) stop at it too.Template migration is linear.
TemplateSyntaxMigrator.unconvertibleReasoncontinues after the closer instead of re-scanning from every nested opener, and a text whose openers-times-length exceeds 50M is reported unconvertible and left alone instead of costing quadratic CPU at import or startup. Only anchors a conversion step can scan from count ([[${,[(${,[#,#strings.), so nested JSON arrays ([[1,2]]) no longer push a resource past the bound, and an import that the converter refuses as a whole text is reported in the log like a refused value.Global variables: the assembled-reference check scans in one linear pass instead of a regex retried at every unterminated opener.
ApiCallExecutorrefuses a full-form${vars:tenant/key}that only conversation data supplied (the configured template did not write it): it would read another workspace's variable.Knowledge bases: a 6.5.0 name-layout knowledge base that drops its explicit location moves to the id layout, as a rename already did (rename-keeping-location then drop-location reached another name's default store unchecked); an Elasticsearch
indexNamemust name one concrete index (no wildcard, list or exclusion, and no surrounding whitespace, since the store receives it untrimmed); and the location collision scan fails closed when it runs past its 20,000-descriptor budget.Channel integrations:
duplicateChannelruns the target USE check a create runs; the uniqueness checks and the write are serialised on the node, and a new integration's descriptor (which those checks enumerate) is written before the lock is released; a create whose descriptor cannot be written removes the integration again and fails with a 500 instead of leaving it invisible to the next check. AchannelIda deployed agent's legacy Slack connector serves is refused instead of silently taking the route over. That check asksChannelTargetRouter.isServedByLegacyConnector, which reads the live deployments and deployed agent configurations rather than the router's one-minute cache (a connector deployed a moment ago is not in it), and the save answers 503 when they cannot be read. The router is constructor-injected.Group configurations:
protocol.maxTurnsand a phase'srepeatsare capped at 1000, andartifactConfig.maxArtifactsPerDiscussionat 1000 (the quota counts a bounded listing).Orphan purge: the scan also walks the exact workflow version every current (not only deployed) agent pins, so a dependency a newer workflow version dropped is not purged from under an undeployed agent. It reads each agent and workflow at its live version rather than the version its (possibly stale) descriptor names, and the per-candidate re-check before a delete also asks whether a current agent pins a superseded workflow version that uses the extension (
IWorkflowStore.getWorkflowVersionsContainingResource), failing closed.Properties:
PropertyValues.toPropertyandcopyOfcopy nested maps and lists, so a path assignment into a property built from a cached configuration value cannot write into that shared configuration.PropertiesMigrationServiceskips only onpostgres, like every other datastore switch, instead of running only on the literalmongodb.
Datastore
PostgresUserConversationStore.deleteAllForUserthrows instead of returning 0 on a SQL error, so a failed GDPR erasure step is reported as failed.DescriptorStore.findByOriginIdreturns every match instead of the first ten, which was a cap applied before the caller's workspace/EDIT filter and could make a merge import create a duplicate.Sorted PostgreSQL
findResourcespages break ties onid, so offset paging over equal sort values neither repeats nor skips rows (the field index still supplies the leading key; the tie is ordered by an incremental sort). MongoDB deliberately keeps the single-key sort: its field indexes are single-field, and{field: -1, _id: -1}would turn every sorted page into a blocking in-memory sort over all matches.PostgresAttachmentStore.grantAccessthrowsAttachmentNotFoundExceptionfor a missing blob, as the MongoDB store does.Attachments that record no owner fail closed for reads: the MongoDB store no longer lets any conversation read them unless that conversation was explicitly granted access, matching PostgreSQL. Deletes are unchanged on both backends: an ownerless blob can still be deleted by its
storageRef, because deleting discloses nothing and refusing it would strand personal data beyond erasure.deleteByConversation(conversation delete, purge, GDPR erasure) is untouched and matches on the owning conversation exactly as before. Docs: Attachments guide.V6RenameMigration.saveDocumentaddresses a string_idas stored (it queriednew ObjectId(string), which never matched) and counts a document only when the replace matched.Dead code removed:
datastore/model/ResourceIdand its test; the unreachable null-weight check inAgentGroupStore.validateVotePhases(VoteConfigcopies weights withMap.copyOf, which refuses null values).
Docs updated: RAG, Group conversations, Attachments guide.
Design decisions
Patch protection by token, not by path rules. Deciding which patch operations touch credentials by their pointers breaks on array shifts and nested copies; masking the document with per-request random tokens, and admitting a token at a new path only where the redaction rules still hide it, covers both and reuses the read redaction's own rules. Over-masking (no skip paths) only restricts copy/move for non-admins.
Reverse-lookup clamp uses the resource's live version from its own store, injected lazily (
Provider) because the workflow store and the resource client library reach back to the agent and workflow stores through the REST facades. The descriptor's version was tried first and is wrong: it lags in-process updates. A store-level prefix query would avoid the per-version walk entirely but needs new queries on both backends.Ownerless attachments fail closed for reads only: the PostgreSQL store already refused those reads, and an owner nobody can establish is not an owner. Deletes stay allowed, since a delete that refuses data it cannot attribute would make it impossible to erase.
Deferred
Descriptor PATCH vs. sharing race (full-snapshot write conditioned only on the resource version): needs a descriptor revision or field-level update on both backends.
Slack approval records keyed by integration name: needs an immutable integration id on approval records (integrations area).
Knowledge-base collision check against locations of older, still-pinned versions: needs a location index across versions.
🐛 fix(engine): conversation engine, HITL and memory findings from the external reviews (2026-10-31)
Repo: EDDI (fix/review-engine-conv)
Verified findings from the CodeRabbit security review and the full code review against 01c3250, for the conversation engine (engine/internal), the HITL services and conversation memory (engine/memory).
What changed and why
Conversation state can no longer be resurrected or overwritten blindly
The agent-timeout watchdog and the turn error path wrote
EXECUTION_INTERRUPTED/ERRORwith an unconditional store write. An end only raises the cooperative-cancel flag, which a hung model call never sees, so ending a stuck conversation was undone by the watchdog — andEXECUTION_INTERRUPTEDauto-recovers on the next say, so the ended conversation was drivable again and invisible to the ENDED-only retention sweep. Both are now a compare-and-set from the state they read, never overENDED(ConversationStepRunner.transitionUnlessEnded; both stores already hadcompareAndSetState).The admin
PATCH /agents/{conversationId}/stateread the state and then wrote READY:IConversationService.resetConversationStatenow takes the expected state and is a compare-and-set; a lost race answers409.A cancelled say ends its pipeline through the
STOP_CONVERSATIONpath, so the caller was toldENDEDwhile the store recordedEXECUTION_INTERRUPTED. It is now reported as what the store holds (ConversationService.reportCancelledTurnAsInterrupted).
HITL
An
ABORTtimeout (and the pending-approval retention sweep inHitlCrashRecoveryObserver) used the full cancel and was not bound to its pause: a fire claimed just before a resume stopped the resumed turn, or aborted a newer pause. Both now use the paused-only cancel bound to the pause id (IConversationService.cancelPausedConversation(id, by, pauseId)), which re-checks the pause after its compare-and-set and puts back a pause it did not mean. AnABORTfire that meets a resume of its pause still in flight (IN_PROGRESS) stays armed and is retried rather than completed, since that resume may still fail and restore the pause. The group surface is left to the groups work.Resume did not apply the GDPR Art. 18 processing restriction that start and say apply; a restricted owner could drive a resumed turn (including a rejection-note revision). It now refuses with the pause restored and its timeout still armed.
A tool pause's timeout policy came from the governing rule of the matched calls only, so an
AUTO_APPROVErule for one endpoint auto-approved an unmatched gated call bundled into the same model message. A call that no policy-stating rule covers now contributes the policy it would inherit, strictest wins.getAgentkeeps deploying a conversation's pinned version on demand even when its deployment record saysundeployed: the old-version cleanup undeploys a previous version whose only open conversations are paused (and retirement does the same for movable ones), so refusing would strand those approvals at the next deploy.docs/hitl.mdclaimed a resume after an undeploy returned409; it now describes this.The approver projection stripped the revision candidate (frozen prompt + tool results) from active steps but not from the redo cache an undo fills.
Memory, retention and reads
The raw read
GET /conversationstore/conversations/{id}andapproval-status?detail=fullservedaudit:compiled_prompt— the agent's rendered system prompt — to an owner who may only USE the agent. Both now stripaudit:*(keepingaudit:token_usage) unless the caller has VIEW on the agent, as the detailed view and MCPread_audit_trailalready did (ConversationMemoryUtilities.stripAuditData).The retention sweep deleted the snapshot without the memory checkpoints (copies of the properties) and the HITL tool journal, removing the only link a later user erasure had to them. It now runs the same dependent cascade as a permanent delete; and both paths keep the snapshot and descriptors when any dependent delete fails (
ConversationPurgeService.deleteDependentData), or when the vault is unavailable while the conversation references auto-vaulted secrets, instead of orphaning the copies.The conversation listing's "search matches nothing → list everything" fallback decided by searching the whole store, an existence oracle over other users' conversations. It is now decided within the caller's own records.
Mid-turn memory checkpoints copied properties before the turn-end secret-context scrub, persisting a secret context value a property instruction had copied. The checkpoint copy is now scrubbed with the same thresholds (
MemorySnapshotService.withoutSecretContextValues).SecretValueScrubberdecoded serialized JSON only in exact mode; in substring and whole-token mode a secret with a JSON-escaped character survived inside tool-call arguments. All modes now decode embedded JSON.Attachment uploads to a legacy conversation used the descriptor's (null) owner as the quota identity, exempting them from the per-user quota; they now use the owner the access guard resolved.
An
Idempotency-Keyretry was served a turn's answer from the grace cache even when the turn's persist then failed; a failed persist now drops it (TurnIdempotencyService.forgetUnpersisted).
Administration
undeployThisAndAllPreviousAgentVersionscounted down from any requested integer (one DB read and one undeploy task per number, plus an "undeployed" record for versions that never existed). The starting version must now be one the agent has (400above its current version).The agent quota counted only each agent's newest runtime version, so a failed newer version hid a live older one; it now counts any READY version. A deployment-count outage failed open; it now refuses with
503while an agent limit is in force (TenantQuotaService.agentCountUnavailable).The live log stream (
/administration/logs/stream) kept delivering admin-only records after the opening token expired; it now closes at the token's expiry, as the cluster activity stream does.
Dead code and duplication
Removed
SecretValueScrubber.scrubContext,ITurnAbandonmentwithConversationService.abandonInFlightTurn(only a test called it), and the unusedMemoryKeys.SYSTEM_MESSAGE/PROMPT.ConversationAccessGuard's four near-identical owner checks now share one helper.
Design decisions
Pause-bound cancels re-verify the pause after the state compare-and-set and restore it on a mismatch, before any side effect — the same pattern resume uses — rather than adding a pause-id predicate to both stores' CAS.
The agent quota fails closed only where a limit applies, so a deployment-store outage never blocks deploys on deployments without an agent quota.
Whether an admin's explicit undeploy should block resuming the version's pending approvals is open: it needs an undeploy record that tells an explicit undeploy from the automatic cleanup, which writes the same
undeployedstatus today.Second review round: a bulk undeploy no longer answers 404 when the deployment records could not be read (500 instead); the log stream stops its initial batch when the token expires mid-batch;
ConversationPurgeService.purgeends the conversation before the first irreversible cleanup step, so a delete that fails part-way leaves it unable to take a turn until the retry finishes (and when that write itself fails, the delete stops before any cleanup and is retried); the stale-turn tests also assert that no compare-and-set toERRORhappens.
Deferred
A persistent pending-deletion state (a dedicated state that blocks every read path, not only turns) is not added: a partly purged conversation is ENDED, findable for the retry, the retention sweep and erasure, but still readable through the history endpoints.
API-call quota spent on turns refused after admission (duplicate, skipped, ended): needs a refund operation in both quota stores or moving acquisition into the queued turn — a product decision on whether skipped turns count.
ConversationService's thin private delegators kept for reflective tests (§7): reducing them means rewriting the characterization suites that reach them viagetDeclaredMethod; not done here.
Files: ConversationStepRunner.java, ConversationService.java, ConversationHitlService.java, HitlTimeoutHandler.java, HitlCrashRecoveryObserver.java, RestAgentAdministration.java, RestAgentEngine.java, RestLogAdmin.java, TurnIdempotencyService.java, RestConversationStore.java, RestAttachmentUpload.java, ConversationPurgeService.java, ConversationMemoryUtilities.java, MemorySnapshotService.java, SecretValueScrubber.java, IConversationService.java, TenantQuotaService.java, ConversationAccessGuard.java; docs hitl.md, gdpr-compliance.md, tenant-quotas.md, deployment-management-of-agents.md, rest-api-reference.md.
fix(engine): review findings — HITL, GDPR, Dream, alerts, audit, mail (2026-10-31)
Repo: EDDI (fix/review-engine-hitl-alerts)
Fixes from the CodeRabbit review and the full code review (against 01c3250) for the engine runtime and the packages around it. Each fix has a unit test that fails without it.
What changed and why
HITL
A reissue of an approved call that has already executed is gated again (
ToolApprovalGate.REPEAT_REASON) instead of running a second time on one approval.Approval patterns are matched by a linear glob matcher (
ToolApprovalPatterns.matches), not one backtracking.*per wildcard.TaskToolApprovalsResolver(strict) pins a task rule with notimeoutPolicytoWAIT_INDEFINITELYwhen it would inherit the agent'sAUTO_APPROVE, so it cannot hide a stricter agent rule.SelfUngatingGuardcompares an LLM-store write against the stored configuration: a whole-documentPUTthat omits a stored task gate, or a patch on its ancestor, is refused (lookup wired throughActingAgentResources).The tool journal's TTL expires
EXECUTEDentries only; a crash-orphanedEXECUTINGclaim is kept until its conversation is deleted, so a late approval cannot run the call again.
GDPR, tenancy, ratings, Dream
Erasure keeps conversation snapshots when attachment deletion failed, keeps mapping rows when their cache keys could not be read, and reports nodes that did not confirm the cluster stop (
IClusterRpc.expectedPeers).restrictProcessingremoves a legacy agent-owned row under the reserved key first, which otherwise made the restriction unenforced.PostgresTenantQuotaStore.setQuotapropagates a write failure (503) instead of acknowledging a quota that was never stored.Withdrawing a rating blanks the comment excerpts alerts copied from it first; erasure could not find them afterwards.
Dream partitions consolidation by group readership (no union of group ids across groups), merges duplicate keys in linear time with the cap checked per append, and refuses a cycle whose pinned agent version names an ungranted vault secret.
Alerts and audit
Webhook targets, signing-secret references and multi-agent rules need the
eddi-adminrole (AlertAccess.hasAdminRole), not merely unrestricted visibility, which every editor has while workspaces are off.Digests go out per originating agent; deleting/disabling a rule or setting its digest to
NONEreleases itsDIGEST_PENDINGevents (IAlertEventStore.releaseDigestPending). An output value older than the erasure fence's lifetime is not stored.AlertEnginelost its test-only constructors and the duplicated 24-argument event rebuilds (AlertEvent.withMatch), and usesAlertMatchers.applies.The audit chain check finds holes between sequenced rows in a window that also holds unsequenced rows (was
UNAVAILABLE), and with signing on ignores positions claimed by v1/v2-signed rows, whose signature does not cover the sequence.
DkimVerifierrefuses a header block with a bare CR or LF (the MIME parser splits a header there, the verifier did not).QuoteStripper's label patterns are possessive (quadratic backtracking on long blank runs).
Docs: Alerts, Audit Ledger, HITL, Secrets Vault.
Second review round: a digest is skipped when its rule was disabled or deleted after the pass began, and withdrawn (not delivered) when every held event was released first;
NatsClusterRpc.expectedPeersreads presence uncached, fails closed when it cannot, and excludes this node by id; erasure keeps conversation snapshots when the conversation-id lookup failed; a failed tool-journal delete keeps the conversation (ConversationPurgeService.purgethrows) so a retry can still reach the rows naming the approver; Dreamwarnmode logs ungranted vault references; agent-trigger cache misses re-check inside the stripe lock;AgentSetupServiceregisters API-call locations before the creation loop so rollback sees them; two docs/Javadoc corrections.
Design decisions
A repeat of an executed approved call goes back to a human rather than replaying the journaled result: replay needs a new result path through
ToolLoopRunner; re-gating is safe with the code this group owns.
Not done (deferred)
Stale cached alert rules can, for up to the rule cache TTL (60 s) on another replica, still create a
DIGEST_PENDINGevent after the rule was disabled; such an event stays visible in the inbox until retention. Reconciling them needs a store query for held events of rules that are no longer digest rules.Mongo journal TTL migration during a rolling update: an old pod can recreate the unfiltered
idx_journal_ttl_claimedafter a new pod dropped it, until it is stopped. Finish the upgrade (no old pods) before relying on the EXECUTING-claim retention; a versioned migration marker is not part of this change.Audit tail / whole-trail deletion stays undetectable: it needs an anchored chain head stored outside the trail (or a predecessor digest in a new canonical form), which is a format change.
Interim narration of a tool-approval pause is not screened by the task's output guardrails: the narration is built in
modules/llm(ToolApprovalGateSupport), where the guardrails live.Alert webhook HMAC keys have no grant model of their own; with webhooks now reserved to the administrator role (who controls grants anyway) the remaining oracle is administrator-only.
fix(engine): review findings — runtime, scheduling, cluster (2026-10-31)
Repo: EDDI (fix/review-engine-runtime)
Fixes from the CodeRabbit review and the full code review (against 01c3250) for the engine runtime and the packages around it. Each fix has a unit test that fails without it.
What changed and why
Runtime and REST
CronParser.parseFieldchecks a range's endpoints against the field's domain before enumerating it;0-2000000000used to allocate billions of boxed integers first (reachable from group cadences and schedules). The stepped loop no longer wraps on a huge step.DocumentDescriptorFiltertakes the deleted resource's id from the request path and theversionparameter only;?x=/<other id>made it mark another resource's descriptor deleted.LegacyPathRewriteFilterrewrites a v5 store prefix only at the start of the path, andrestricted/unrestrictedonly in/administration/{environment}/…. A substring replace turnedDELETE /admin/gdpr/restrictedinto an erasure of userproduction.WorkflowStoreClientLibraryreads secret instructions from the executablePropertySetterthe task configures to; the check forPropertySetterConfigurationnever matched, so failed turns of secret-collecting agents kept their input in dead letters.RestInterfaceFactoryaddresses the HTTP listener EDDI is bound to (SelfUrlResolver's logic), not always127.0.0.1, and forwards no caller token when that address cannot be resolved.
Scheduling and cluster
A schedule whose claim expired without an outcome (its node died or the fire wedged) counts as a failed attempt instead of being re-fired at once with
failCountuntouched — a node-killing fire could never dead-letter. The poll runs withconcurrentExecution = SKIP.tryClaimre-checksenabled(MongoDB and PostgreSQL).POST /{id}/fireand the MCPfire_schedule_nowtool are bounded by the fire timeout like a polled fire, so a manual Dream or ingestion run cannot outlast its lease and start twice. A disabled schedule can no longer be fired manually.A scheduled fire that starts a conversation runs the agent's startup workflow under
maxCostPerFire, and the turn gets the remainder.A dead letter a node kept locally while cut off from NATS is discarded, not forwarded, when its conversation no longer exists (erased in the meantime).
NATS TLS verifies the broker host name (
eddi.nats.tls.verify-hostname, defaulttrue); jnats sets no endpoint identification, so any trusted certificate for any host was accepted. Upgrade note: the broker certificate must now carry a SAN for every host ineddi.nats.url(an IP SAN for an IP address); see Clustering.CacheFactory.evictLocalremembers key hashes instead of SHA-256-ing every cached key on every eviction event.BoundedLogStore's DB queue is capped (50,000; drops are counted and logged at flush).BoundedFanOutclaims "not started" by compare-and-set, so an item reported as not sent can no longer go on and send.AgentTestRunnercharges an abandoned (timed-out) turn's cost when it completes.
Cleanup: unused ClusterConfig.withDegradedNonces/withDegradedRateLimits/withHitlRecovery removed; misplaced Javadoc in ScheduleFireExecutor and SchedulePollerService moved to its methods; the nine fire-log blocks in ScheduleFireExecutor share recordFire.
Docs: Clustering, Scheduling, Configuration Reference.
Second review round: a manual fire cut off at its deadline (REST and MCP) answers a timeout (504 / an error result) instead of an empty 200, and leaves the schedule claimed until its lease expires rather than releasing it while the worker may still run (
FireAbandonedException); a local dead letter whose conversation cannot be checked stays on the node instead of being published, and a legacy conversation without a stored state is no longer mistaken for a missing one; an unreadable startup spend leaves the turn no allowance instead of the fullmaxCostPerFire;BoundedFanOutno longer reports a gate-refused item as started;BoundedLogStorehands the database fixed-size batches; two docs/test corrections.
Design decisions
An expired claim is a failure, not a retry-now. The lease already outlasts the fire timeout by a margin, so a claim that expires means the fire is gone.
Hostname verification is on by default and can be turned off; an IP address in
eddi.nats.urlthen needs an IP SAN.
Not done (deferred)
Late charges of an abandoned agent-test turn (
AgentTestRunner) are still not persisted into the already-finalised run record; that needs an atomic adjustment of the terminal record or a hold on finalisation until the turn's persistence completes.Local dead-letter forwarding vs GDPR erasure has no shared erasure marker: a node that reconnects between the shared purge and the snapshot deletion can still publish an erased turn (the existence check now closes the common case).
The
SKIPpoll cycle still waits for its batch's fires, so one long fire delays claiming other schedules on that instance; splitting the short claim cycle from the bounded fire wait is a larger change to the poller.One fire-timeout mechanism instead of the executor's turn latch plus the poller's deadline: both now use
eddi.schedule.fire-timeout, and the manual path is bounded; merging them is a refactor.
🔒 fix(engine-surface): review findings on channels, Slack, MCP, A2A, sharing and outbound HTTP (2026-10-31)
Repo: EDDI (fix/review-engine-surface)
Fixes from the CodeRabbit review and the full code review (revision 01c3250) for the external surfaces: integrations/**, engine/mcp, engine/security, engine/a2a, engine/httpclient.
Channels and Slack
Only credentials are vault-resolved.
ChannelTargetRouterused to expand${vault:...}in everyplatformConfigvalue, so an editor could put a restricted reference into a webhook'sinputTemplateand read the plaintext in the resulting conversation. OnlybotTokenandsigningSecretare resolved now; everything else stays literal.An unresolved credential is dropped, for every channel type. The resolver passes an unresolvable reference through unchanged, and Slack used that public text as its HMAC key. The router now drops it (as it already did for webhooks), and
SlackSignatureVerifierrefuses a reference-shaped key outright.A Slack bot token honours its secret's
allowedHosts(checked againsthttps://slack.com/api/viaVaultHostAllowlist).The approval card no longer borrows another integration's bot token via the editor-chosen approval channel; resume outcomes are posted only for conversations owned by a Slack principal (
SlackUserIdentity.isSlackPrincipal), so a hand-madechannel:slack:...trigger intent cannot post with another integration's identity. Only the reservedslack:form counts: a rawU123ABC-shaped owner is just a shape an OIDC principal can share, so a legacy thread mapping gets resume posts again once its next message re-keys it.Event user ids are validated (
[UW][A-Z0-9]+) before they becomeslack:<team>:<user>, so a teamless signer cannot alias a workspace-qualified user by sendinguser: "T1:U2".Approval-card text is mrkdwn-escaped (tool previews, reason, agent label).
/v1matrix parameters (v1;x/chat/completions) no longer skipOpenAiAuthFilter's key check.
MCP
chat_managedre-checks USE on the retained conversation's own agent, and a refusal there is the neutral "you may not continue this conversation" (the owner does own it), not "you do not own this managed conversation".submit_group_human_input(and RESTPOST .../human-input) return an acknowledgement unless the caller is the owner or an admin. The Manager'ssubmitHumanInputresolves toGroupConversation | HumanInputAcknowledgement(narrow withisHumanInputAcknowledgement).McpAdminToolsno longer echoes raw exception text: caller-fixable failures are described, everything else returns a log reference (toolFailureoverload). Two refusals stay caller errors rather thanINTERNAL: a guard's QuarkusForbiddenException(ResourceAccessGuard,OwnershipValidator) answers errorCodeFORBIDDENwith its reason, and malformed JSON in aconfig/resourceMappingsargument answers "config is not valid JSON (line L, column C)" (McpToolUtils.readCallerJson) — resources, channels and triggers alike.list_agent_resourcesreads each distinct workflow once.McpApiToolBuilder: spec parameter names that collide with template namespaces are renamed (properties_2); suffix allocation is linear; a spec server URL is literal (declared variables take their defaults, other{...}is refused).OpenApiSpecFetcherrepeats the target-policy check after connecting (DNS rebinding) and discards the response if it now fails.
Security, A2A, outbound HTTP
With authentication off,
GET /agents/managed/...(creates a conversation) gets the same cross-site check as aPOST.Access requests answer a non-configuration id exactly like a missing one, after counting the attempt; a cascade skips
HUMANgroup members, budgets its seeding, and omits the name of a skipped resource the caller cannot view.A2A caps caller-chosen ids at 256 characters and refuses non-scalar JSON-RPC ids. Every JSON-RPC response now carries the
idmember,"id": nullfor an unreadable request, as JSON-RPC 2.0 requires (JsonRpcResponsewas NON_NULL).httpcalls: a cross-origin redirect hop keeps only content-negotiation headers (a credential can sit in any header name); with SSRF protection off a redirect hop's connected peer is held to the previous hop's address class.
Constant-time compares in the area now use
HmacSignatures.constantTimeEquals.
Deferred
Review eligibility pinned to the conversation's start version (
ConversationAccessGuard.requireConversationRead) needs a descriptor field written by conversation setup (engine/internal) — left for that owner.Former team members' share notifications need the share subject stored on the notification (store schema change) for a cheap read-time check.
Control-character scrubbers and domain normalisers (§6) live outside this area.
Files: ChannelTargetRouter.java, SlackSignatureVerifier.java, SlackEventHandler.java, SlackHitlResumeObserver.java, SlackUserIdentity.java, SlackHitlSupport.java, OpenAiAuthFilter.java, McpConversationTools.java, McpHitlTools.java, McpAdminTools.java, McpApiToolBuilder.java, OpenApiSpecFetcher.java, UnauthenticatedRequestGuard.java, ResourceSharingService.java, ConfigGraphResolver.java, WorkspaceNotifications.java, A2AWireFormat.java, A2AModels.java, McpToolUtils.java, HttpClientModule.java; docs: slack-integration.md, webhook-triggers.md, httpcalls.md, security.md, a2a-protocol.md, workspaces.md, group-conversations.md, architecture.md.
🐛 fix(groups): review findings — HITL scope, follow-up budget, task-force results, negotiation, JSON extraction (2026-10-31)
Repo: EDDI (fix/review-groups)
Fixes from the external code review and the CodeRabbit pass against 01c3250, group-conversation area.
What changed and why
HITL authority and read scope
Approvers can no longer cancel another user's running discussion. The group cancel on REST and on the MCP
cancel_group_discussiontool now usesHitlAccessGuard.mayCancelExecuting, like the 1:1 surface: an approver-only caller gets a paused-only cancel (cancelPausedDiscussion, one compare-and-set onAWAITING_APPROVAL/AWAITING_HUMAN_INPUT) and403/FORBIDDENon a running discussion. The Javadoc that claimed both surfaces already did this is now true.Responses no longer hand the transcript to callers who may not read it. The JSON approve, the human-input submission and the approver cancel return the conversation only to its owner or an admin; an approver or a pending HUMAN member gets
{"state": …}. MCPapprove_group_phaseandsubmit_group_human_inputmatch.A human-turn resume no longer runs as the submitter.
resolveHumanTurnbound the submitting member's identity to the rest of the owner's discussion, so later${caller:token}calls went out with their token. It now usesresumeCallerFor, the rule the approval resume already followed.Group HITL timeouts are bound to their pause. Approval
ABORT, human-turnABORTandSKIP_TURNpass the schedule'spauseId; a late fire no longer skips a newer human turn or cancels a discussion that has resumed. StaleskipHumanTurnOnTimeoutJavadoc ("never throws") corrected.
Discussion engine
Follow-ups respect the cost ceiling and are accounted.
followUpWithMemberrefuses once the effectivemaxCostPerDiscussionis spent (409), harvests the member's cost into the ledger, and propagates dynamic-agent tracking so sub-agents created in a follow-up are cleaned up with the discussion.A skipped or errored task-force member fails its task. It used to complete the task with a
nullresult, unblocking dependents that then ran without its output.SharedTaskList.completeTask/submitForApprovalnow refuse anullresult.Negotiation cannot record a stale agreement. Accepting a proposal withdraws the signer's signature from every other open proposal. An agreement keeps the dissents a dissent round recorded, and an arbitration verdict now replaces a dissent-only
NONErecord instead of being dropped.One balanced JSON extractor for every group engine (
EmbeddedJson): facilitator, retro, vote, negotiation, bid, convergence and debate parsers, and the VERIFY phase. The greedy first-{-to-last-}slice dropped a ballot followed by a brace in prose; the first-[-to-last-]slice made VERIFY fail open on any bracketed aside. Each engine accepts only an object carrying a key it reads (vote/votes/statement,bids,move,lessons,accept/proposal/concessions,passed,agreementScore,winner), so an unrelated object in the prose (an example, a quoted config,{}) is neither taken for the reply nor a rival to it. A reply carrying two well-shaped values is ambiguous and rejected — unchanged for the greedy engines (two objects never parsed as one), but a behaviour change for bids and bargain moves, which used to take the first. The documented fail-open on a truly unparseable verdict is unchanged.groupTranscriptis scoped by the phase'scontextScope, like the rendered prompt, and a member conversation's startup step now receives the group's dynamic-agent policy instead of the permissive standalone default.Stance extraction is linear.
leadSentencerescanned the prefix at every terminator.
Dead code: GroupConversationService.DEFAULT_ENV, PhaseOutcome.endDiscussion / END_DISCUSSION and the unreachable endDiscussionEarly handling, and the findMember / findMemberIncludingDynamic reflective delegators (covered directly by TaskForceEngineTest).
Not done
Retention revocation (
unretainAgent) still does not propagate to the group registry, and the discussion-wide creation cap is still checked against a per-member copy. Both need a change inmodules/llm(DynamicAgentToolsProvider/CreateSubAgentTool) to record revocations and reserve slots.The approval/reject CAS still compares only
state, not the pause id; that needs a multi-field conditional write in the storage layer.The remaining ~24 private delegators in
GroupConversationServicestay until their reflective tests are ported.Second review round: the follow-up cost-ceiling lookup propagates store failures instead of meaning "unlimited"; an exhausted
EmbeddedJsoncandidate budget is ambiguous, not a unique match; an ABORT no-result task turn stops the following waves; a blank task result is no result; a verification array is accepted only when an element carries asubject.
Files: GroupHitlCoordinator.java, RestGroupConversation.java, McpHitlTools.java, HitlAccessGuard.java, HitlTimeoutHandler.java, GroupLifecycleOps.java, TaskForceEngine.java, NegotiationEngine.java, EmbeddedJson.java, hitl.md, group-conversations.md, passing-context-information.md
Deployment and script hardening from the code review (2026-10-31)
Repo: EDDI, branch fix/review-infra. Low-severity findings in operator scripts and manifests.
install.sh: every Keycloak admin call now sends its bearer token through a 0600 curl config file (kc_authed_curl) instead of-Hon the command line, so it no longer shows in/proc/<pid>/cmdline. The already-running repair path verifies the downloadedkeycloak/eddi-realm.jsonagainst the releaseSHA256SUMSbefore posting scope definitions to Keycloak, and no longer sends stored Keycloak/Grafana admin passwords to a localhost port unless Docker reports a running container of this installation's compose project, for that service, publishing that port; when Docker cannot be queried the credentials are withheld. The check sits inkc_password_token, so every password grant is covered. A bearer token is accepted into the curl config only if it consists of token characters, and a failed realm download is truncated so no unverified partial file reaches Keycloak.gcp/provision-vm.sh:--vault-keyis removed. The key was appended to the installer flags, uploaded as startup-script instance metadata and echoed into/var/log/eddi-install.log; the VM now generates its own master key (in/root/.eddi/.envon the VM), like the Keycloak admin password. Passing the flag is an error that says why.docker-compose.yml,docker-compose.cluster.yml,docker-compose.postgres-only.yml: the bind guard fails closed. Onlyfalse/0/no/off(any case) count as "authentication on";TRUE,1,yes... no longer slip past the refusal.docker-compose.auth.yml:keycloak-admin-rotatewrites the.eddi-admin-verifiedmarker only after a successful login with the configured credentials. WhenKC_BOOTSTRAP_ADMIN_USERNAMEnames another user, the originaladminaccount is also tried withadminand rotated to the configured password if it still accepts it, so a renamed admin user can no longer certify a volume whoseadmin/adminremains. kcadm reads the configured password fromKC_CLI_PASSWORD(supported by kcadm 26.x) instead of--password, so it stays out of the process arguments; stdin is not an option because kcadm's prompt needs a console.Helm:
nats.externalUrlcontaining@is refused (it lands in a ConfigMap); newnats.externalUsername/nats.externalPasswordgo to the chart Secret. A password without a username, these values alongsideeddi.existingSecret(which would make them inert), and these credentials with a non-tls:///wss://server are all refused at render time;nats.externalAllowPlaintext=trueis the opt-out for an encrypted transport underneath EDDI. Chart2.12.0→2.13.0.docs/kubernetes.mdupdated.Kustomize: warnings in the ingress component (plain HTTP as shipped; the redirect annotation is named as ingress-nginx-only) and in the auth overlay (remove the localhost redirect URIs outside dev).
k8s/create-secrets.ps1writes the temporary key file into a private directory made before any cluster change (mktemp -d, mode 0700 from creation, on Linux/macOS; a per-user temp subdirectory on Windows), so it works on every PowerShell 7.x and a failure there cannot follow the-Forcedelete.docs-site/scripts/check-live.mjs: redirects are followed only to the configured origins (parsed origin comparison, not string prefix).scripts/cluster-demo/mock_llm.py: 10 s socket timeout, 1 MiB body cap, and loopback by default (demo.pybinds it to the docker bridge gateway with Docker Engine on Linux viaMOCK_LLM_BIND, keeps loopback on Docker Desktop, including Docker Desktop for Linux, never all interfaces, and aborts when the mock does not come up listening; the README's manual--external-mockexample sets the same binding).scripts/loadtest/loadtest.py: startup state moved from the world-writableresults/toscripts/loadtest/.state/(0700), written atomically through a freshmkstempfile per save (no shared.tmpbetween overlapping runs), a symlinked state directory refused, symlink ignored on read.src/main/docker/seed-demo-agent.sh: the provider key goes to curl on stdin, not-d, and a key or allowed host with anything but printable ASCII (a trailing newline included) is refused instead of being altered or producing invalid JSON — the curl image has no JSON encoder.
Decision: the shipped k8s base (unauthenticated quickstart), the Prometheus overlay and the other BY_DESIGN findings are unchanged.
🐛 fix(ingestion): resource limits in HTML conversion, crawling, extraction and the RAG pipeline (2026-10-31)
Repo: EDDI (fix/review-ingestion)
Fixes from the external code review and CodeRabbit for the ingestion and RAG modules. Almost all are denial-of-service shapes: compact input from a crawled page or an uploaded file that made a worker do work out of all proportion to its size before any limit was consulted.
What changed and why
Nested HTML tables were exponential (
HtmlToMarkdownConverter). Rows and cells were found with descendant selectors, so a table also rendered the rows of every table nested inside it, and again inside the cell holding them; cells restarted the depth count at zero, soMAX_DEPTHnever applied. Twenty nested tables did not finish. A table now reads only thetrs it owns (its children and those of its ownthead/tbody/tfoot) and a row only its child cells, with the depth carried through. The same doubling existed for asummaryorfigcaptionnested below adetails/figure; those are now taken from direct children only. A per-conversion work budget (Walk) backs this up: at most 1,000,000 elements visited, and the walk stops writing once the text written is certain to be truncated by the caller's cap; whitespace-only text between tags is not charged, or an indented page with a small cap stopped before its first paragraph. Ordinary tables render as before (checked differentially against the previous converter); a table with severaltbodys, atfootor a multi-rowtheadnow keeps those rows instead of silently dropping them, and a table whosetheadis empty takes its first body row as the header.Trailing newlines in a
<pre>were trimmed quadratically — onesubstringper newline. Now one backward scan and one copy.Sitemap
<loc>text was copied once per nesting level (WebCrawler.collectText): only a leaf<loc>/<link>counts now, and entries longer than the protocol's 2,048 characters are dropped. Links longer than 8,192 characters are not followed. The unusedBYTE_ORDER_MARKconstant is now the one the text-sitemap reader compares against, in place of a unicode escape.Exclude globs no longer compile to a backtracking regex (
UrlPattern). A pattern with several wildcards could take combinatorial time on a near-miss path from a crawled page; matching now steps the set of reachable pattern positions per character — pattern length × path length, always. It steps by code point, as the regex did, so?still matches one supplementary character. The one difference:*,**and?now match a line terminator (a decoded%0Ain a path), which the regex's.did not, so such a path can no longer slip past an exclusion.Spreadsheet cells were copied in full before the character limit was checked (
MarkdownTable). One shared string referenced from 64 header cells rendered hundreds of MB. Each cell is cut to what can still fit before it is normalised and escaped.maxSegmentsPerRunwas checked after paying for the document that crossed it (IngestionPipeline). It is now checked after splitting and before embedding: a document that would cross it waits for the next run (stamped as looked-at so it is not counted as missing), and a document larger than the whole budget is reported as failed instead of embedded in part.Ownership is re-checked after the embedding provider answers, before
addAll, so a run reaped during a stalled provider call can no longer republish a deleted file's chunks.Chunk settings are bounded:
chunkSize1–32768 andchunkOverlap≤ half of it are enforced inRagConfiguration.validate(), and both ingestion paths (IngestionPipeline,RagIngestionService) read them throughchunkSizeOrDefault()/chunkOverlapOrDefault(), which clamp a configuration stored before the check. An imported archive's out-of-range values are clamped the same way (RagConfiguration.clampChunkSettings(), fromRestImportServiceon create and update) rather than failing the import, and the Manager's chunk-size slider now pulls the overlap down to half the new size, so the default overlap of 64 no longer makes a chunk size of 64 unsaveable. The crawl pipeline's fallback for an explicitnullwas 1000/100 and is now the documented 512/64;RagIngestionServicethrew on an explicitnull.PDF:
PdfStreamBudgetremembered neither the nextendstreamnor the lastobj, so a file of unterminatedstreamkeywords was scanned in quadratic time — both are now carried forward.PdfDecodeBudgetrefuses a PNG/TIFF predictor whose declared row exceeds 4 MB before PDFBox allocates its two row buffers.PdfTextExtractornow charges the decode budget for the page content PDFBox reads around the counted filters: a lone/FlateDecode/Contentsstream (which PDFBox 3.0.8 inflates with aFlateFilterDecoderStreamit builds itself — confirmed in the bytecode) is decoded once through the counted filter first, and every reference to an unfiltered content stream is charged its length.
Design decisions
The table fix is structural (ownership + depth) and the work budget is a backstop, not the fix: the budget alone would have turned the exponential case into a silently truncated document.
Over-budget documents are deferred, not truncated: a partially embedded document recorded as ingested would hide its tail until the page next changed.
Not changed: the review suggested keeping an upload source's files when
forgetSourcefails to remove its chunks.RagSourceIngestionServiceTest.survivesAVectorStoreThatRefusespins the opposite as a deliberate decision — the configuration is already saved, so keeping the files leaves the operator no way to retry — and nothing would ever retry. A durable retirement/retry record is the real fix and is left open.
Files: HtmlToMarkdownConverter.java, WebCrawler.java, UrlPattern.java, MarkdownTable.java, PdfStreamBudget.java, PdfDecodeBudget.java, PdfTextExtractor.java, IngestionPipeline.java, RagIngestionService.java, RagConfiguration.java, RestImportService.java, rag-editor.tsx, rag.md, and the matching tests.
🐛 fix(llm): every model-phase exit records its spend; guardrail redactions reach the summarizer and recall tool (2026-10-31)
Repo: EDDI · Branch: fix/review-llm-cost · Review group H1 (LLM task core: cost accounting, spend gate, guardrails), from the code review report (§3 #2, #3, #4, #12, §5, §6, §7) and the verified CodeRabbit findings
What changed and why
Spend of a failed model phase was never recorded (#2). A task wrote its cost from the result of its model phase, so a phase that threw — a tool loop whose seventh round hit a provider error or the context limit, a cascade step that timed out, a cascade whose every step failed — lost everything it had spent: the tenant's monthly counter and maxCostPerConversationUsd never saw it, with or without onError: fallback. Now:
UnrecordedSpendcarries a failed phase's spend on the failure (a suppressed throwable, so it survives wrapping; drained at most once). The tool loop attaches its answered rounds and tool cost on every failure exit; the cascade folds a failed step's rounds into its run totals, prices a timed-out step's completed rounds from the step'sToolExchangeRecorder(which now records each round's usage as it finishes), and attaches the run's totals to the failure it finally throws — including a spend refusal, an open circuit, or a run ceiling (maxCostPerRun, duration, turn deadline) reached before a later step when every earlier step had failed.LlmTask.recordSpendis the one place spend reaches the step; a returned phase, a pause (recordPrePauseSpend) and a failure (recordFailedPhaseSpend) all pass through it. The returned phase's spend is now recorded as soon as the phase is over, before JSON conversion andpostResponsecan fail the task, and a rejected answer (responseValidationerror, a failed reprompt) records the answer's cost before it rethrows.
One price decision instead of six (§6). ModelPrices decides which prices a phase is charged at (task, or cascade step → cascade default). The tool loop used the task's prices for its mid-loop ceiling and its pause spend even inside a cascade step, so with prices set only on the cascade the ceiling ignored token spend and a pause recorded $0. The cascade now hands the loop its step's prices through the recorder, and a resumed cascade step is priced at that step again.
Tenant check before a tool call (#12). It compared the budget against the counter as it stood before the turn. It now passes the step's unmetered audit:cost plus the running loop's spend, the figure LlmSpendGate.admit uses for every other paid call.
Redactions leaked through the rolling summary and the recall tool (#3). Memory keeps the user's text as sent; pii-redaction, regex-filter and prompt-injection re-screen only the history window, so a turn they rewrote reached the summarizer (possibly another vendor), the summary placed in every later system prompt, and recallConversationDetail verbatim. GuardrailService.screenHistoricInput applies the history rule to one stored text; the summarizer screens the turns it sends and the recall tool the turns it returns. The summary sits in the system prompt inside the retrieved-context provenance envelope. The summary call and a tool result's summarize truncation are now admitted by the spend checks and priced at the task's rates (the summary on audit:cost, the tool summary as a priced summarizeToolResponse tool call). A cross-provider summary no longer inherits customHeaders, customQueryParams, customParameters or provider account keys.
Guardrails.
pii-redactionmissed a card followed by its CVV or expiry: the greedy run failed Luhn as a whole and was skipped. The digit-group windows of the run are now checked (longest Luhn-valid window wins; an unseparated number is never split), and a run that holds no card is searched again from its next digit group, so groups in front of a card (ref 1234 4111 1111 1111 1111) do not hide it. Unspaced+E.164numbers count as phones. Every pattern repetition is bounded, so the e-mail scan is linear (it was quadratic on a long local-part run).A
warnoutput guardrail withfailMode: closednow forces buffering — it can withhold the answer.The
expressionguardrail reads the answer the tolerant way too and treats a disagreement as undecided: strict extraction could skip an earlier duplicate-key object and approve a later one while the task's conversion consumed the earlier.The HITL self-checks judge an MCP/A2A call by its arguments as well (
RemoteToolRequestResolvers.Envelope): the resolved URI is the server, not the conversation or resource the call targets. The approved call's outgoing request is also refused when apreRequestinstruction pointed it at the running conversation (ApprovedCallScopecarries the conversation id).
Tool cost tracking. A non-finite toolPricing value fell through Math.max as NaN and poisoned every total; it now falls back to the default price. A timed-out tool call is charged. An entry found over budget is evicted only after every under-budget one, and the conversation whose charge triggered the eviction is never a victim (with the map nearly all exhausted entries it used to go with the other under-budget ones). A tool whose waiting pipeline thread is interrupted (a cascade step timeout, the agent watchdog) is charged like a timed-out one, and a timed-out cascade step is given up to CANCELLED_STEP_SETTLE_MS (1 s) to unwind before its tool spend is snapshotted, so that charge lands in the failed step's spend and maxCostPerRun. ToolCostTracker.resetConversation (unused) is gone.
Self-ungating argument check. SelfUngatingGuard.refusalFromArguments searched the raw arguments only, percent-decoded, so a JSON unicode escape (toolApprovals or an id with one letter written as \uXXXX) passed it while every downstream JSON parser read the plain key. It now also searches every key and string value of the arguments parsed as JSON, re-parsing string values that are themselves JSON a few levels deep.
Streaming. A tool-loop round that failed after forwarding text was retried into the same sink (partial + full answer); it is now raised as PartiallyStreamedRoundException, which the retry does not repeat. Its message is fixed: it used to carry the forwarded character count, and a count of 429 or 502-504 read as an HTTP status to LlmFailureClassifier, making exactly that failure retryable again.
Dead code / docs (§5). LlmSpendGate's misplaced Javadoc fixed; AgentOrchestrator's unused DEFAULT_MAX_PAUSES_PER_TURN, PAUSE_REASON_MAX_CHARS, mergeExternalTools and the test-only delegators removed.
Files: LlmTask.java, ToolLoopRunner.java, CascadingModelExecutor.java, ModelPrices.java, UnrecordedSpend.java, ConversationSummarizer.java, GuardrailService.java, PiiRedactionGuardrail.java, ToolCostTracker.java, ToolExecutionService.java, ToolLoopStreamingChatModel.java, SelfUngatingGuard.java; docs: langchain.md, tenant-quotas.md.
Design decisions
Carry spend on the failure, don't write it as you go. Writing each round into
audit:costimmediately would have changed the accounting model of every path; a carrier mirrors the pause'saddSpendand leaves the success path untouched.Summaries are priced at the task's rates. No price is configured for a summarizer; the task's model is the same provider and normally the dearer model, so this errs on the side of the budget. A dedicated summarizer price is a possible follow-up.
Screen at the consumer, lazily. The summarizer screens only the batch it sends and the recall tool only the turns it returns, rather than
modelFacingOutputsscreening the whole conversation every turn.
Not done
SecretRedactionFilterstill has noCookie/Set-Cookierule (owned by the secrets area; a fuzzed filter — left for that group).The per-conversation tool budget stays in memory (lost on restart); documented, with
maxCostPerConversationUsdas the durable bound.
🔒 fix(llm): review findings in the LLM module periphery — secrets, SSRF, tool limits (2026-10-31)
Repo: EDDI (fix/review-llm-tools)
What changed and why
Fixes from the two external reviews of revision 01c3250 (CodeRabbit security scan and the code-review report), for the built-in tools, model builders and embedding/A2A tool providers.
Secrets and destinations
Embedding/vector-store errors no longer quote parameter values. Parameters reach the factories with vault references already resolved, and RAG search responses and ingestion status return the error message to the editor: a
${vault:…}reference put intimeout,dimensionsor a store'sportcame back as plaintext. The messages now name the parameter only (and drop theNumberFormatExceptioncause, whose message quotes the input); themodel/modelNameconflict check runs before resolution.Vertex
apiEndpointis an endpoint key forallowedHosts(ChatModelRegistry.ENDPOINT_KEYS), and an OpenAI-compatible preset withoutbaseUrlis checked against the URL its editor-chosenregionselects (newILanguageModelBuilder.defaultEndpoint).Secret invalidation reaches models built through
${vars:…}: the cache key holds unexpanded parameters, so every variable-bearing chat model is evicted with a changed secret.Embedding model and store caches use structural keys instead of
TreeMap.toString(), which could render two different parameter maps identically and share one client.Cached model clients re-check their destination before every request.
BoundedJdkHttpClienttakes theOutboundTargetPolicyand validates each request URL (OpenAI, OpenAI-compatible, Ollama, Anthropic, Gemini, Mistral; OpenAI and Ollama embeddings) — a hostname validated once at build was otherwise re-resolved unchecked for the model's whole cache life (DNS rebinding).docs/security.mdgains a row for this path and names what stays build-time only (other SDK transports, MongoDB Atlas replica-set discovery).
Tools and providers
WebScraperToolandPdfReaderToolsend model-chosen URLsSTRICT, notHOPS_ONLY, so the first hop gets the facade's post-connect re-check.OpenApiSpecFetcher(policyNONE, own loop) re-validates each hop after the response arrives.WeatherTool/WebSearchToolkeepHOPS_ONLY: their hosts are fixed.WebScraperTool.extractWithSelectorrefuses CSS escapes (jsoup decoded:\6d atchesinto a regex selector) and sibling combinators~/+(quadratic evaluation the parse timeout cannot interrupt); the same characters in quotes, attribute selectors,:contains(…)text or:nth-*formulas are not combinators and still pass (unterminated quotes or brackets fail closed).TextSummarizerToolsplits sentences with a linear pattern (the old one was quadratic on a punctuation run without whitespace).DataFormatterTool.csvToJsoncaps rows and output size;extractJsonValuereports a missing/non-array field instead of an NPE.AttachmentTextExtractorextracts with a bounded stripper: an operator budget, a deadline and interrupt checks (repeated unfiltered forms spent no decode budget).A2A discovery bounds agent-name/skill-id length and skill count, logs duplicate skills once per card, and skips a tool name another peer already registered (the later peer's executor used to replace the first's under the first's spec).
find_agents_by_capabilityfilters by the caller's USE rule, as the REST search does.converse_with_agentcarries the chain's depth ceiling (delegationDepthMax, inside the reserved context namespace) so a delegate cannot extend a chain the originator capped.Group artifact and task tools honour a member's non-empty
builtInToolsWhitelist(slugsartifacts,group_tasks). Behaviour change on upgrade: a member whose LLM task already has a non-empty whitelist stops receiving these tools in groups that enable them untilartifacts/group_tasksis added to that list. The Manager's tool picker (BUILT_IN_TOOLSinui/manager) now offers both slugs, and switching a task to whitelist mode there selects them along with the rest — they are self-gating, so they enable nothing outside a group that asks for them.FetchToolResponsePageToolis marked@ConversationBoundand no longer served from the tool cache.UserMemoryToolre-checks cancellation right before writing and takes back an insert that landed after the turn was cancelled (erasure race).Negative rate limits are refused at save time (
ToolRateLimiter.validateLimits, called fromLlmStore);0blocks a tool.ObservableChatModel/ObservableStreamingChatModellog model responses at DEBUG, like requests.The confidence judge's JSON extraction delegates to the new
ModelOutputParser.extractFirstObject. Removed the unusedCustomToolConfiguration.Second review round:
UserMemoryToolno longer deletes anything to make room before the write has landed (the eviction victims are planned first, deleted afterwards, each only if unchanged since it was chosen), and a cancelled turn takes back only its own write, conditionally, leaving a different turn's entry under the same key alone; A2A skill filters compare the skill id as the card gave it, and an id too long for a tool name keeps a hash of the whole id so distinct long ids stay distinct tools.
Design decisions
Redaction instead of rejecting vault references in non-credential fields: the leak was the echo, and rejecting would break any config that legitimately keeps e.g. a host in the vault.
The per-request destination check is the MCP transport's approach (pre-send check, cache-expiry residual), not address pinning — the JDK client has no resolver hook.
DataFormatterToolandOpenAiCompatibleLanguageModelBuilder.putPathkeep their own path walkers:PathNavigatorworks on maps with+/-arithmetic (a hyphenated JSON key would resolve tonull) and itssetValueneither creates intermediate maps nor copies shared ones.
Deferred
Jlama loader allocation/path-traversal findings are in
jlama-core0.8.4 (third party); needs an upgrade or an operator allow-list of model repositories.MongoDB Atlas replica-set discovery is not re-checked against the outbound policy (documented); forcing
directConnectionwould breakmongodb+srvclusters.A store-level erasure generation for user memories (needs
IUserMemoryStoreandGdprComplianceServicechanges).Provider-builder
build()/buildStreaming()duplication: langchain4j's separate builder types make a shared helper no cleaner.
Files: ChatModelRegistry.java, EmbeddingModelFactory.java, EmbeddingStoreFactory.java, BoundedJdkHttpClient.java, A2AToolProviderManager.java, WebScraperTool.java, security.md, secrets-vault.md, langchain.md, group-conversations.md
fix(modules): pipeline-module review findings (2026-10-31)
Repo: EDDI (fix/review-modules)
What changed and why
Fixes from the code review and the CodeRabbit sweep over the pipeline modules (nlp, apicalls, properties, templating, rules, mcpcalls).
apicalls
A delayed HTTP call (
preRequest.delayBeforeExecutingInMillis, retry backoff) no longer hands its blocking send to the single sharededdi-schedulerthread. The delay is served on the calling turn thread, so one slow request cannot queue every delayed call in the node behind it, and an interrupted wait sends nothing instead of leaving a queued send to fire later; the thread's interrupt flag is restored when the step fails on it.Vault references are found with the linear
SecretReference.scanner()(request building) and a new linear scanner inConfigReferenceGuard, instead of regexfind()loops that rescanned the remaining text at every unterminated${vault:opener (quadratic work on a long input).A vault secret resolved into the URL, body or a query value now disables redirect following, as a header secret already did; the redirect handler would otherwise replay the body on a 307/308 to a host the secret's
allowedHostsnever judged.The malformed-JSON warning no longer logs a resolved credential that the parser quoted in its message.
nlp
POST /parser/{parserId}rejects an id that is not a store id (hex or UUID) before authorizing it. An id such as<other>?version=3&x=was authorized as one resource and resolved to another.The merged-terms and Damerau-Levenshtein corrections skip tokens over 100 characters (
ICorrection.MAX_CORRECTABLE_LENGTH): their cost is quadratic in the token length and the parser limits the number of tokens, not their length.PunctuationNormalizerProviderno longer stores one parser'spunctuationRegexPatternin a singleton field that became the default of every parser built afterwards.PunctuationNormalizermatches under the same 200 ms regex budget as dictionary regexes, because the pattern can leave its character class.
properties
scope: "secret"withtoObjectPathis rejected on save and at run time (the copy returned before any vaulting). A secret instruction whose value is converted to an object and refused now scrubs the raw input first. Properties extracted earlier in the turn can no longer put a vaulted plaintext back or overwrite a vault reference created in the same execution (one from an earlier turn stays replaceable, as before); a normalized copy of the plaintext (punctuation or whitespace stripped by a parser normalizer) is caught by the same normalization-insensitive match the input scrub uses, and the whole value is replaced. The live output scrub is deep, so a credential in a typed output item (an LLM reply) is removed.
rules
dependencyconditions evaluate a rule once per evaluation instead of once per path to it; a chain of rules that each depend twice on the previous one cost 2^n evaluations. A remembered result is not reused for a rule on the active trace, so a rule depending on its own (duplicated) name still fails as an infinite loop.connectoroperatoris case-insensitive, defaults toAND(as documented) and an unknown value is refused at validation instead of silently becomingOR;getConfigs()/clone()can no longer throw on a connector without one.Removed
Rule.clone(): unused, and it dropped the rule's actions.
mcpcalls
An MCP call without a
retryblock now makes a single attempt (it used to fall through to the shared three-attempt default, so a side-effecting tool could run three times), and retries stop when the turn deadline leaves no room. Inside a turn deadline the attempt runs on the retry helper's executor, so the task now carries the turn's caller across (CallerIdentityContext.propagate): without it an MCP server'sapiKey: "${caller:token}"would have found no caller there and failed closed. An interrupted turn is rethrown as such: it no longer writes an<name>Errorentry, runspostResponseor continues to later calls undercontinueOnError.
templating
str:concatandstr:joinare measured before the generated resolver builds them, so reusing one permitted value many times can no longer allocate pasteddi.templating.max-output-chars. The measurement follows Qute's varargs binding: a list is one argument rendered with its brackets and separators, and only a soleObject[]is expanded into its elements.Template preview redacts the
snippetsnamespace for restricted callers whatevergetAll()returns.
Not changed (decisions)
SecretPropertyVaultstill reads thetenantIdconversation property: the guard reads the same property and multi-tenancy is not implemented yet; deriving the tenant from trusted context is a product decision.CapabilityMatchConditionstays unfiltered: rules run off the request thread, where the access guard has no identity to filter by.Quick-reply expression values from an HTTP response are not escaped (needs an expression-escaping design); a per-parse regex deadline for
RegularDictionaryand a cumulative loop-result budget in the template engine are left as defense-in-depth follow-ups.An MCP attempt abandoned at the turn deadline is not cancelled inside the transport: langchain4j's
DefaultMcpClientexposes no cancellation of the in-flight request, and a request already sent cannot be recalled by any client-side cancel. Retries stay opt-in, so the tool runs at most once.The dotted-path walkers in
OutputMatcherandResponseShapeValidatorare not replaced byPathNavigator: its arithmetic-expression fallback and array syntax differ from their strict lookups, and both live outside this area.
Files: ApiCallExecutor.java, ConfigReferenceGuard.java, RestSemanticParser.java, PropertyInstructionExecutor.java, Dependency.java, Connector.java, McpCallsTask.java, BoundedFormat.java
fix(secrets): review findings on the vault grant check, redaction, connections and legacy sealing (2026-10-31)
Repo: EDDI (fix/review-secrets)
Fixes from the 2026-10 external review (CodeRabbit plus a manual code review) in secrets/** and connections/**.
What changed and why
Deploy-time grant check (VaultGrantChecker): it now reads what the runtime reads
A step's config URI is trimmed, as
ResourceUris.requiredoes at runtime, and the store is picked by an exact match on the config URI's host, the keyResourceClientLibraryreads with. Before, a URI with surrounding whitespace failed to parse and went unchecked, a step typed with theai.labs.langchainalias went unscanned, andcontains()on the step type could pick the wrong store, fail, and skip the config.Every string value is scanned on its own, not the serialized document. An unterminated
${vault:xin one field used to run on to the next field's closing brace and swallow the real reference behind it.A workflow, credential-bearing extension config or
${vars:…}that cannot be read is now a violation (fail closed), as an unreadable connection already was. Unreadable grant metadata still counts as granted, as documented.
Redaction
ConfigSecretRedactor: a header or query map stored as a JSON string (customHeaders,customQueryParams) has its entries judged like a realheaders/queryParamsmap. In a credential field, a value with no reference is always a literal (a scheme word alone included), and symbols or non-ASCII letters beside a reference no longer count as scaffolding.Query names are classified percent-decoded in
ConfigSecretRedactor,SecretScrubberandUriRedactor(%61pi_keyisapi_key).UriRedactor's shared header rule addscookieandsignature(substring) andsig,session,sessionid,sid(whole word).SecretRedactionFilter: a connection string with an empty username (redis://:pw@host) and a password containing a comma are redacted; Digest directives allow whitespace around=. ACookie/Set-Cookieheader has every cookie value redacted with the cookie names kept (Cookie: sid=<REDACTED>; theme=<REDACTED>);Set-Cookieattributes such asPath,ExpiresandHttpOnlystay readable, and a second pass is a no-op.Linear time:
SecretRedactionFilter's optional vault-reference prefix is bounded (a run ofpassword:${vault:was quadratic), andSecretScrubber,VaultHostAllowlist.referencesInandCredentialReferenceResolveruse the linearReferenceScannerinstead of[^}]*regexes.SecretScrubber.redactFreeTextrestores its masks in one pass.
Vault
SecretResolver: a value read while an invalidation ran is no longer left in the cache for the TTL (invalidation counter, re-checked after the put).VaultHostAllowlist.requireAllowedrefuses a reference whose secret does not exist instead of skipping it: on the API-call path it runs after resolution.A secret's
allowedHostsnow applies through a connection: aSTATIC/BASICconnection's vault references are checked against the call's target, an OAuth client secret against the token URL (CredentialReferenceResolver.requireHostsAllowed).VaultSecretProvider.store: a rotation is update-only (ISecretPersistence.updateSecretIfPresent); a row deleted mid-rotation is treated as a create and needs a grant, instead of being re-created withallowedAgents: ["*"].Legacy unbound (no-AAD) data: every open through the fallback is counted (
eddi.vault.legacy.unbound.opened.count), andeddi.vault.accept-unbound-legacy-data=false(defaulttrue) retires the fallback once a DEK rotation has re-sealed everything. Re-sealing a legacy secret on read also replaces its bare SHA-256 checksum with the keyed form.decryptSecretWithFallback(a one-line wrapper) is inlined. The property is in the configuration reference and the counter in metrics.md, the monitoring guide and the Full Metrics Reference dashboard ("Vault errors" panel).updateSecretIfPresentand the checksum-replacing re-seal have their own unit tests on both stores.RestSecretStore.updateGrantevicts cached clients when the host list was written, even if the grant write after it is refused (409) or fails.AutoVaultedSecrets.belongsToUserreads the owner from the slot's second segment only; a property name carrying another user's hash no longer makes the slot theirs.
Connections
RestConnectionStore.createConnectionrequireseddi-adminin the implementation too: the archive import (open toeddi-editor) called it directly. An editor's import now skips connections with a logged reason.The OAuth callback re-reads its claimed state row after storing the grant and discards the grant if the row is gone: a GDPR erasure that ran during the token exchange no longer leaves a live refresh token behind (
IOAuthStateStore.exists, Mongo and Postgres).A
client_credentialsmint checks the connection's id before the exchange and after the write, and discards the grant if the connection was deleted or re-created under the same name meanwhile.requirePrincipalrefuses a user whose principal name is the reserved__service__.Docs: the
enabledconnections switch governs account linking only; it does not stop${connection:…}resolving (Connections).
Design decisions
Store chosen by config-URI host, not step type. Whichever task a step runs, the document it loads is the one the config URI names, so that is what the scan reads.
accept-unbound-legacy-datadefaults totrue. Turning the fallback off before a rotation would make never-read legacy rows unreadable; the counter tells the operator when it is safe.The connections master switch was documented, not enforced on resolution. It defaults to off, and
STATIC/BASICconnections work with it off today; enforcing it would break those deployments.
Not changed
VaultGrantImpactAnalyzer: a deployment racing a restrictive secret creation is still unseen (already documented). Closing it needs a post-record re-check on the deploy side (AgentFactory), outside this area.ConnectionRegistrycan re-cache the previous version of an updated connection for up to its one-minute TTL: the descriptor advances inDocumentDescriptorFilter(engine) after the store has invalidated.allowedHostsentries without a port still admithttp; requiring https for vault-backed hosts is a policy decision.A Qute-looking credential value such as
{abc}is still read as a template.
chore(ui): review cleanup — RTL icon mirroring, dead code, chat query keys (2026-10-31)
Repo: EDDI (chore/review-ui-cleanup) — Manager (ui/manager) and Chat UI (ui/chat) only. The behavioural fixes from the same review are on fix/review-ui.
What changed and why
RTL: directional arrows and chevrons carry
rtl:rotate-180— 59 icons across the Manager plus the three page-localBackLinks (agent-detail,conversation-detail,workflow-detail). In Arabic they pointed the wrong way: "back" arrows pointed forward and collapsed chevrons pointed at the content.rtl-directional-icons.test.tsscans the sources so a new left/right arrow or chevron without anrtl:variant fails the unit run.Dead code removed:
use-coordinator.tsandcreateCoordinatorEventSource,useUpdateAgentWorkflows,useDeployAgent,formatDateOnly,mapIfArray,debounced-inputs.tsx,cascadeHasErrors,EVENT_STATES/MATCH_OPS, the Variables page's unreachablecopyReftemplate branch, six unreferenced type aliases, and the Chat UI'sSUPPORTED_LOCALES, with the tests that only exercised them.Query keys:
chatKeysinquery-keys.tsreplaces nine hand-typed["chat","deployedAgents"]keys, and theagentKeysheader no longer claimsagentKeys.allclears the detail, descriptor and prompt entries.
Design decisions
Not changed: the SSE payload interfaces in
hitl.ts/groups.tsthat nothing references (they document the wire format next to their used siblings), the remaining ~100 single-hook literalqueryKeyarrays (the header allows a key read and invalidated inside one hook), andgetDeadLetters/replayDeadLetter/discardDeadLetter/purgeDeadLetters(still wrapped by tests).No behaviour change is intended: the branch is independent of
fix/review-uiand merges cleanly with it in either order.
Tests
npm run typecheck, npm run lint, npm run i18n:check and the full Vitest run in ui/manager; npm run typecheck, npm run lint and vitest run in ui/chat.
fix(ui): review findings in the Manager and Chat UI — operator gate check, approval binding, hostile-input bounds (2026-10-31)
Repo: EDDI (fix/review-ui) — Manager (ui/manager) and Chat UI (ui/chat) only. The mechanical half of the same review (RTL icon mirroring, dead code, chatKeys) is on chore/review-ui-cleanup.
What changed and why
Platform Operator
gateLooksInstalled(operator.ts) now judges a gate the way the backend'sToolApprovalPatternsmatches it:*is a wildcard anywhere in a pattern. Anexemptentry is refused when it can match anyhttp.{post,put,patch,delete}:/…address (*:*,h*,*post*,http.*:/xall pass the old check and exempt every write at runtime,exemptbeing tested first), and the same test now applies to the AUTO_APPROVErulescheck, which used to omit thehttp.*:prefix.requireApprovalmust cover every write method with a<head>*pattern — a PATCH-only gate used to certify an operator whose POST/PUT/DELETE calls ran unapproved. The gatebuildToolApprovals()writes (all four methods, unchanged since it was introduced) passes, so no shipped operator is newly reported as ungated. A per-tasktoolApprovalsoverride lives in the llmstore document and is not inspected here; the backend's defaultstrictmode only lets it strengthen the agent gate. The verifier is outside the revision fingerprint (the prompt, allow-list andbuildToolApprovals()are unchanged), sooperator-revision.jsonstays at its value.The same judgement drives the
agentCreatedWithoutGateapproval warning, which now also fires for a gate covering only some write methods; its text (all 11 locales) says the gate does not cover every write method instead of claiming there is no gate.The operator chat's resume now carries a
pauseId(use-operator-chat.ts,operator.tsx): the id of the pause the card showed, else the displayed pause's start, else the pause read just before the resume. If the displayed pause and the one read now differ, the decision is refused client-side. A top-level REJECTED could previously land on a pause nobody had looked at.The cascade approval preview reads
redeploy/compatiblethe way Jackson's default coercion does —"true","True","TRUE"(trimmed) and any non-zero integer are true — so a redeploy requested in one of those forms no longer shows as none.
Hostile or oversized input (Manager)
group-utils.ts: the markdown link-destination mask is bounded (](runs with no)rescanned the text from every opener, ~5 s per 100k characters);maskIndentedCodebuilds its line table once instead of re-splitting the prefix for every indented run; the ✅/❌ verification header is parsed with string steps and a per-line cap instead of a backtracking regex.formatJsonSafely(artifacts panel) returns content over 64 KiB or nested deeper than 32 as written. The sync diff viewer givesdiffLinesa time budget and falls back to one removal plus one addition.useLatestVersionscounts only descriptors whose own id is the requested resource (thefilter=search is a substring match); erasure also sweeps theworkforce-analyticscache; a conversation loaded for one agent is refused when it belongs to another; selective export sends the snippet and schedule selections (an empty list means none) instead of exporting every one.
Correctness
Agent config number fields keep a typed
0(pruneStaleAfterDays: 0was saved as 90, the opposite of "never prune"); the Dream cost default shown is the backend's 0.50, not 5."Switch to latest" is disabled while the editor holds unsaved edits. The Workforce settings page reads the group's current version when the URL names none (and offers Retry if the lookup fails), registers with the in-app navigation guard, and its delete flow (like the agent, channel and group-config delete flows) calls
allowNextNavigation(). A deleted group discussion no longer re-selects itself while the list still holds it.The Variables page documents
{vars.key}(Qute), not{{vars.key}}, in all 11 locales. RAG ingestion shows translated status labels (9 newragEditor.status*keys, all 11 locales), polls for ~11 minutes (2 s, then 10 s) and then says "stopped checking" instead of declaring a failure while the server is still ingesting;kbId/ingestionIdgo throughseg().The deploy/undeploy button no longer acts on another agent's status shown as placeholder data. The tool-approval pattern validator accepts
/ { }and method-qualifiedhttp.<method>:patterns like the backend and rejects the shapes it rejects. Upgrade preview and live sync sendX-EDDI-Space; the cluster activity stream re-reads the bearer token on each reconnect. The update-check card now says the request origin is sent (a CORS fetch always carriesOrigin).Chat UI:
embed-authbacks off (10 s doubling to 5 min) when the host keeps handing over an already-expired token, instead of re-requesting every 5 s forever.Second review round: the export sends an empty snippet/schedule selection (not an omitted one) when the preview lists none of that type; a stopped RAG ingestion row says "Last known" and has a "Check again" action; the markdown link-destination pattern takes its run atomically (about twice as fast on a hostile 100k-character input; the remaining cost is the bounded forward scan) and a verification header is bounded by its header part, not the whole line; the operator gate check matches wildcard patterns with a linear matcher (
lib/glob.ts, shared with the HITL pattern validator) instead of a generated regular expression that went exponential on runs of*; after aPauseChangedErrorthe approval status is keyed to the pause that is paused now; Deploy stays unavailable until the version's status is known (first fetch and failed lookups included); deleting a discussion drops its retained stream.
Design decisions
ui/manager/AGENTS.mdnow says the app runs under a data router (createBrowserRouter), asmain.tsxand §4b already did.The Variables page's unreachable
copyReftemplate branch (it still builds{{vars.key}}) is left alone here:chore/review-ui-cleanupdeletes it, and editing it on both branches would make the two PRs conflict.
Tests
Focused vitest suites for each fix; npm run typecheck, npm run lint and npm run i18n:check pass in ui/manager; npm run typecheck, npm run lint and vitest run pass in ui/chat. resource-detail-rag-upload-source.test.tsx (3 tests) fails on the base commit as well and is untouched.
CI: the changelog collation PR no longer runs the Java suite (2026-10-27)
Repo: EDDI, branch ci/skip-tests-on-collation-pr.
What changed: .github/workflows/ci.yml — detect-changes now forces operator_docs=false for a pull request whose head is this repository's own chore/collate-changelog branch and whose diff contains only files the collator writes (docs/changelog.md, docs/changelog.d/*, docs/changelog/*.md, docs/SUMMARY.md). Build & Test and the dependent jobs are skipped for it; a skipped required check still satisfies branch protection.
Design decisions: the exemption checks the diff as well as the branch name, because a name alone was already abused as an opt-out of the Changelog Discipline job. Any other file on that branch restores full gating.
📐 feat(docs-site): resizable and hideable sidebars (2026-10-27)
Repo: EDDI (feat/docs-site-resizable-sidebars)
What changed and why
The docs site's two sidebars — navigation on the left, "On this page" on the right — can now be resized and hidden on desktop, so a reader can give the page the room it needs.
Resize: drag a sidebar's inner edge. The handle is also a keyboard control (
role="separator", ← → in 16px steps, Home/End for the limits, double-click to reset), with limits of 200–520px (navigation) and 180–480px (table of contents).Hide: a button in the header for each side — before the logo for the navigation, before "Website" for the table of contents — with
aria-expandedand a label that says what it will do.Remembered: widths and hidden sides are kept per browser in
localStorage(eddi-docs-layout) and applied by an inline script before first paint, so pages do not jump. That script is generated from the same functions the drag code uses (sidebar-layout.mjs), so its limits cannot drift; a test runs it against a fake document.Starlight sizes both sidebars from one
--sl-sidebar-width; each side now has its own variable, and the right sidebar's fixed box gets an explicit width (Starlight relied on a fixed-width inner container). Drags measure againstdocumentElement.clientWidth, notinnerWidth, so the right pane's edge stays under the pointer when the page has a scrollbar — both found while testing in the browser.Desktop only: the navigation from 50rem, the table of contents from 72rem. Phones keep Starlight's own menu and "On this page" dropdown, untouched.
docs/mcp-server.md: the same one-line anchor fix as #1166 (identical bytes, so whichever lands first, the other merges cleanly), so this branch builds against today'smain.
Verification
npm testindocs-site/: 65 tests, 11 of them new for the layout logic; mutation-checked (swapping the right pane's arrow direction, dropping the clamp from the pre-paint script).In a browser at 1440px: dragging each edge (left to 400px, right to 404px with the edge exactly under the pointer), keyboard steps and Home, hiding and showing both sides (content re-centres, handles disappear, labels flip), persistence across reloads with no flash, double-click reset; at 375px nothing new appears and nothing overflows.
SSE keep-alive on turn streams (2026-10-27)
Repo: EDDI · Branch: feat/sse-keepalive
Problem. A turn can go a minute without a single SSE event: a model that is working out a tool call, or a structured (JSON) reply, emits no tokens until it is done. Load balancers and proxies close a connection that carries no bytes for their idle timeout — 60 s on an AWS ALB by default — and with eddi.streaming.cancel-on-client-disconnect on (the default), that close also discards the turn. Seen in a production-like deployment on 2026-10-27: a turn spent about 50 s before its first action, and the slowest ones run past 60 s.
Change. RestAgentEngineStreaming writes an SSE comment line, : keep-alive, on a turn stream that has carried nothing for eddi.streaming.keepalive-interval-seconds (default 15, 0 turns it off).
One daemon thread (
eddi-sse-keepalive) ticks every open turn stream at the interval; a tick writes only when the stream has been silent for the whole interval, so a stream of tokens carries no extra frames.Writes to the sink are serialised, so a comment never lands between the lines of an event.
The tick stops when the stream ends (
done,error, start failure) or the client is gone.A tick that finds the sink closed, once the turn has written an event of its own, is handled like any send to a vanished client: with
cancel-on-client-disconnecton, the turn is cancelled during the silent stretch instead of at its next event, on a separate thread so the cancel's store work does not delay other streams' ticks. Before its first event a turn may still be queued behind another turn of the same conversation, whose cancel would hit that other turn, so the tick then only stops and the turn's own first event handles the disconnect, as before. A send that fails on a sink that is still open is not taken for a disconnect, as before.The tick runs every quarter interval, so the longest silence is about 1.25 intervals.
SSE clients ignore comment lines by definition, so no consumer changes.
docs/rest-api-reference.mdnotes that a hand-written parser must skip lines starting with:.
Files. RestAgentEngineStreaming.java, new RestAgentEngineStreamingKeepAliveTest (9 tests, the scheduler and clock replaced so each tick runs by hand), configuration-reference.md, rest-api-reference.md.
Decision. Comment frames rather than a named ping event: a named event reaches every client's handler and some treat unknown events as errors, while comments are dropped by every SSE parser. The interval is a setting because the right value depends on the shortest idle timeout between EDDI and the client.
An untyped context entry is a 400, not a 500 (2026-10-27)
Repo: EDDI · Branch: fix/context-entry-without-type
Problem. POST /agents/{agentId}/start answered 500 with a NullPointerException ("contextType is null") when a context entry had no type. The usual cause is a caller wrapping the map in {"context": {…}}: the start body is the context map, so Jackson reads context as one entry with no type, and ConversationMemoryUtilities.prepareContext switched on it. Found on a staging deployment while scripting an end-to-end test; a say with an untyped entry went the same way.
Change.
RestAgentEngine.requireTypedContextrefuses a null or untyped entry with400{"error": {"code": "INVALID_CONTEXT", …}}naming the key and the valid types. It runs onstart, onsayand on the streamingsay, before the turn is queued or the stream is opened, next to the existing input checks.prepareContextskips an untyped entry like an unknown type instead of throwing, so a producer other than these three endpoints cannot crash a turn with it either.rest-api-reference.mddocuments the rule.
Tests. RestAgentEngineClientContextTest (start, say and streaming say: 400, nothing forwarded, no SSE frame) and ConversationMemoryUtilitiesTest (an untyped entry is skipped, the others kept).
🔀 fix(docs-site): docs.labs.ai redirects with a 301, kept forever; repair the docs build on main (2026-10-27)
Repo: EDDI (fix/docs-site-301-redirects)
What changed and why
301, not 308. The decision for the docs move is now final: docs.eddi.technology is canonical, and docs.labs.ai answers every path with a 301 to the same path there, for good (released images print docs.labs.ai links forever). The generated redirects used Vercel's permanent: true, which sends a 308. That is just as permanent, but 301 is what was decided and what every crawler and HTTP client has always read as a move. redirects.mjs now writes an explicit statusCode: 301 on all 434 rules (REDIRECT_STATUS), and a test fails if any rule loses it or uses permanent again. Vercel's own trailingSlash redirect (/x → /x/) stays a 308, because it cannot be configured; check-live.mjs therefore checks the status of the hop that leaves docs.labs.ai and requires it to be the 301, whichever order Vercel runs the two in.
The Vercel project now builds from the repository root. The eddi-docs project was created with Root Directory docs-site, and Vercel checks that the Root Directory exists before any ignore step runs — so every push to a branch without docs-site/ failed, with a failure email: the orphan metrics data branch that docker-pull-notify.yml writes every 10–35 minutes, and every branch cut before the site existed. The Root Directory is now the repository root (it exists on every branch), vercel.json moves to the repository root (Vercel reads it from the Root Directory) with cd docs-site && … commands and output docs-site/.generated/dist, and the ignore step test ! -d docs-site || git diff --quiet HEAD^ HEAD -- docs-site docs PRIVACY.md vercel.json skips a branch without the site and any commit that does not touch the docs. The project settings carry the same commands, for branches without the root vercel.json (main until this merges). The Docs Site workflow now also watches vercel.json, and a test pins the layout.
Only main deploys. Decided the same day, after branches that had merged a broken main (the ratings anchor below) started failing their previews and emailing: the ignore step now begins with [ "$VERCEL_ENV" != production ] ||, so every non-production deployment — every branch and pull request — is skipped. Pull requests keep the Docs Site check, which builds the site and validates every link; the project setting carries the same command. On main, "did the docs change?" is asked against the last successful deployment ($VERCEL_GIT_PREVIOUS_SHA), not HEAD^, so a docs build Vercel cancelled is still published by the next commit; without a previous deployment in the clone, it builds. (Vercel caps the project setting at 256 characters, so the command is written compactly; a test holds it under the cap.)
main's Docs Site check was red. #1136 (conversation ratings) linked mcp-server.md to conversation-ratings.md#mcp-tools-and-the-platform-operator, a section that page does not have, so the docs build has failed on every push to main since. The link now points to the section that describes the same scoping — "Analyzing and triaging (the people running the agent)". The ratings page's status note says it covers the MCP rating tools, but it has no section on them; adding one is for the ratings work, not this fix.
Verification
npm testindocs-site/: 55 tests, including the new 301 test.check-liveagainst a local stand-in for Vercel that appliesvercel.json, with a second port posing as docs.labs.ai: every legacy URL ends on the right page on the canonical host, leaving the legacy host with a 301. With the host rule switched back topermanent(308), the legacy checks fail.
Next
The cutover itself: phase 5 of planning/docs-site-migration-plan.md.
🐛 fix(hitl): email-notification review follow-ups (2026-10-27)
Repo: EDDI (fix/hitl-email-review-followups)
What changed and why
Follow-up to the HITL email notifications PR (#1141), for the review threads left open when it merged.
Docs and Javadoc named the wrong thing. The
email.notifyaudit entry carriesrecipientPseudonym(the GDPR pseudonym token: keyed with the audit ledger's key, salted per deployment when it has none, and an unsalted hash only when a deployment has neither) next torecipientDomain, and the rate-limit WARN names the recipient by that same pseudonym.hitl.md,configuration-reference.mdand theHitlEmailNotifierclass Javadoc still said "SHA-256 hash" / "by hash", which would send an operator looking for a value that is never written.Manager: off then on again lost the typed recipients. Switching email notifications off clears the stored list, and the effect that resyncs the field to the stored list then emptied the draft, so switching back on (before saving) came back empty. The typed list is now kept when the user switches it off.
Manager: internationalised domains were rejected. The server converts the domain to ASCII (
AddressNormalizer,IDN.toASCII) and acceptsops@bücher.example; the Manager's check was ASCII-only and marked such an agent invalid. The domain is now converted the same way before it is checked (the local part must still be ASCII, as on the server), and the Unicode and punycode spellings of one domain count as a duplicate.hitl.mdnow says so. Two further gaps CodeRabbit found in that conversion are closed: URL syntax after the domain (/path,?q,#f,:25, a backslash,%) is refused instead of being parsed away, and a domain containing ß, ς or a zero-width (non-)joiner is refused, because the platform's IDNA processing keeps those and the server'sIDN.toASCIImaps or drops them, so the two would normalise the domain differently (the punycode spelling stays valid).No change needed: the metrics dashboard panel ids are unique and the split dashboard parts are in sync with the source (
sync-monitoring-assets.pyproduces no diff); the collision the thread described was renumbered after the review.
Design decisions
The Manager still sends the addresses as typed; normalisation stays the server's job.
Browser IDNA conversion (
new URL) stands in forIDN.toASCII, with the known divergent characters refused outright; the backend remains the authority and answers 400 for anything the two still disagree on.
perf(audit): the stored conversation no longer repeats the prompt and response the ledger holds (2026-10-27)
Repo: EDDI (perf/audit-copies-out-of-memory)
What changed and why
With auditing on, LlmTask writes audit:compiled_prompt (system prompt plus prompt) and audit:model_response to every step so LifecycleManager can build the ledger entry. Nothing removed them afterwards, so the full text lived in the conversation document too. On a measured 1.6 MB, 20-step conversation the compiled prompt alone was 325 KB (20%) and the model response 39 KB. Large documents slow every read and write of a conversation, and a deployment whose link to MongoDB is bandwidth-limited felt it directly.
Release after hand-over.
Conversation(say and resume paths) callsTurnAuditBuffer.releaseLedgerOwnedEvidenceonce the turn's buffer has been flushed and the ledger accepted every entry. Within the turn nothing changes: the entries are built, buffered and redacted exactly as before; the keys are removed afterwards, before the conversation is stored.Only what was accepted.
AuditLedgerService.submitnow returns whether the entry was queued, and the collectorsConversationServiceandConversationHitlServiceinstall implement the newIAuditEntryCollector.Acknowledging.TurnAuditBuffer.flushreturns false if any entry was refused (full queue) or any submit threw, and then the evidence stays in the stored step. A plain collector (tests) counts as accepting unless it throws.Paused turns keep it. A turn that ends
AWAITING_HUMANresumes from the stored step, so the keys stay until the resume that completes the turn.Deliberately kept:
audit:tool_calls,audit:token_usage,audit:cost,audit:model_nameand the guardrail records. Agent tests read tool calls, cost and model from the stored step (TurnObservation.fromSnapshot), the/v1adapter reads token usage, and the history replay reads the guardrail records. They are small by comparison.No consumer needed the removed keys. Searched the Manager UI, Chat UI, REST and MCP surfaces, conversation log, exports and GDPR export: the only reader of the two keys is
LifecycleManager.buildAuditEntry, inside the turn. The text is read from the ledger (GET /auditstore/{conversationId}). Documented inaudit-ledger.md.Auditing off: the keys are never written and no code path changes.
Already-stored conversations keep what they hold; only new turns are slimmer.
Files: TurnAuditBuffer.java, IAuditEntryCollector.java, AuditLedgerService.java, Conversation.java, ConversationService.java, ConversationHitlService.java; tests ConversationAuditEvidenceReleaseTest, TurnAuditBufferTest, AuditLedgerServiceTest.
⚡ perf(conversations): current-step and approval-status reads no longer transfer the whole conversation (2026-10-27)
Repo: EDDI (perf/slim-conversation-reads)
What changed and why
Every read of a conversation loaded its whole stored document, and for an agent with tools that document is 0.5–3 MB after twenty turns, almost all of it step history. On a staging deployment whose link to MongoDB was intermittently bandwidth-limited (~100 KB/s for whole-document reads, while small reads stayed at 0.3 s and EDDI itself was idle), GET /agents/{conversationId}/approval-status and the chat-reload read GET /agents/{conversationId}?returnCurrentStepOnly=true took 11–29 s, and the approval card's spinner showed for that long. Both responses describe only where the conversation is now.
New store read,
IConversationMemoryStore#loadConversationMemoryTail, returning aConversationMemoryTail: the document withconversationStepsandconversationOutputscut to their last element, noredoCache, and none of the pending tool-call batch's resume-only fields (chatTranscriptJson,gatingAssistantMessageJson,traceSoFar,fingerprint, each call'sargumentsRaw), plus the totals the projection still needs from what stayed behind — step, output and redo counts, and theaudit:cost/audit:discarded_costvalues forconversationCost. MongoDB: one aggregation ($matchon_id,$setwith$slice: -1and the computed totals,$unset). PostgreSQL: one query using->-1,jsonb_array_lengthandjsonb_path_query_array. The spend values come back in document order and are summed in Java with the same filter and the same left-to-right addition as before, so the cost is bit-identical, not merely close.IConversationMemoryStore#loadConversationMemorySnapshotForApproverforapproval-status?detail=full: that response is the whole snapshot, so it still carries the history; only the resume-only batch fields — whichsanitizePendingToolCallsForApprovernulls before serving — stay on the server (MongoDB: all five; PostgreSQL: the four batch-level ones,argumentsRawsits inside an array#-cannot wildcard and is small).Wired into:
ConversationService.readConversation(both overloads) whenreturnCurrentStepOnly=true— which serves RESTGET /agents/{conversationId}, the managed-agent read, MCPread_conversationand the A2A status read;RestAgentEngine.getApprovalStatusandMcpHitlTools.getApprovalStatus(summary → tail,detail=full→ approver read). A RULE pause'spauseDetails.actionscomes from the tail's last step; only when that step has no actions does it load the full history and walk back, as before.Unchanged: every write path, undo/redo, resume, the conversation log, export,
returnCurrentStepOnly=false(andnull), and every other caller ofgetConversationMemorySnapshot/loadConversationMemorySnapshot.ConversationMemoryUtilities.convertSimpleConversationMemorywas split into a shared body taking the rendered lists plus the totals explicitly, so the full-snapshot and the tail projection run the same code.A document still storing a step under EDDI 5's
packageskey (read by the load's@JsonAlias, not by the server-side expressions) is detected in the same round trip and loaded in full, so its cost is never under-counted.
Files: ConversationMemoryTail.java, IConversationMemoryStore.java, ConversationMemoryStore.java, PostgresConversationMemoryStore.java, ConversationMemoryUtilities.java, IConversationService.java, ConversationService.java, RestAgentEngine.java, McpHitlTools.java. Tests: ConversationMemoryTailParityTest (Testcontainers MongoDB + PostgreSQL: for a READY 20-turn conversation with spend and a redo entry, a one-turn conversation, a TOOL_CALL pause, a RULE pause, a secret last turn, a drifted steps/outputs document and an ERROR turn, the tail projection serializes to the same JSON as the full one for every returnDetailed × returningFields combination; the approver projection of the slim approver read equals that of the full read; legacy packages fallback; unknown ids), ConversationServiceTest$ReadConversationSingleArg, RestAgentEngineToolPauseDetailsTest$RulePauseDetails, plus the HITL REST/MCP tests re-stubbed for the new reads.
Not covered
detail=full still transfers the step history — the response is the full snapshot. The Manager's own approval card uses the summary.
📚 feat(docs-site): redirects for every URL GitBook ever served, CI, and the cutover kit (2026-10-27)
Repo: EDDI (feat/docs-site-astro)
What changed and why
Phases 2–4 of planning/docs-site-migration-plan.md. After this, moving docs.labs.ai off GitBook is a Vercel project and a DNS record — the checklist is phase 5 of the plan.
Fidelity (phase 2), by script over all 94 pages. Source against build: the same number of tables and code blocks, and no Markdown leaking into rendered text. GitBook against build: 98.4% mean word coverage, every gap GitBook's page chrome or text that changed on
mainafter the branch was cut.Every old URL keeps working (phase 3).
docs-site/legacy-urls.txtlists every URL docs.labs.ai has served — today's sitemap, the Wayback Machine's older flat and chatbot-era URLs, the links in this repo and the website.scripts/redirects.mjsgeneratesvercel.json's redirects from it: docs.labs.ai → the same path on docs.eddi.technology, then each legacy path in its plain, trailing-slash and.mdforms, then a per-section fallback. Pages whose slug contains a dot (upgrading-from-6.4) get an explicit slash redirect, becausetrailingSlashtakes.4for a file extension and would 404 them — found by the new checker.A guard over docs links in the repository. Every docs URL written in the backend, the UIs, README, CONTRIBUTING, AGENTS, the plugin and
.github/must land on a page, anchor included. Released images print those links forever; three of them 404 on GitBook today.scripts/check-live.mjschecks a deployment over HTTP — 693 URLs followed hop by hop. Run locally against a stand-in for Vercel's serving ofvercel.json, it found the dotted-slug 404s and a generator bug that rewrote an external…/CONTRIBUTING.mdtarget to…/CONTRIBUTING/; both are fixed and covered by tests.Headers: the website's security headers, with a CSP written for this site (
'wasm-unsafe-eval'for the search index, shields.io and quay.io images). Search, Mermaid and badges were checked in a browser under it with no violations.CI (phase 4):
docs-site.yml— check Docs Site — runs the tests on every PR (they hold the repo-wide link guard) and the site build when docs changed. Dependabot watches/docs-site, because CI's Trivy scan reads its lockfile and an advisory there would fail every backend PR.ci.yml'sbackendfilter gainsdocs-site/**/*.md, andBuildQualityGatesTestholdsdocs-site/.nvmrcto the pom's Node.Branding matched to the website and the Manager, value for value. Tokens copied from the website's
global.css; the header bar, its right side (Website, Get Started, GitHub) and the sun/moon toggle from itsHeader.astro, replacing Starlight's theme<select>; prose from itsGuidePage.astro; code blocks in Astro's defaultgithub-darktheme with the same geometry; the website's favicons; the Manager's sidebar active/hover treatment and scrollbars. Checked against the live site by computed style (header, logo, CTA, nav link, headings, body text, links, code, tables: identical) and by screenshot in both themes and at phone width. Two deliberate differences: light-mode links use the website's own light accent token (accent-700) rather than accent-400, which is ~1.9:1 on its light background; and the docs render Outfit and JetBrains Mono for real, which the live website currently does not (it asks forOutfit, but@fontsource-variable/outfitregistersOutfit Variable, so it falls back to the system font; inline code falls back to the browser's generic monospace).No
sharp. Dependency Review failed the PR on the ten@img/sharp-libvips-*packages (LGPL-3.0), whichsharp— Astro's optional default image optimiser — pulls in and the repository's licence policy denies. The site has no raster images, so it uses Astro's pass-through image service andpackage.jsonoverridessharpwith a local stub (docs-site/stubs/sharp); the policy is unchanged.licenses.test.mjschecks the lockfile against the deny-list read fromdependency-review.yml, so this failsnpm testnext time rather than a PR check.AGENTS.md (ecosystem row: the website is Astro + Tailwind on Vercel at eddi.technology), CONTRIBUTING (how to add a page), the ship-pr skill (the new check) and the monorepo plan now describe the docs as they are built.
Verification
npm test in docs-site/: 52 tests; the new guards were mutation-checked. npm run build clean; check-live 693/693 against the local stand-in. The Java guards touched here (BuildQualityGatesTest, DocumentationLinksTest, DocumentationAccuracyTest, DocumentedRestPathsTest, the changelog tests) pass.
🐛 fix(email): HITL notification review findings after the retarget to main (2026-10-27)
Repo: EDDI (feat/email-hitl-notifications)
What changed and why
Once #1140 merged and #1141 was retargeted to main, the review bots saw the whole slice and raised these:
One recipient's failure no longer drops the rest.
HitlEmailNotifier.notifyPausehandles each recipient on its own: a store error while counting, inserting or attempting one recipient is logged under that recipient's pseudonym and the loop moves on. The sweep only retries rows that exist, so a recipient skipped this way would never have been mailed for that pause.A send failure that is not a
MailSendExceptionis an attempt. ARuntimeExceptionfromSystemMailer.send(a bad address, a mailer bean that could not be built) used to escapeattempt, leaving the row PENDING and reclaimed after every lease without ever reachingmax-attempts. It is now rescheduled with backoff and FAILED at the limit, like a transient SMTP failure.The audit entry names the recipient by keyed pseudonym. It carried an unkeyed SHA-256 of the address beside the recipient's domain, which anyone reading the ledger or the logs could confirm by hashing candidate addresses. It is now
recipientPseudonym, fromGdprPseudonymizer(the audit ledger's keyed pseudonym, or the per-deployment salt), the same token GDPR erasure writes for that identifier; the rate-limit WARN uses it too.A
Fromwith a valid mailbox beside an unparseable entry has no sender.MimeMessageParser.parseFromnow recordsMULTIPLE_FROMfor it, asAddressNormalizer.parseSinglealready did, so DKIM/DMARC never authenticates a domain the header did not name unambiguously.Manager: a switched-off HITL section no longer blocks the save over hidden recipients, and the section resets per agent and version (
keyonHitlConfigSection).SystemMailerstatesmail.smtp.ssl.checkserveridentity=truewhere the session is built (CodeQLjava/insecure-smtp-ssl);SafeSocketConnector.angusPropertiesalready set it under the protocol's prefix.Dashboard: the email panels collided with main's Conversation Ratings panels on ids 264 and 265; they are now 267 and 268.
Files: HitlEmailNotifier.java, MimeMessageParser.java, SystemMailer.java, agent-config-sections.tsx, agent-detail.tsx, eddi-full-metrics-dashboard.json, with tests for each; each new test fails with its fix reverted.
✅ test(e2e): brand-leak acceptance test, and Keycloak's card-top rule — white-label phase 7 (2026-10-26)
Repo: EDDI (feat/white-label-6-chat-operator-surfaces)
What changed and why
Phase 7 of the white-labeling plan (§7), the acceptance test; the plan is now marked implemented. docs/white-labeling.md gains "Verification".
ui/manager/e2e/fullstack/brand-leak.fullstack.spec.ts(+fixtures/zebra-logo.svg,zebra-icon.svg). Resets the brand, sets "Zebra Labs" / "Zebra" / a tagline / teal#0f766eon white /poweredBy: falseand uploads an SVG logo and icon through the admin REST, creates and deploys an empty agent, then walks 57 pages:/,/welcome, every static/manageroute and everyRESOURCE_TYPESlist page (both read from source,src/app.tsxandresources.ts, with a floor on the count so a broken parse cannot pass), every static/workforceroute, the fixture agent's agent, workflow and Studio pages,/chat/production/<agent>and/chat/demo/showcase. Per page:\bEDDI\b,[Ll]abs.ai,LABS.AIininnerText,document.title,alt/aria-label/title/placeholder/aria-description/aria-roledescription, the live<meta>contents and the raw HTML's<title>and<meta>contents; the title must name the brand, every same-origin<img>and icon link must be under/branding/, and--color-primary(chat:--chat-accent) must be the brand's. Then the OpenAPI title and contact, MCPinitializeserverInfo.name, and Swagger UI (packaged build). Then a reset, after which/welcome,/manage,/workforce, the chat demo and the OpenAPI title say EDDI.afterAllresets the brand and removes the agent whatever happened. Leaks are collected for the whole run and reported by route with where and a snippet; allow-listed hits are printed too, so a stale entry is visible.CI: none needed. The
fullstackproject'stestDirise2e/fullstack, sonpm run test:e2e:fullstackin the Backend E2E job (both databases,workers: 1) picks it up.Allow-list (2): the "EDDI Cluster" Grafana dashboard named on
/manage/coordinator(a technical name, as documented), and the Branding page's empty Product-name placeholder, which shows the EDDI default the field falls back to.Keycloak (found in Phase 6): keycloak.v2 26.x draws a 4px
border-topon the card in--keycloak-card-top-color(:root, PatternFly blue-400).eddi-login.cssnow sets it tovar(--eddi-primary)(amber), andKeycloakThemeExport's generatedbrand-overrides.csssets it explicitly with the other PF tokens.KeycloakThemeExportTestchecks both.
Verified
Full
./mvnw package -DskipTests(with the UIs), the jar on :7070 with MongoDB 7 and the compose file's three opt-outs,PORT=7070 E2E_AGAINST_BACKEND=1 npx playwright test --project=fullstack: the new spec passes (3 tests, about a minute; no leaks, the two allow-listed hits), and the wholefullstackproject with--workers=1passes (38 tests).The first run found one hit, the Branding page placeholder, which became the second allow-list entry.
Injected leak: the jar's Manager bundle patched so
landing.titlereads "Welcome to EDDI" fails the spec with2 brand leak(s) on 2 route(s): / → /welcome [visible text] "EDDI" in: Welcome to EDDI Choose your workspace…and the same for/welcome; the original jar was restored.Manager
npm run lintandnpm run typecheckgreen. Backend:formatter:format,compile, andKeycloakThemeExportTest, theBrand*/Branding*tests,ImportStyleTest,BuildQualityGatesTest,ChangelogFragmentTestand theDocumentation*Tests (244 tests) green.
Not verified
PostgreSQL (CI's second leg), A2A agent cards (needs an A2A-enabled agent; covered by Phase 6's manual check), the Keycloak login page (not served in this tier), and a re-screenshot of the card-top colour on Keycloak 26.8.
🎨 refactor(manager): brand, warn and ochre colour scales — white-label colours, part 1 of 2 (2026-10-26)
Repo: EDDI (feat/white-label-2-colour-scales)
What changed and why
Next step of the white-labeling plan after the brand store: the Manager's colours become able to follow a brand. Amber was both the EDDI brand and the app's caution colour, written out as about 745 amber-N utilities, so a brand colour could not reach them. This part adds the colour scales and converts the pages, lib/ and the HTML shells; the components follow in part 2, together with the guard that forbids amber-N. With no brand set, every pixel is unchanged.
Three scales in
ui/manager/src/index.css, in plain@theme(not@theme inline) so the utilities read the variable at runtime. All three arevar(--color-amber-N)unbranded:--color-brand-50…950follows the brand: accents, selection, primary emphasis.--color-warn-50…950is fixed amber for cautions: warnings, approval pauses, pending and degraded states, unsaved-changes markers.--color-ochre-50…950is a fixed categorical hue (per-type badges, section accents, avatar and syntax palettes) that is neither a warning nor re-branded, so two categories can never collide with the brand.
Pages and
lib/converted by meaning, read per component. The welcome modal'srgba(245,158,11,…)becamecolor-mixover--color-primary, and the dark scrollbar greys became--color-scrollbar-thumb(-hover). The shells' loader spinner readsvar(--brand-loader-accent, #d4a843).BrandDelivery'sbrand.css, when a primary colour is set, re-declares the brand scale in:rootand.darkas fixedcolor-mix(in oklch, var(--color-primary) N%, white|black)text and sets--brand-loader-accent. It never toucheswarnorochre, and unbranded output stays empty.BrandDeliveryTestchecks the scale againstindex.css, thatochremaps to amber and is never branded, and the shells' loader fallback.Docs:
docs/white-labeling.mdand theeddi-uiskill describe the three scales and when to use each.
Design decisions
Full scales rather than the plan's single
warningtoken. The existing utilities need 50…950 with opacity modifiers; a one-for-one swap keeps the classification reviewable and the output identical.The loader uses its own variable. The bundle CSS in
<head>already defines--color-primaryas#f59e0b, sovar(--color-primary, #d4a843)would have changed the unbranded spinner.Mix ratios put each brand step near the OKLCH lightness of the amber step it replaces.
Fixed on the way
docs/mcp-server.md linked to an anchor docs/conversation-ratings.md does not have, which failed the docs-site build on main and on every PR. It now points at the page's "Analyzing and triaging" section, where the rating tools are described.
🎨 refactor(manager): components move off hard-coded amber, and a guard keeps it that way — white-label colours, part 2 of 2 (2026-10-26)
Repo: EDDI (feat/white-label-3-colour-sweep)
What changed and why
Second half of the colour work in the white-labeling plan. Part 1 added the brand, warn and ochre scales and converted the pages; this part converts every component under ui/manager/src/components, so no amber-N utility is left in the Manager. With no brand set, every pixel is unchanged, because all three scales resolve to the same amber.
Classified by meaning, per component:
brand(follows the brand): the Workforce synthesis cards, the dashboard's agents card, the wizard choice card and the pinned-response star.warn(cautions): HITL pauses and approval surfaces, pending badges, unsaved markers, in-progress and degraded states, vault and secret-rotation cautions, amber callouts, the amber middle of red/amber/green scales.ochre(fixed categorical hue): per-type badges, discussion-style palettes, section accents, the avatar palette (kept in sync withlib/utils.ts), syntax and number colours, tool chips, the search<mark>, the welcome-modal gradient.
Guard:
src/__tests__/no-hardcoded-amber.test.tsfails on anyamber-Nutility or brand-gold hex (#f59e0b,#fbbf24,#d4a843and theirrgb()forms) inui/manager/srcand the three shells. Its allow-list is empty; the theme file's custom-property declarations are the one place amber is named.Tests that asserted
amberclass names now assert the new scale (badges,resource-type-badge,pipeline-railroad).
🐛 fix(security): bound the regex work of seven matchers (CWE-1333) (2026-10-26)
Repo: EDDI (fix/regex-redos-bounds)
What changed and why
A repository security scan flagged seven places where a pattern from configuration, or text from a user, could make java.util.regex backtrack super-linearly. All seven were reproduced; each is now bounded, and where a regex was kept its meaning is unchanged — each fix ships with a test comparing old and new over a dense random or exhaustive corpus, plus a timing-bounded pathological input that hangs the old code.
ToolApprovalPatterns.compile(HITL tool-approval globs): one greedy.*per star madea*a*…*zexponential in the star count, at save-time validation and on every gated tool call. Middle segments are now matched at their earliest occurrence inside atomic groups ((?>.*?B)), which loses no match, so matching costs pattern length × input length. ThePatternreturn type stays, so the gate and the rules are untouched.UrlPattern(crawlexcludePatterns): the glob is no longer translated to a regex; a dynamic-programming pass over the tokens costs pattern length × path length.**now also crosses a decoded line terminator — the regex's.did not, so/private/**let/private/a%0Abthrough.BoundedRegex(agent test-suite regexes): its deadline only fires oncharAt, and a counted repetition of something that matches empty reads nothing —(?:(?:){99999}){99999}spun for 25 s on a three-character text. Counted minimums over groups, anchors and back-references may now force at most 1,000 iterations in total (nested counts multiply), and(?x)is refused. Checked when a suite is saved (AgentTestSuiteValidator) and again before every match, for suites saved earlier. What remains is documented in the class: a pattern within the cap that reads nothing still costs up to 1,000 steps per start position, unchecked by the deadline.TemplateSyntaxMigrator(Thymeleaf→Qute import): the three#stringspatterns are possessive where the next token cannot be what the quantifier consumes, and the two-argument form checks for its)with a lookahead first; a long whitespace run in an unterminated call was quadratic.SecretRedactionFilterunquoted-value rules: the optional${vault:…}prefix searched for its closing brace afresh at every key, so repeatedtoken:${vault:without a}was quadratic in the message. The key is still found by regex; the reference and value are now found by a forward-only scan whose brace search is reused across keys. Whole-reference exemption and reference-plus-tail redaction are unchanged (no new bypass).PunctuationNormalizerProvider: the punctuation setting is spliced into[…]and could close that class (!]|(a+)+$|[!). It is used as a class body only when its brackets balance and it has no\Q…\E; otherwise its characters are taken literally. The provider also no longer keeps the last parser's setting in a field of the shared singleton, which made one parser's custom punctuation the default of every later one.PromptInjectionGuardrail: whitespace runs in the built-in patterns are possessive;ignoreor<followed by a long whitespace run was quadratic.
Docs: agent-testing.md — the repetition cap.
Files: ToolApprovalPatterns, UrlPattern, BoundedRegex, AgentTestSuiteValidator, TemplateSyntaxMigrator, SecretRedactionFilter, PunctuationNormalizerProvider, PromptInjectionGuardrail and their tests (new: BoundedRegexTest, SecretRedactionFilterUnquotedValuesTest).
🔒 fix(secrets): allowedHosts now also governs transport, connections, Slack bot tokens and discovery's authHeaderRef (2026-10-26)
Repo: EDDI (fix/secret-allowed-hosts)
Four findings from the repository security scan of daecb3513, all about a vaulted secret reaching a destination its allowedHosts list was meant to exclude.
What changed and why
Plaintext http to an allowed host.
VaultHostAllowlistcompared host and port only, sohttp://api.openai.commatchedapi.openai.comand an editor could send a restricted key unencrypted. A secret with a list is now refused forhttp:///ws://to any non-loopback host, even a listed one. Loopback (localhost,127.0.0.1,[::1]) is exempt, the same rule a connection'sallowPlaintextRemoteOriginsapplies. A deployment that does send restricted secrets to an internal service over http setseddi.vault.allow-plaintext-remote-hosts=true, which still admits only listed hosts. Schemeless destinations (pgvector/Qdranthost:port) andmongodb://are not judged by scheme. Unrestricted secrets are unchanged.A connection bypassed the secret's own list.
ConnectionResolverchecked the target against the connection'sbaseUrlAllowlistand then turned the${vault:…}references behind a STATICvalueTemplateor BASICpasswordRefinto plaintext without consulting theirallowedHosts.CredentialReferenceResolvernow takes the target and checks every vault reference, after${vars:…}expansion and before decryption; a refusal isTARGET_NOT_ALLOWED. Because the check sits in the resolver, it covers every caller (ApiCallExecutor, MCP), not only the one the finding named.Slack
botTokenresolved without a destination check.ChannelTargetRouternow checks a vaultedbotToken(new-style integrations and legacy agent connectors) againstSlackWebApiClient.SLACK_API_BASEbefore resolving it. A refused token is withheld (the integration cannot post) with a[SECURITY]WARN. Signing secrets are inbound-only and not checked.authHeaderRefprefix check.RestApiCallsStorediscovery accepted any value that started with a reference prefix, so${vault:x}sk-live-…passed and the literal was copied into every generated call. The value must now be exactly one${vault|eddivault|vars|caller:…}reference, whole-string.
What operators see
A restricted secret that is used today over plain http to a non-loopback host — e.g. an in-cluster http://elasticsearch:9200 or an OpenAI-compatible server at http://vllm:8000 — now fails at that call/build with a message naming the destination and eddi.vault.allow-plaintext-remote-hosts. Switch the endpoint to https, or set the property. Docs: secrets-vault.md → Destination allow-list.
Tests
VaultHostAllowlistTest (new EncryptedTransport group), new ConnectionResolverVaultAllowedHostsTest, new ChannelTargetRouterAllowedHostsTest, and a new case in RestApiCallsStoreBranchTest. Each was mutation-checked: with the fix reverted, the new tests fail.
Not done
The Manager's
isAuthReference(ui/manager/src/lib/secret-reference.ts) is still a prefix check. The server now refuses what it lets through, but it should use the same whole-string grammar.An OAuth connection's client secret is not checked against its own
allowedHostsat the token endpoint.credentialEndpointAllowlistgoverns where it goes.
🧪 test(email): full-application IT for the email channel (2026-10-26)
Repo: EDDI (feat/email-conversation-mode)
The existing email ITs (EmailImapPollingIT, EmailConversationModeIT) wire the poller, processor and reply sender by hand around a mocked conversation engine. EmailFullApplicationIT boots the real application (@QuarkusTest, MongoDB Dev Services) and drives it through its REST API, with GreenMail as IMAPS and SMTPS server and a deterministic agent (dictionary, behavior rules, output — no LLM):
Trigger mode —
POST /channelstore/channelsanswersX-Eddi-Warnings: email.open-triggerand createsemail-poll:<id>; the poll is fired throughPOST /schedulestore/schedules/{id}/fire(claimed, thenScheduleFireExecutor); the mail runs a real turn with the mail as input and themailcontext, its PDF lands in the attachment store, the ledger row endsDONE, the mail is moved, and nothing is sent. AnAuto-Submitted: auto-repliedmail is refused without a conversation.Conversation mode — DKIM-signed mail (real
DkimVerifier/SenderAuthenticator) is answered in the thread (In-Reply-To,References,Auto-Submitted, AI disclosure); the answer to EDDI's Message-ID continues the conversation, another sender quoting it gets their own, unsigned and body-tampered mail is refused unanswered.HITL in the thread — a
PAUSE_CONVERSATIONturn sends the in-thread notice with the pause reason;POST /agents/{conversationId}/resumesends the continuation.Bounce — a permanent DSN for a reply lists the address under
GET /channelstore/channels/{id}/email-suppressions(hashed) and the sender's next reply row endsSUPPRESSED.
Two test seams, enabled only by the IT's profile (getEnabledAlternatives), replace beans; no production code changed:
E2eMailSocketConnector(engine.net, test sources) runs the production author policy ofSafeSocketConnectorin full on every call, over an injected resolver that answers a public documentation address forimap.mail.test/smtp.mail.test; only an endpoint that passed is re-pinned to the loopback GreenMail port, keeping host name and TLS mode, so TLS and host-name verification run against a certificate for those names.E2eMailDns(engine.mail, test sources) is the productionMailDnsResolverover an offline TXT source that publishes theDkimTestSignerkey and a DMARC record.
Finding while writing it (no code change): the regular dictionary parser splits on spaces only, and the default inputTemplate puts the body on the line after -----, so the body's first word is read as one token with the separator (instructions.\n-----\nhello,). A dictionary agent on an email channel should not rely on the first word of the body; LLM agents are unaffected.
fix(alerts): a per-event send claim closes the erasure-vs-delivery window (2026-10-26)
Repo: EDDI (feat/alerts-backend, PR #1138)
What changed and why
A delivery could read an event, an erasure redact it and finish, and the delivery then send what it had read. Now no send starts with erased content after an erasure has completed.
Send claim.
IAlertEventStore.claimSend(eventId, token, now, until)is an atomic conditional write that succeeds only when no claim is live (none, or an expired one);releaseSend(eventId, token)clears it only for its own token. Both stores keep the claim in internal fields (sendClaimToken/sendClaimUntil;send_claim_token/send_claim_until) that no read maps into an event.AlertDeliveryService— the one path for first deliveries and retries — claims forSEND_CLAIM_LEASE(a fixed 30 s, three times the default 10 s webhook timeout; not tied to a configurededdi.alerts.webhook-timeout), reads the event, checks that more than the send timeout is left of the lease, sends, and releases in afinally. A claim it cannot take, or a lease too short to finish in, leaves the delivery pending, due again after one lease; the worker never blocks.Erasure waits for live claims. The redactions erasure uses (
redactOutputValues,redactRatingComments, and the engine'sredactRatingComment) takenowand skip an event whose claim is live.AlertErasureRedactor— used byAlertGdprParticipantandConversationRatingGdprParticipant— repeats the redaction with a short pause untilcountOutputValues/countRatingCommentsreport nothing left, so the erasure completes only after every send that had read the content has finished or its claim has expired.The engine's own post-insert redactions cannot wait on themselves: they run before the event's first delivery and before the maintenance pass may pick it up (its
nextAttemptAtis a claim lease away), so no claim on it can exist yet (said in the code).Alerts → Privacy states the guarantee and its one limit: a send that started before the erasure completed cannot be recalled.
Design decisions
Claim per send, not per event delivery: an event with five targets would otherwise hold one claim across up to five webhook timeouts.
The erasure's wait is bounded by ten leases (5 minutes). A claim always expires within one lease, so only a store that keeps failing the update — or deliveries re-claiming without pause, which the backoff rules out — reaches the bound; the step is then reported failed instead of hanging the erasure. This is the one place the implementation is stricter than "keep going until the claims expire".
Tests
AlertSendClaimTest drives the races with latches, not sleeps: a send paused after its final read holds the erasure (asserted not complete after two redaction passes), the erasure completes once the send finishes, and a retry then sends the redacted event; erasure first, then delivery, sends the redacted event; a live claim makes the attempt skip, an expired one is taken over; a lease too short after the read releases and skips; the erasure's bound fails the step. Store contract (both ITs): conditional claim, token-checked release, expiry takeover, redaction skipping a claimed event until it is released or expired.
📚 feat(docs-site): build docs/ with Astro + Starlight, the replacement for GitBook (2026-10-26)
Repo: EDDI (feat/docs-site-astro)
What changed and why
docs.labs.ai is GitBook, syncing docs/ one way. The documentation moves to a site we build ourselves: Astro + Starlight, deployed on Vercel like the marketing site, at docs.eddi.technology, with docs.labs.ai redirecting there permanently. The plan, and the facts it rests on (the URLs GitBook has served over the years, the website's hosting, what GitBook provides besides pages), is planning/docs-site-migration-plan.md. This is its phase 1: the site builds locally. Nothing is deployed and docs.labs.ai is unchanged.
docs/is untouched as a format. It stays plain GitHub Markdown, because GitHub renders it,McpDocResourcesserves it raw to MCP clients andDocumentationLinksTestchecks it.docs-site/scripts/sync-docs.mjsreads it on every dev/build run and writes the Starlight copy.docs/SUMMARY.mdstill decides what is published and is now the sidebar too.Flat URLs from file names —
docs/secrets-vault.md→/secrets-vault/. GitBook's URLs carried the SUMMARY section (/security-and-compliance/secrets-vault), so moving a page between sections changed its address; and the flat links the backend and the Manager already print (VaultStartupBanner,ComplianceStartupChecks, the coordinator page) 404 on GitBook today. They resolve on the new site.Links are rewritten, and checked. A link to a published page becomes its route; a link to anything else in the repository becomes a GitHub link. The sync fails on a SUMMARY entry without a file, a link to nothing, two pages that would share a URL, and an
#anchorthat does not exist. Anchors are checked against the source becausestarlight-links-validator0.27 cannot check them under Astro 7: Astro's satteri processor runs plugins before it assigns heading ids, so the plugin sees none and reports every anchor as broken. The source-side check computes the ids withgithub-slugger, the same way Astro does, and matches all 5,235 heading ids of the built site, none missing and none extra. The plugin still checks every page link.GitBook's machine-readable surface is kept: every page also exists as
/<slug>.md(the website links to GitBook's.mdURLs), and/llms.txtlists every page, with/llms-full.txtand/llms-small.txt(no changelog) beside it.Everything generated lives in
docs-site/.generated/, which is gitignored.DocumentationLinksTest,DocumentationAccuracyTestandDocumentedRestPathsTestskip it by name, so a local site build cannot feed them a second copy ofdocs/with site-relative links.The anchor check found one real broken link: two references in
changelog/2026-08.mdpointed at a heading that had been rotated into the July archive. They now link there.
Verification
npm testindocs-site/: 32 tests, including a full sync over the realdocs/. Each guard was mutation-checked: disabling the anchor check, blockquote headings, setext headings, entity decoding, the intra-word underscore rule, fence-length and code-span handling, directory READMEs or the slug-collision check each fails a test.npm run build: 94 pages, link validator clean. Seen in a browser — search, Mermaid, dark and light theme, phone width,.mdendpoints, the no-slash URLs the backend uses — with no console errors.
Next
Phase 2 of the plan: a page-by-page comparison against GitBook. Then phase 3, the redirect map from every URL GitBook has served, and phase 4, the CI workflow and the Vercel project.
🔐 fix(auth): MCP logins last 30 days, and Keycloak behind TLS advertises https token endpoints (2026-10-26)
Repo: EDDI (fix/mcp-long-lived-sessions)
What changed and why
Connecting Claude Code to a TLS-proxied EDDI deployment surfaced two gaps, both configuration only — no Java change.
1. An MCP login died after 30 idle minutes. An MCP client keeps a refresh token, but it was tied to the realm's SSO session (Keycloak default: 30 minutes idle, 10 hours max), so the user re-ran the browser flow after every break. eddi-mcp now issues offline tokens (30 days idle, renewed on use, revocable per user). In all three realm copies (keycloak/, helm/eddi/files/, k8s/overlays/auth/): offline_access is a Default client scope of eddi-mcp, the role is in its scope mapping, default-roles-eddi includes it, and each seed user lists it. The scope, the role and the scope's role mapping are now defined in the file itself: the realm supplies its own clientScopes, and everyReferencedClientScopeIsDefined rightly refuses a reference to a scope the file does not define, even though Keycloak 26.8 happens to create this one anyway. default-roles-eddi is stated twice in the file (defaultRole and the roles.realm entry) and the roles-list entry is the one an import keeps — with the role added only under defaultRole, a newly created user was refused, so both carry it and the test checks both. eddi-frontend is unchanged — no 30-day tokens in browser storage.
Verified against Keycloak 26.8.0 with the edited realm imported: all seed users and a newly created user receive typ=Offline refresh tokens (2 592 000 s) with their roles and aud=eddi-backend, and the refresh grant works. The same test disproved both recipes docs/mcp-server.md previously gave:
default-roles-eddidid not grantoffline_access(the realm defines its composites explicitly) — without the role: Offline tokens not allowed for the user or client.Advertising
offline_accessinquarkus.oidc.resource-metadata.scopesmakes Keycloak fail the whole login withinvalid_scopeon any realm whose client lacks the scope — i.e. every existing deployment. Left atopenid.
2. Keycloak behind a TLS proxy advertised http:// token endpoints. With KC_HOSTNAME_BACKCHANNEL_DYNAMIC=true, Keycloak derives the token, JWKS and userinfo URLs from the request, which is plain http behind the proxy; the issuer and authorization URLs come from KC_HOSTNAME and stayed https. Claude Code refuses to send credentials to an http token endpoint, so login failed after the browser step. Fix: KC_PROXY_HEADERS=xforwarded.
gcp/provision-vm.sh --httpsnow sets it, and its nginx Keycloak location now sets every forwarded header instead of passing client values through:X-Forwarded-Host $host,X-Forwarded-Port 443,X-Forwarded-For $remote_addr(was appended). Once Keycloak trusts these headers, a client-suppliedX-Forwarded-Hostwould choose the host in that caller's discovery response (review finding, CWE-346).Helm: new
keycloak.proxyHeaders— empty meansxforwardedwheneddi.oidc.publicUrlis https, nothing otherwise;noneopts out. Rendered and checked for all four cases. Chart2.11.0→2.12.0.
Files
keycloak/eddi-realm.json,helm/eddi/files/eddi-realm.json,k8s/overlays/auth/eddi-realm.json— offline-token wiring.helm/eddi/values.yaml,helm/eddi/templates/keycloak.yaml,helm/eddi/Chart.yaml—keycloak.proxyHeaders.gcp/provision-vm.sh—KC_PROXY_HEADERSin the HTTPS override.src/test/java/ai/labs/eddi/deploy/DeploymentManifestsTest.java— theeddi-mcpscope-mapping assertion allowsoffline_access; newmcpClientIssuesOfflineTokenspins the three conditions in every realm copy and thateddi-frontendstays without it.ui/manager/scripts/make-test-realm.mjs,ui/manager/e2e/auth/auth-helpers.ts— the Auth E2E fixtures pin each seed user's exact roles; they now includeoffline_access.ui/manager/e2e/auth/mcp-oauth.spec.ts— the real authorization-code + PKCE + consent flow againsteddi-mcpnow asserts the refresh token istyp: Offline, the one path the container check could not drive.docs/mcp-server.md— corrected offline-token section, upgrade steps for an existing realm, proxy-header deployment note.docs/kubernetes.md— settings row.
Upgrade note
--import-realm does not touch an existing realm. Existing deployments keep working with ordinary 30-minute MCP logins; for long-lived ones they add the three pieces by hand (steps in docs/mcp-server.md, "Upgrading an existing realm"), the Default scope last — with the scope in place but the role missing from the user or the client's scope mapping, Keycloak refuses the login with Offline tokens not allowed rather than falling back to an ordinary token. Revoke a single offline token under Users → the user → Consents. The nginx Keycloak location also clears X-Forwarded-Prefix (review finding). The quarkus.oidc.roles.role-claim-path=realm_access/roles fix for "requires role" on every tool is already in the image since 6.6.0; deployments on older images should pin it as QUARKUS_OIDC_ROLES_ROLE_CLAIM_PATH.
🐛 fix(ci): the Playwright install no longer waits on the Ubuntu apt mirror (2026-10-26)
Repo: EDDI (fix/playwright-install-slow-apt)
What changed and why
main went red on the fast-uri bump (daecb3513) with no test failing. UI Manager E2E (MSW) and Backend E2E (postgres) both hit the 10-minute limit of Install Playwright browsers, and the re-run failed the same way. npx playwright install --with-deps chromium always runs apt-get. On ubuntu-latest that meant about 26 MB of fonts (CJK, unifont, xfonts) plus a few library upgrades from azure.archive.ubuntu.com, which was serving 25–50 KB/s that afternoon. None of it is needed: the suites take screenshots only on failure and compare none, and the runner image already carries Chromium's shared libraries.
The three steps that installed Playwright (UI Manager E2E (MSW), Backend E2E, Auth E2E (Keycloak)) now run ui/manager/scripts/install-playwright-chromium.mjs. It:
downloads the browser from Playwright's CDN (no apt);
launches it once, and if that works, skips apt altogether;
otherwise prints a
::warning::, runsnpx playwright install-deps chromium, and fails the step if Chromium still does not launch.
So a runner image that drops a library still works, it just pays the apt cost again, and the warning says so.
Verified
Both paths ran in Docker against @playwright/test 1.64.1:
node:24-bookworm(no Chromium libraries): the probe reported a missing shared library, apt installed the dependencies, the second launch succeeded, exit 0.mcr.microsoft.com/playwright:v1.64.1-noble: launched first time, apt skipped, exit 0.
The ubuntu-latest path itself is verified only by this PR's own CI run.
🔒 fix(security): schedule fire authority, maxCostPerFire, group approver scope, currentversion VIEW (2026-10-26)
Repo: EDDI (fix/schedule-group-authz)
Six findings of the repository security scan (revision daecb3513) on scheduling and group-conversation authorization.
What changed and why
Schedule creator re-check used historical teams (#4).
ScheduleFireExecutor.creatorUseCheckre-checked USE with the create-timecreatorTeamssnapshot, so a creator removed from a team kept firing a schedule on an agent shared only with that team. The snapshot is now narrowed by the user directory: when the creator signed in after the schedule was created, a team their latest token no longer lists stops counting (currentCreatorTeams). Only ever narrowing; with no newer directory entry the snapshot stands. Not fixed:creatorAdmin— the directory records teams, not roles, and EDDI has no server-side role source outside a request, so a creator who loseseddi-adminkeeps an admin-created schedule firing. Recording roles in the directory (both stores) would close it.maxCostPerFirecapped nothing (#26). The field was accepted, stored and shown but never reached the turn. The fire now carries it in the input context (scheduleMaxCostPerFire), andLlmSpendGate.effectiveCeiling— used by the pre-call spend gate and between tool-loop rounds — tightens the agent'smaxCostPerConversationUsdto "every earlier step'saudit:costplus the allowance", so apersistentschedule is capped per fire.0or below stays unlimited (PostgreSQL stores0as NULL).pendingHumanPromptwent to every approver (#8). The approval-status summary (REST and MCPget_group_approval_status) returned a HUMAN member's rendered prompt — discussion content — to anyeddi-approver. It now goes only to the pending member, the owner, admins, and an approver while the conversation awaits approval (HitlAccessGuard.mayReadPendingHumanPrompt), the same window the full view grants.approve/streamstreamed the resumed discussion to approvers (#27). An approver-only caller now gets a listener that forwardshitl_resume(or, on a rejection,group_completewithout the synthesized answer), errors and cancellation, then closes; the owner and admins keep the full stream (HitlAccessGuard.mayReadResumedDiscussion). Same boundary as the agent resume's "a reply is a read". The approver'shitl_resumeis held untilresumeDiscussionreturns: the coordinator announces the resume before it submits the resumed run, and a submit failure restores the pause and throws, so sending it at once told the approver their decision was applied while the discussion stayed paused, and closed the stream before the endpoint'sgroup_errorcould reach it (ApproverStreamingListener.resumeEnqueued).A tool-call resume skipped the cost ceiling.
LlmTask.executeResumenever asked the spend gate, and the tool loop checks its ceiling only after the model has answered, so a conversation (or a scheduled fire undermaxCostPerFire) spent while it waited for approval still ran the approved calls and its first resumed model request. The resume now runs the same preflight before the approved calls (refused → the fallback answer,llm:spend_refused:<taskId>, the batch consumed), and the resumed loop checks before its first request too, counting what the approved calls charged:runToolCallLooptakes the tool-cost baseline from its caller, taken before those calls, instead of snapshotting it at loop start. What the turn spent before the pause was invisible to both checks: the loop's tokens and tool cost so far died with the pause signal, so a fire that had used $0.02 of a $0.025 allowance resumed as if it had spent nothing. The pause now carries that spend (ToolApprovalRequiredException.addSpend: the loop's rounds at the task's prices plus its tool-cost delta, and an enclosing cascade's earlier steps), andLlmTask.executeadds it to the step'saudit:costandaudit:token_usageas the pause passes — the step the pause snapshot persists and the pause's settle meters. The resume reads it throughaudit:costin its preflight, its loop ceiling and its total, so it counts once; this also closes the documented gap where a resumed turn's ledger entry under-reported its pre-pause segment. Docs:langchain.md.Follow-up did not re-check group USE (#37).
POST …/followup(and MCPfollowup_with_member) checked transcript ownership only; like a continuation, it now also requires current USE on the group./{id}/currentversionhad no per-resource check (#6).IRestVersionInfo's two endpoints now callrequireCurrentVersionAccess(id)first; all sixteen stores (andRestVersionInfo) implement it as VIEW viaRestVersionInfo.requireViewAccess. The default refuses, so a new store that forgets fails closed.getCurrentResourceIdstays the unguarded resolver in-process engine code uses.
Files
ScheduleFireExecutor.java, ScheduleConfiguration.java, LlmSpendGate.java, ToolLoopRunner.java, ToolLoopResumer.java, ToolApprovalRequiredException.java, CascadingModelExecutor.java, LlmTask.java, HitlAccessGuard.java, RestGroupConversation.java, McpHitlTools.java, McpGroupTools.java, IRestVersionInfo.java and the sixteen Rest*Store classes. Docs: scheduling.md, hitl.md, langchain.md, group-conversations.md.
Design decisions
maxCostPerFirerides the existing priced-spend ceiling rather than a new tool-only budget: it then covers model tokens as well as tools, and every node that runs the turn enforces it because the value travels in the input. A client that sets the context key itself can only lower its own ceiling.The approver stream closes at the resume instead of filtering event by event: everything after the resume is outside the approval window, and a closed stream cannot start leaking when a new event type is added.
The pre-pause spend is recorded on the step at the pause, not carried on the persisted
PendingToolCallBatchfor the resume to add: the step already survives into the pause snapshot and is whatTurnCostMetersettles, so the spend is metered even if the pause is never resumed, and a figure on the batch would be one more place a cost could be applied twice.
🔒 fix(security): close the DNS-rebinding gap between the SSRF check and the connection (2026-10-26)
Repo: EDDI (fix/ssrf-dns-pinning)
What changed and why
A repository security scan flagged three paths where the SSRF check resolves a host and the HTTP client then resolves it again to connect: OutboundHttp (JDK client), the Vert.x httpcalls client, and cached MCP transports. Both lookups normally hit the JVM's positive DNS cache and agree; a rebinding name aims for the moment that cache entry expires between them. This was recorded as an accepted risk in docs/architecture.md. None of the clients can be handed the validated addresses (the JDK HttpClient has no resolver hook, and an IP-literal URL breaks SNI and certificate checks), so each path now closes the gap with what it can see:
httpcalls (Vert.x): a web-client interceptor checks the address the connection actually reached in the
SEND_REQUESTphase, before a byte is written, on every request, pooled connection and redirect hop. A metadata or link-local peer is refused always; witheddi.security.ssrf-protection.enabled=truea private peer is refused unless the host is allow-listed. This is a real pin of the decision to the connection.OutboundHttp: each hop's SSRF check runs again once the response headers are in. The connection's own lookup is what the cache now holds, so a target that turned private (or into the metadata service) has its response discarded and closed before it reaches the caller or a redirect. A startup warning namesnetworkaddress.cache.ttl=0, which would defeat it.MCP: the server URL is validated on a tool-cache hit too, not only on a fresh discovery, and again inside the transport's per-request header hook, so a cached transport never sends to a URL that no longer passes.
What remains (written up in security.md → DNS rebinding): on the OutboundHttp path the request itself has already been sent when the second check refuses it, so this blocks reading the response, not a blind request; an exchange slower than the cache lifetime defeats the second look; MCP keeps the pre-connect window. A full pin of the JDK path needs a resolver hook the JDK does not offer, or one HttpClient per pinned host with explicit SNI, which is a larger change.
Files: HttpClientModule.java, OutboundHttp.java, McpToolProviderManager.java, UrlValidationUtils.java, security.md, architecture.md. Tests: HttpClientModuleConnectedPeerTest, OutboundHttpTest$Rebinding, McpTransportRevalidationTest, McpToolProviderManagerDiscoveryTest#cacheHitIsRevalidated.
🔒 fix(llm): tool results redacted before the model, bounded selector extraction (2026-10-26)
Repo: EDDI (fix/tool-result-redaction)
Two findings from a repository security scan of daecb3513.
What changed and why
Tool results are redacted before they reach the model. Only the display trace was filtered: an administrator's config-read tool (the Platform Operator) showed
<REDACTED>while the hosted model provider received the plaintext key.ToolLoopRunner.executeToolCallnow runsSecretRedactionFilter.redacton the result before truncation (thesummarizestrategy sends it to a model too) and before the guardrail envelope; the raw result stays internal (LAZY activation, repeat guard). Trade-off, documented: a key-named value such asnextPageTokenreaches the model as<REDACTED>.Selector extraction no longer multiplies nested text.
WebScraperTool.extractWithSelectorcopied each match's whole descendant text, so nested matching ancestors repeated the same text up to 20 times. An element inside an already listed one is skipped, and text is gathered by a bounded walk (boundedText) against one 20,000-character output budget (5,000 per element), so nothing past the budget is materialized.
Design decisions
The webhook replay findings of the same scan are not in this change. Open PR #1126 already moves the webhook dedup cache to a cluster-shared bucket and refuses instead of evicting; the longer retention for body-signed schemes (
github,generic-hmac) follows once it has merged, so the two do not conflict inWebhookEventHandlerandCacheFactory.
Files: ToolLoopRunner.java, WebScraperTool.java, security.md
🔒 fix(secrets): linear-time reference scanning, a new secret's grant is checked against agents already referencing it, rotation retires legacy checksums (2026-10-26)
Repo: EDDI (fix/vault-reference-scanning)
Follow-up to a repository security scan of the vault and connection code.
What changed and why
Reference scanning is linear.
find()over the${vault:…},${connection:…},${vars:…}and tenant-reference regexes retried at every opener, and when no closing brace followed, each attempt scanned the rest of the text. A global variable value or a parameter with thousands of unterminated openers therefore cost time quadratic in its length, on every variable write, every deployment grant check and every resolved parameter. The newReferenceScannergives the regex's answers match for match (same start, end, tenant and name, nested openers included) but remembers its searches for the next}and/, so each character is examined a constant number of times.SecretResolver,VaultGrantChecker,SecretReference.parseandConnectionReference(contains,requireSole,parse) use it.SecretReference.VAULT_PATTERNandConnectionReference.CONNECTION_PATTERNstay as the documented grammar.A secret's grant is checked when it is created, against the agents already referencing it.
VaultGrantCheckerlets a deployment through when a referenced secret does not exist yet — agent sync promotes a workflow to an instance that does not hold the source's secret and then deploys it, andAgentSyncITcovers that flow. The resolver checks no grants, so a secret created later and restricted to another agent used to resolve for every agent already deployed with a reference to it, until its next deployment.PUT /secretstore/secrets/{tenantId}/{keyName}and the space-secret endpoint now answer 409 underenforceto a create whoseallowedAgentsleaves out such an agent, naming it (VaultGrantImpactAnalyzer.refusalToCreate, reusing the grant-change impact scan);warnlogs and creates,offdoes not look. A first version of this branch made the absent secret a deploy-time violation instead, which broke the agent-sync flow.The create-time scan covers the cluster, and refuses when it could not look everywhere. The scan read only
IAgentFactory, a per-node registry, while the vault is shared by every node, so an agent deployed on another node was invisible to a create handled here. It now also reads the deployment records in the shared database (IDeploymentStore.readDeploymentInfos(deployed)), deduplicated against the local registry, which alone sees a deployment stillIN_PROGRESS(now counted) or one made withautoDeploy=false. AndrefusalToCreateused to ignore the scan'scompleteflag, so underenforcean agent whose configuration could not be read, or a listing that failed, let the create through on an empty list. It now refuses with its own 409 naming the unread agents (GrantImpact.unverifiedAgents). This is the opposite of the deploy gate on purpose: a refused deployment is an outage, a refused create is a retry, and naming the agent on the grant or granting*needs no scan. The grant-change response'sagentsLosingAccessScopereadsclusterinstead ofthis-node. Left open: a deployment recorded on another node a moment after the scan read the records.The checksum key cannot be stranded under a retired KEK.
loadOrCreateChecksumKeychecked the KEK before inserting the key, but a node stalled between that check and the insert pastrotateKek's last read of the key would persist it wrapped under the retired KEK, and every node restarted with the new master key would then fail on its next store. The race predates this branch (firststore), and the legacy-checksum upgrade inrotateDekmade it reachable a second way. The insert is now followed by a second check, as for a DEK (takeBackIfKekRetired): when the KEK moved, the key is deleted only while it is still the value this node wrote (ISecretPersistence.deleteMetaValueIfEquals, atomic on Mongo and Postgres), so a key the rotation already re-wrapped is kept.DEK rotation upgrades legacy checksums. A row written before the keyed checksum still held a bare SHA-256 of the plaintext, which anyone with the row or a backup can test guesses against offline.
VaultSecretProvider.rotateDekhas the authenticated plaintext in hand, so it now writes the keyed, tenant-bound checksum in the same guarded re-seal.updateSecretSealing(Mongo and Postgres) persists the checksum with the ciphertext.
Docs: secrets-vault.md ("What counts as granted", and the checksum note under the REST API).
Tests
ReferenceScannerTest: parity with the regexes on hand-picked and fuzzed input,matchesWhole,replaceAll, and timing guards on many unterminated openers for each caller.VaultGrantCheckerTest.absentSecretIsNotAViolation;VaultGrantImpactAnalyzerTest(create-time refusal, modes, an unreadable agent or a failed listing refusing underenforce, agents found only in the deployment records, one agent in both sources checked once,IN_PROGRESScounted);RestSecretStoreGrantOnCreateTest(409 and no write).MongoSecretPersistenceTestandPostgresSecretPersistenceTest(Testcontainers):deleteMetaValueIfEqualskeeps a value that differs from the expected one and removes only the exact one.VaultKeySafetyTest.StaleReplicaRace: a checksum key inserted after a KEK rotation, viarotateDekand viastore, is taken back and a node on the new master key can store.VaultKeySafetyTest.rotationRetiresLegacyChecksums.PostgresSecretPersistenceUnitTestfollows the new parameter order.
Stale deployment rows. The deployment sweep now checks for a missing Agent config before skipping rows this node already tracks, so a shared row that the agent-delete cascade could not remove is retired (and the agent undeployed locally) instead of lingering (for rows this node already tracks the check runs at most once every 5 minutes per row, since the agent store has no read cache) and making the grant analyzer answer UNKNOWN for it.
feat(hitl): a person's note on a rejected tool call asks the model to revise (2026-10-26)
Repo: EDDI (feat/hitl-note-asks-for-changes)
What changed and why
An approval card lets a person send a note instead of approving ("use a shorter title"). Until now a rejected call always told the model "the reviewer declined this action, do not retry, offer alternatives", so a note that asked for a change produced an explanation instead of a corrected proposal. Two small changes in ToolLoopResumer:
The instruction depends on who decided. When the note is non-blank and
decidedBydoes not start withsystem:, the rejection tool-result says the user did not approve the call and left a note: if the note asks for changes, call the tool again with exactly those changes and nothing else changed (the user will be asked to approve the new call); if it declines or asks for something else, do not call it again and reply briefly. With no note, or for an automated decision (system:timeout,system:group), the text is exactly what it was. Detection is the existingsystem:convention ondecidedBy, never the note text, so the group-conversation auto-reject cannot make the model retry a call that can never be approved.A per-call rejection falls back to the top-level note. A call listed in
toolDecisionswithREJECTEDand no note of its own (absent or blank) now usesdecision.note, as an unlisted call already did. A call's own note still wins; approved calls are unaffected.
The re-proposed call is an ordinary new call: it is gated, pauses again with a new pauseId and needs its own approval, so an approved call is never silently changed. Each re-proposal counts toward hitlConfig.toolApprovals.maxPausesPerTurn (default 3, maximum 10); docs/hitl.md says to raise it where notes are expected to come back as revisions.
No REST shape, verdict type or default changes.
Tests
ToolLoopResumerNoteTest: the envelope for a person's note, for no or blank note, and for system:timeout / system:group with a note; the per-call fallback through the real resume loop (own note kept, absent and blank fall back, unlisted unchanged); and one test that stores a paused conversation as a snapshot document, loads it back, resumes it REJECTED with a note and asserts the model's next request carries the new instruction and the note.
🐛 fix(llm): a \' inside a JSON reply no longer turns a complete answer into the fallback (2026-10-26)
Repo: EDDI (fix/llm-json-repair-backslash-quote)
What changed and why
Gemini sometimes escapes an apostrophe inside a JSON string the way JavaScript and Python allow: "Japan\'s ruling class". JSON has no \' escape, so ModelOutputParser reported invalid JSON syntax for the whole reply, and a convertToObject task served its fallback answer ("Sorry, I could not answer that just now"). In the case that showed it, the reply was complete and correct, about 1,300 characters long, and one apostrophe was the only defect.
ModelOutputParser now drops the backslash of \' inside JSON strings, after the fence strip and before parsing. This is the one exception to its "invalid JSON is never fixed" rule, and the class Javadoc says so. It is safe because \' is never valid JSON and can only mean '.
The pass is string-aware and linear. It copies every other escape as the pair it is, so
\\'(an escaped backslash, then a quote) stays valid JSON and\"does not end the string. Outside strings nothing changes.The whole reply is repaired once; when the object has to be extracted from prose, each candidate is repaired on its own, so an unmatched
"in the text before the object cannot shift what counts as inside a string.A reply without
\'is not copied.A repaired reply reports
repaired, like a stripped fence.A reply that is still invalid keeps its raw text, and a second, real syntax error is not hidden.
Tests
ModelOutputParserTest:
accepted: the observed case, several
\'in one object and inside an array, fenced, with prose around it, and with an unmatched quote in the prose before it;left alone:
\\'stays valid and unrepaired, and an escaped double quote does not end the string;still rejected: prose containing
\'isnot JSONwith the raw text kept, and\'plus a trailing comma is stillinvalid JSON syntax.
Mutation checks:
With the repair switched off entirely, the acceptance cases that contain
\'fail, and the\\'case passes either way, as it should.With only the per-candidate repair removed, the two extraction cases fail: prose around the object, and the unmatched quote before it.
✨ feat(email): conversation mode — the agent replies in the mail thread — email Phase 3 (2026-10-25)
Repo: EDDI (feat/email-conversation-mode, on top of feat/email-trigger-mode, feat/email-dkim, feat/email-hitl-notifications and feat/email-mail-core)
Phase 3 of the email plan (§5 conversation column, §9, §10, §11, §12, §13, §15, §16, §17, §20, §21): channelType: "email" with mode: "conversation". The agent answers in the thread over SMTP — only to the DKIM/DMARC-authenticated From of the mail it answers, never Cc, never an unauthenticated or email-anon: sender, never an address the model chooses. Trigger mode is unchanged and still sends nothing. Docs: email-integration.md → Conversation mode.
Settings and save validation
EmailChannelSettings:mode: "conversation"is accepted, withsmtpHost(required),smtpPort(587 STARTTLS required, default, or 465),fromName(header-safe, ≤ 100),replyTemplate({output}, ≤ 4000),aiDisclosure(a default sentence; a present, empty value switches it off, ≤ 500),threadParticipants(originalSenderOnly|anyAuthenticatedParticipant),maxRepliesPerThreadPerHour(5, 1–1000) andhonorReplyTo(false).requireAuthentication: falseis refused in conversation mode, andfrom()forces it true so no reader can see false;correlateThreadsis implied (and refused with a value). Each mode refuses the other's keys when they carry a value. New save warnings inX-Eddi-Warnings:email.ai-disclosure-disabled,email.honor-reply-to.EmailChannelSupportalso resolvessmtpHostunder the author socket policy (SafeSocketConnector.resolve,Protocol.SMTP) and requires the connection's allowlist to namesmtp://<host>:587/smtps://<host>besides the IMAP origin.
Transport and the reply path
SmtpSubmitter(engine/mail, new): the one SMTP submission over Angus Mail on aSafeSocketConnectorendpoint, extracted fromSystemMailer(which now delegates). The policy is the caller's: it takes anEndpointand never resolves a host.MailTransport.send(SPI) —ImapMailTransportsends over SMTP with the integration's connection (BASIC, or XOAUTH2 with the mailbox as user), envelope sender = the mailbox (bounces come back to it). It refuses an integration that is not in conversation mode, and any endpoint that is not an author-policy SMTP endpoint, before a socket opens.MailboxSession.findByMessageIdfinds a mail again bySEARCH HEADER Message-ID(exact match after) in the polled folder or the move folder.integrations/email/reply/(new):EmailReplyRecipients(the one recipient decision, re-applied on every attempt: conversation mode; the answered mail is this integration's inbound row and reached a turn; the conversation runs asemail:<id>/email:<id>:<address>, neveremail-anon:; the mail's step in memory names the same mail,aligned-passand the sameFrom; under perSender + originalSenderOnly the identity is that address; never the own address;Reply-Toonly withhonorReplyToand exactly one address),EmailReplyComposer(replyTemplateon the restricted engine with the output and subject as data, then the disclosure;OutboundMail.replyInThread, new),EmailReplyThread(reads the reply from conversation outputs — the same outputs from the completion callback and from the stored conversation),EmailReplySender(ledger rows, inline first attempt on a managed executor, retries, bounces),EmailHitlResumeObserver.Ledger:
Kind.REPLY,Direction.OUT, idempotency keyreply:<sha256(conversation, inbound row + step, kind)>,sourceRef=<inbound row>|<kind>|<step|pause|verdict>; claim/lease/complete/reschedule like notifications, its own worker (@Scheduled(identity = "email-reply-sweeper"),eddi.email.reply.sweep-interval,claimDue(Kind.REPLY)), backoff and attempts fromeddi.email.outbound.*,FAILED→ owner noticereply_failed. No body: a retry re-reads the conversation and re-renders under the row's Message-ID. NewfindByConversationandcountByConversationSince(indexes on both stores).Inbound (
EmailInboundProcessor, conversation-mode branch only): the turn is submitted with all outputs in the detailed projection — the default one strips each step'scontext, where the mail map lives, so a reply would find no step to answer (EmailReplyThreadSnapshotTestpins this against the real converter, and the retry and sweep reads ask for the same) — and with the mail's ledger key as its idempotency key; its completion hands the snapshot to the reply sender before the row moves toDONE. A mail whoseIn-Reply-To/Referencesnames one of the integration's replies continues that reply's conversation — when its sender started it, or (anyAuthenticatedParticipant) a reply in it was sent to them; anyone else falls through to the sender-keyed thread key. Themailcontext map gainsinReplyTo,references,replyTo. A group target's synthesis is the reply (GroupDiscussionEventListener.onGroupComplete).HITL in the thread: on
HitlPauseCommittedEventthe sender gets the output so far plus the pause reason — never the tool or its arguments; onHitlResumeCompletedEventthe continuation (approval) or a plain notice (rejection, cancellation, timeout, failed continuation), the approver never named. Human takeover: not built (planning/human-takeover-design.mdis a design under review), so nothing to send.
Loops, bounces, suppression
maxRepliesPerThreadPerHourcounted from the ledger per conversation; over it the row isSUPPRESSED(THREAD_BUDGET) with a once-a-day owner noticethread_throttled.A DSN for one of the integration's own reply Message-IDs, with a permanent failure for that reply's recipient, fails the row (
BOUNCED: <status>) and adds the address to the newIEmailSuppressionStore(Mongo + Postgres, per integration, SHA-256 + domain, no address); delays are noted. Never sent to a suppressed address (checked at queueing and before each attempt). Cleared by an administrator through the newGET /channelstore/channels/{id}/email-suppressionsandPOST …/email-suppressions/clear(EDIT on the integration; the address in the body, not the URL). Deleting the integration drops its list; GDPR erasure deletes an address's entries (EmailSuppressionGdprParticipant, stepemailSuppressions).
Stranded handling (both modes)
A
TURN_SUBMITTEDrow whose conversation holds the mail's step: conversation mode rebuilds the missing reply (or pause notice) from the stored conversation (stranded_recovered{outcome=reply_rebuilt}) before closing the row.The trigger-mode gap is closed: a conversation that was started but never ran the mail's turn (idle or paused, no step for the mail) is handed back to
RECEIVEDkeeping its conversation (conditional — one sweeper wins,outcome=resubmitted); the next poll finds the mail by Message-ID in the polled or move folder and runs it once in that conversation (the turn's idempotency key is the mail's ledger key). Not in the mailbox any more →REFUSED(stranded:not_in_mailbox)+lostnotice. Ended or failed conversations, and unreadable ones, are resolved as before — when in doubt, a mail is not run twice.
Metrics, audit, Manager, operator, docs
eddi.email.outbound{kind=reply,outcome=sent|retry|failed|suppressed|throttled|refused|bounced|no_output},eddi.email.outbound.latency{kind=reply},eddi.email.suppressions{reason};eddi.email.inboundgainsoutcome=bounceand realmodetags. Three Full Metrics panels (k8s copy re-synced), metrics.md.Audit
email.replyper sent, failed or bounced reply (integration, reply kind, outcome, Message-ID, ledger row, recipient domain + SHA-256 — no address, no body).Manager: a mode selector, a Replies section (SMTP host/port, sender name, who may continue a thread, reply limit, Reply-To with its warning, AI disclosure toggle with its warning, reply template), forced authentication in conversation mode, mode switches drop the other mode's keys, DKIM/DMARC and suppression notes, the two new warning toasts; 38 new
emailChannel.*keys and one reworded (modeNote) in all 11 locales. Operator revision 38 → 39: the system prompt explains conversation mode, its recipient rules, HITL in the thread, bounces and how suppressions are cleared; no channel endpoints are granted (the operator has none), sotool-scopes.tsis unchanged. MCP channel tool descriptions and theeddi-adminplugin skill cover conversation mode.Docs: email-integration.md, hitl.md, security.md, configuration-reference.md, gdpr-compliance.md, compliance-data-flow.md; the plan's status line says Phases 0–3 are implemented and 4–7 are not.
Tests
Unit: EmailReplyRecipientsTest (every rule alone), EmailReplyComposerTest (output and subject as data, {#include} printed, threading headers, header injection), EmailReplySenderTest (idempotency under concurrency, suppression at queueing and before the attempt, thread budget, retries rebuilt with the same Message-ID, permanent failure → owner notice, re-checked rules on retry, pause notice minimisation, resume continuation, DSN mapping and spoofed DSNs, group synthesis), EmailConversationModeTest (processor + sender: reply, thread via EDDI's Message-ID, hijack guard, participants, unauthenticated never answered, bounce → suppression, resubmission, trigger mode never touches the reply sender), EmailChannelSupportTest, EmailHitlResumeObserverTest, EmailSuppressionGdprParticipantTest, the suppression store contract on the in-memory double, and new cases in EmailChannelSettingsTest, RestChannelIntegrationStoreEmailTest, EmailInboundSweeperTest, the ledger contract. EmailTriggerModeSendsNothingTest is rewritten on purpose: SystemMailer only in the staff notifiers, SMTP only in ImapMailTransport (and the save-time host check), composing only in the notifiers and the reply path, transport.send only in EmailReplySender, and the transport refusing trigger mode. ITs: EmailConversationModeIT (GreenMail IMAPS + SMTPS on loopback, TLS verified: full loop with headers, answer to EDDI's Message-ID, third party, bounce → suppression, crash before send → exactly one rebuilt reply, resubmission found by Message-ID and run once), Mongo/PostgresEmailSuppressionStoreIT, the new cases of Mongo/PostgresEmailMessageLedgerIT. The security guards were mutation-checked.
Review follow-up (PR #1144)
Resubmissions per integration.
pendingResubmissionsread one global batch of 50 dueRECEIVEDrows and filtered it in memory, so rows nobody polls any more (a deleted or invalid integration's) could fill it for ever. The newIEmailMessageLedger.findDueResubmissions(integrationId, now, limit)filters in the store (MongoDB, PostgreSQL, in-memory, contract case). Orphaned rows block nobody now and are left to ledger retention.No 500-row cap on a thread.
findByConversation(oldest 500 rows) gives way tofindInboundTurn(conversationId, latest)andhasSentReply(conversationId, recipient), so a long thread still finds the mail a pause notice or continuation answers, andanyAuthenticatedParticipantstill admits an address a late reply went to.Cost before the reply.
completed()records the turn's spend before queueing the reply, so a reply that cannot be queued no longer drops the cost fromdailyCostBudgetUsd.A failed reply rebuild keeps the row. The stranded sweep leaves the row
TURN_SUBMITTED(reply_rebuild_failed:<n>, deadline moved bystranded-after) and tries again, 5 sweeps in all, instead of closing itDONEwith no reply.Oversized resubmission. A resubmitted mail found over
maxMessageBytesendsREFUSED(too_large)and the poll goes on, instead of failing and backing off on the same row every poll.Wording. hitl.md, configuration-reference.md and email-integration.md say the ledger deduplicates rows, not deliveries: a crash after the relay accepted a message and before its row completed can send it twice (same Message-ID). The recipient rule in the Manager's mode note, the operator prompt (revision 40), the
create_channel_integrationdescription and theeddi-adminskill now name thehonorReplyToexception; the throttle hint says further replies are not sent (they areSUPPRESSED), not delayed — all 11 locales.Manager mode.
emailModereads the mode case-insensitively likeMode.fromId, so an API-saved"CONVERSATION"integration keeps its conversation controls and reply settings on save.Tests:
EmailConversationModeTest,EmailReplySenderTest,EmailInboundSweeperTest,EmailMailboxPollerTest, the ledger contract (Mongo/PostgresEmailMessageLedgerIT) andemail-channel.test.ts, each mutation-checked.
✨ feat(email): the email channel in trigger mode over IMAP — email Phase 2 (2026-10-25)
Repo: EDDI (feat/email-trigger-mode, on top of feat/email-dkim, feat/email-hitl-notifications and feat/email-mail-core)
Phase 2 of the email plan (§3, §5 trigger column, §6, §7.1 inbound, §9–§14, §17, §20, §21): channelType: "email" with mode: "trigger". EDDI polls an IMAP mailbox and every new mail starts one agent turn. Nothing is ever sent to a sender — no reply, no bounce. Conversation mode is refused at save time until Phase 3. Docs: email-integration.md.
The channel
EmailChannelSettings(configs/channels/model): one reader for the save and the poll path, every key of plan §10's trigger mode with its default, plusport(993 / 143),correlateThreadsandownerNotifyAddresses. Unknown keys and the conversation-mode keys (smtpHost,replyTemplate,aiDisclosure, …) are refused; the connection is a name, never a credential;attachments: storeneeds a MIME allowlist.RestChannelIntegrationStoreregistersemail. Besides the static checks,EmailChannelSupportchecks against the deployment: the host passesSafeSocketConnector.resolve(author policy), the connection exists, isBASICor OAuth, notPER_USER, and its allowlist namesimaps://<host>/imap://<host>:143(ConnectionResolver.requireMailLoginTarget, new — no credential is resolved), and the address is unique per deployment (fail closed).observeModeis refused. Saving (re)creates the poll schedule; deleting removes it; duplicating is refused (same address). Warnings ride in a newX-Eddi-Warningsheader as stable codes:email.open-trigger(no allowlist and no authentication requirement) andemail.tools-without-approvals(a target agent can use tools but has notoolApprovals, found byEmailAgentToolsInspector— plan §14 item 6). MCPcreate_channel_integration/update_channel_integrationdescribe the email keys and return the warnings.
Polling (no custom scheduler)
EmailPollSchedules(marker, likeRagIngestionSchedules): oneHEARTBEATschedule per integration,email-poll:<integrationId>, everypollSeconds.ScheduleFireExecutorhands it toEmailMailboxPollerbefore the creator check (the integration governs it) and refuses a row whose name does not match its metadata;RestScheduleStorerefuses client bodies declaring the marker, refuses updates of a managed poll schedule (409), and requires EDIT on the integration to fire one. A mail-server outage is a COMPLETED fire with the error in the fire log: the poller backs off by itself (pollSeconds × 2^(failures−1), ≤ 1 h) instead of the schedule dead-lettering.ImapMailTransport(Angus Mail onSafeSocketConnector, author policy only): XOAUTH2 withresolveAccessToken(the address as the user) orBASICwithresolveBasicLogin; one folder opened read-write; envelope + flags +RFC822.SIZE+INTERNALDATEfirst, thenBODY.PEEK[](never\Seen) bounded bymaxMessageBytes; marking sets$EddiProcessedwhere the server takes keywords and moves withMOVEwhen configured — never a copy-and-delete, never an expunge (the folder is closed withexpunge=false).Cursor (
IEmailMailboxStateStore, Mongo + Postgres, new):UIDVALIDITY+ the last UID up to which everything is settled; a deferred mail holds it back. The first poll starts atUIDNEXTand recordssince, so mail predating the integration is never processed (rescans included, with 5 min slack for whole-secondINTERNALDATEs). A changedUIDVALIDITYrescans, deduplicated by the ledger and the keyword, counted.
The inbound pipeline (EmailInboundProcessor)
Envelope Message-ID pre-check (a deferred or settled mail costs no download) → size → fetch → parse → ledger row RECEIVED (conditional insert on (integration, IN, Message-ID)) → SenderAuthenticator as of INTERNALDATE (a temporary verdict defers the mail, unmarked, for at most a day) → EmailLoopGuard (auto-reply headers, reports, daemon/null return paths, own address, another integration's address, EDDI-minted Message-IDs, replies to mail another integration or the system mailer sent) → blocklist → allowlist → requireAuthentication → daily cost budget (stops the batch) → per-sender daily turns (defers to the next UTC day) → identity → routing (plus-tag, then subject word, then default) → optional thread correlation → claim RECEIVED → TURN_SUBMITTED → conversation, attachments, turn (queued, not awaited) → DONE from the completion callback with the turn's cost added to the day. Every refusal is REFUSED(<reason>), counted, never answered.
Identity (
EmailUserIdentity):email:<integrationId>:<address>(perSender) oremail:<integrationId>(integration) only forALIGNED_PASS; otherwise, withrequireAuthentication: false, a one-offemail-anon:<random>that never correlates and has no memory:ReservedPrincipals.hasNoPersistentMemorymakesConversationService.createPropertiesHandlerhand it no user-memory store and no memory tools, andContextualToolsProviderrefuses the memory tool for it as a second line. Both prefixes are reserved principals. Turns areSELF_ASSERTED(no caller identity on the poll thread), soPER_USERconnections are refused.Hijack guard: the thread mapping key (
IUserConversationStore) isemail:<integrationId>:<agentId>:sha256(threadRoot + sender)— a continuation from anyone but the original authenticated sender starts its own conversation, in both identity modes. Busy or paused conversations defer the mail.Mail is data:
inputTemplate(default: the mail framed as untrusted third-party content, plan §14 item 4 — a deliberate deviation from §10's bare{mail.subject}\n\n{mail.text}) renders on the restricted runtime engine with the mail as data; a failing template falls back to subject + text joined in Java. Themailcontext carries plan §10's fields plusanomalies(e.g.alternatives_diverge);mail.textgoes to the template only.Attachments:
storeputs allowlisted types intoIAttachmentStoreunder the conversation and passesattachment_<n>(storageRef) to the multimodal pipeline; executables never, at most 20, every skip named.Budgets and owner notices (
EmailOwnerNotifier): once per UTC day and reason (budget,throttled,quota), cluster-wide viaclaimNotice: a WARN line always, plus a plain-text mail through the Phase 1 system mailer toownerNotifyAddressesinsideeddi.mail.notify.allowed-recipient-domainswhen a mailer is configured; one attempt, aNOTICEledger row, no retry. Tenant quotas apply as for webhooks (a refusal hands the claim back and stops the poll).
Ledger, stranded turns, GDPR
IEmailMessageLedgergainsKind.TRIGGER/NOTICE, the inbound states,transition,findDue,findByMessage,findOutboundByMessageIdandcountInboundTurns(new indexes on both stores). An inbound row'srecipientis the sender, so the existing erasure/export path reaches it.Stranded turns (
EmailInboundSweeper,@Scheduled(identity = "email-inbound-sweeper")): a row stillTURN_SUBMITTEDpasteddi.email.inbound.stranded-afteris resolved from its conversation — idle/failed/paused →DONE, running → deadline extended, no conversation →REFUSED(stranded). In trigger mode there is no reply to rebuild, and a mail is never run twice (the raw bytes are not kept and a second run could repeat tool side effects), so a node dying between claim and turn is the one way a mail can be lost; it is logged and counted. The sweep also re-creates missing poll schedules (e.g. after a ZIP import).Audit: every refused mail is an audit entry
email.inbound(integration, reason category, ledger row, Message-ID, sender domain + SHA-256, no address or content). Integration create/update is not audited separately yet.GDPR:
EmailIdentityGdprParticipant(emailIdentities) runs the erasure/export cascade for everyemail:<integrationId>:<address>identity of an address (current integrations and those its inbound rows name);EmailLedgerGdprParticipantalso matchesemail:identities.
Metrics, docs, Manager, operator
eddi.email.inbound{integration,transport,mode,outcome},eddi.email.poll.duration{…,outcome},eddi.email.poll.cursor_resets,eddi.email.ledger.stranded_recovered{outcome};eddi.email.outboundgainskind=notice. Four panels on the Full Metrics dashboard's Integrations row (k8s copy re-synced), metrics.md.eddi.email.auth{result}stays deployment-wide (one tag set per name).New properties
eddi.email.poll.max-messages-per-poll(50),eddi.email.poll.max-duration(2m),eddi.email.inbound.stranded-after(30m),eddi.email.inbound.sweep-interval(5m).Docs: email-integration.md (Exchange Online with OAuth client credentials and a per-mailbox permission, app passwords, every key, what the agent sees, identity, threads, budgets, security, the helpdesk recipe — webhook channel +
httpcalls), SUMMARY.md, security.md, configuration-reference.md, compliance-data-flow.md (the mailbox host as processor), gdpr-compliance.md, connections.md.Manager: an Email channel type with a trigger-mode form, the security hints (allowlist, Exchange per-mailbox permission, tool approvals), the open-trigger warning before saving and the
X-Eddi-Warningscodes as toasts after (api-client.tsnow exposes response headers); 73emailChannel.*keys in all 11 locales. Operator revision 37 → 38: the system prompt explains the email trigger channel, its security posture and when to use the helpdesk recipe instead; no new endpoint, sotool-scopes.tsis unchanged. Theeddi-adminClaude plugin skill mentions the email channel.ReservedPrincipalsTestclassifies the new non-principal prefixes (andsha256:/notify:, which the previous slice left unclassified).
Tests
Unit: EmailChannelSettingsTest, EmailInboundProcessorTest (state machine; temporary verdicts not marked; unauthenticated refused or anonymous without correlation; loop guard; lists; oversize before download; crash after claim; hijack guard in both identity modes; executables never stored; Qute in subject/body printed, not run; budgets, throttle, quota), EmailMailboxPollerTest (mark after the ledger, cursor holding, STOP, skips, UIDVALIDITY, backoff, self-removal), EmailInboundSweeperTest, EmailChannelPiecesTest (patterns, identity, schedule, notices, GDPR), RestChannelIntegrationStoreEmailTest, and email cases in ScheduleFireExecutorTest, RestScheduleStoreTest, ConversationServiceDeepBranchTest. ITs: EmailImapPollingIT (GreenMail IMAPS on loopback through the SafeSocketTestSupport seam, TLS verified: new mail runs and is flagged but not \Seen, move, oversize, crash between ledger and mark, UIDVALIDITY change, login failure), Mongo/PostgresEmailMailboxStateStoreIT, and the inbound cases of Mongo/PostgresEmailMessageLedgerIT. The security guards were mutation-checked.
Review follow-up: crash recovery, keywords, type switching, a send guard
A claimed mail that did nothing is processed again. New inbound state
CLAIMEDbetweenRECEIVEDandTURN_SUBMITTED: the claim is taken first, andTURN_SUBMITTED(the point of no return) is written immediately before the first side effect (conversation start, group discussion, turn). A mail is marked or moved only when its row is past that point or refused, and the cursor never passes an unsettled mail, so aCLAIMEDmail is still unmarked in the polled folder. A stale claim (pasteddi.email.inbound.stranded-after) is given back toRECEIVED— by the next poll that meets it, or by the inbound sweep — and the poll fetches and processes it again (stranded_recovered{outcome=requeued}). The sweep deliberately opens no IMAP session: the poller owns the mailbox under its schedule's cluster claim. OnlyTURN_SUBMITTEDwithout a recorded conversation (a crash insidestartConversation, whoseCONVERSATION_STARTmay have called tools) staysREFUSED(stranded), now also with the once-a-day owner notice reasonlost.Servers without custom keywords (Exchange Online, some hosters): marking checks
PERMANENTFLAGSfor\*or$EddiProcessed; without them — or when the server refuses the STORE anyway — no keyword is set, the poll goes on (cursor + ledger), one WARN per integration per node, and the neweddi.email.poll.marked{result}counter (dashboard panel) showsnothing. Not refused at save time: saving does not connect to the mailbox. The docs recommendmove:<folder>for Exchange.Manager: switching an existing channel's type drops the old type's keys (
platformConfigForType); switching to email starts from the fixed mode/transport keys, and nothing resurfaces on a round trip.No reply path, pinned:
EmailTriggerModeSendsNothingTestscansintegrations/email/and fails if anything but the two staff notifiers (EmailOwnerNotifier,HitlEmailNotifier) referencesSystemMailer, an SMTP transport or the outbound renderer. Phase 3 changes that test on purpose.Not handled yet: a node that dies after starting a conversation but before the queued turn ran is resolved as
DONE.
Review follow-up 2: one start per mail, no partial integration list, CORS
A retried mail reuses the conversation an earlier attempt started. When the turn failed after
startConversation(a quota, a busy executor, a failedsay), the row went back toRECEIVEDand the retry started a second conversation, soCONVERSATION_START(which may call tools) ran again — for any mail without a thread mapping (correlateThreadsoff, or unauthenticated).EmailInboundProcessornow reads the row'sconversationIdon the retry and sends the turn there; a busy one defers, an ended one starts a new conversation (as a mapped one does). Chosen over refusing such mails, which would drop every mail that met a passing rate limit.EmailIntegrationDirectory.scan()no longer returns a partial list. A store read failure on one integration was swallowed per descriptor, so address uniqueness at save time (fail closed, 503), GDPR identity expansion and schedule ensuring could silently miss it.find()now throwsStoreUnavailableException, whichscan()lets through; only an unparseable descriptor is skipped.X-Eddi-Warningsis inquarkus.http.cors.exposed-headers, so a Manager on another origin sees a channel save's warnings (CorsExposedHeadersConfigTest).Docs: the ledger lifecycle in email-integration.md names
CLAIMED; the Full Metrics Reference's stranded panel describesrequeuedand the current meaning oflost.
For Phase 3 (conversation mode)
Replies are
Kind.REPLYrows,Direction.OUT, withsourceRef= the conversation step; the loop guard already exempts replies to an integration's own outbound ids. The thread key (EmailInboundProcessor.correlationIntent) andthreadRootare the mapping to reuse; add the outbound Message-IDs to the root lookup.The stranded sweep is where a lost reply is rebuilt from the snapshot (
TURN_SUBMITTEDpast its deadline with a completed step and noREPLYrow).SMTP for a channel must use
SafeSocketConnector.resolve(author policy), neverSystemMailer/resolveOperator.email-anon:identities must never receive a reply (plan §9);requireAuthenticationis forced on there.
🎨 feat(manager): brand-aware strings, logos, titles, update UI and About — white-label phase 3 (2026-10-25)
Repo: EDDI (feat/white-label-4-manager-strings)
What changed and why
Phase 3 of the white-labeling plan: the Manager names the brand instead of EDDI. Unbranded, everything reads and looks as before. docs/white-labeling.md has a new "The Manager" section.
src/lib/brand.tsreadswindow.__EDDI_BRAND__field by field, with the EDDI defaults for anything missing, so Vitest, the dev server and MSW mode need no backend. It is one store (getBrand,setBrand,subscribeBrand); components useuseBrand()(src/hooks/use-brand.ts,useSyncExternalStore).brand.test.tsevaluates the Vite plugin'sDEFAULT_BRAND_SCRIPTand requires it to equalDEFAULT_BRAND, which closes the chain Java = plugin =brand.tsthatBrandDeliveryTeststarts.Strings.
src/i18n/config.tssetsinterpolation.defaultVariables = { productName, shortName }beforei18nReadyresolves, and updates them in place (then re-announces the language) whensetBrandruns, which is what Phase 4's live reload needs. Of the 77 English values naming EDDI, 63 product mentions became{{productName}}in all 11 locales by script; 12 engine-version gates ("Needs EDDI 6.6 or later", "This EDDI does not record…") were rewritten by hand to "server version" wording in every locale; 2 technical names stay (theeddi-v1webhook signature hint and the "EDDI Cluster" Grafana dashboard). 76t()fallbacks in 45 files followen.json. Eleven translations that had dropped the name, or named it once where English names it twice (onboarding.tour.dashboard.step4Descin four locales,syncPage.*in three, one German sentence) were retranslated with the variable, because the interpolation-integrity test now sees it. The secrets API's English error no longer names EDDI.Guard:
src/__tests__/no-eddi-brand-literal.test.tsfails on\bEDDI\bin any locale value,t()fallback,defaultValue, JSX text, oralt/aria-label/title/placeholderinsrc(tests, test mocks and comments excepted), after strippingEDDI_*,X-EDDI-*andlabsai/EDDI. Its key allow-list holds the Powered-by notice and the two technical names, each with a reason. The Platform Operator's files are excluded with a TODO naming Phase 6.Logos.
components/layout/brand-logo.tsx(BrandWordmark,BrandIcon) replaces the bundled data URI in both sidebars and/eddi-icon.svgon the landing page, the Workforce collapsed sidebar and the Workforce onboarding hero. The collapsed Manager sidebar shows/branding/iconwhen branded and the "E." monogram otherwise. Alt texts and labels are the product name.Titles:
use-document-title.tsbuilds<page> — <app.title>, andapp.titleis{{productName}} Manager.Update UI (R5):
isUpdateUiVisible(brand)(!branded || showUpdateCheck) gates the Updates nav entry and command-palette entry (throughuseMayOpenScreen), the/manage/updatesroute (redirects to/manage), the banner inAppLayout, and the automatic check itself (useUpdateCheck's query is disabled), so a stored auto-check preference never contacts GitHub on a branded deployment.About dialog (
components/layout/about-dialog.tsx), opened from the Help menu in the sidebar footer, and from the version label when the update UI is hidden: product name, tagline, version, and whilepoweredByis on, "Powered by EDDI" with the Apache 2.0 notice and a license link. Sixabout.*keys in all 11 locales.Dev entry.
ui/manager/index.html, which serves deep links undernpm run dev, now loads/branding/__brand__.jsbefore the bundle and/branding/brand.css, uses/branding/iconand the%BRAND_PRODUCT_NAME%placeholders;vite-plugin-brand.test.tspins it.Monaco: the prompt editor's template-variable colours come from
--editor-template-variable(-light)inindex.css, read once at registration (src/lib/css-color.ts), with today's hex as the fallback.
Design decisions
The light/dark logo trick depends on
branded. The bundled default for both/branding/logoand/branding/logo-darkis the white EDDI wordmark (the shells' loader shows/branding/logoon a dark background, so the default cannot be dark). Unbranded, the sidebar keeps one image withinvert dark:invert-0, pixel for pixel as before. Branded, it shows the light and the dark slot as two images switched by the.darkclass (a<picture>media query cannot see the app's theme) and never inverts, since inverting a colour logo produces its negative. Trade-off: a brand that sets only a name keeps the white EDDI wordmark, which is faint on the light sidebar. The settings page (Phase 4) can warn about that;__brand__.jsdoes not say which slots are uploaded.A failed
/branding/*logo falls back to the bundled wordmark (onError), so the design-system bundle, which has no server, still renders it;src/assets/logo_eddi.pngtherefore stays.Engine-version gates name the server, not the brand. "Needs Acme 6.6" would mix the brand with EDDI's version numbers; "server version 6.6" is true under any brand. The sidebar's version label does show
<product> <version>, as the plan asks.The update strings use
{{productName}}rather than an allow-list: they only show unbranded or when the brand opted in.About sits in the Help menu so it is reachable with the sidebar collapsed too. "Version" is a label beside the number rather than
Version {{version}}, which would have counted as untranslated in German and French.
Verified
npm run typecheck, ESLint over every changed file, npm run i18n:check (6,066 keys, no drift), and Vitest over 94 files touching the changed components plus all src/i18n/__tests__ (plural categories, translation-debt baseline, interpolation integrity), the new guard, brand.test.ts and branding.test.tsx (14 branded-mode tests: sidebar logo, monogram and icon, a brand applied after render, Workforce sidebar, landing page, version label, About with and without Powered-by, update UI hidden and restored, the route redirect, the document title). Mutation checks: the guard fails on an EDDI in a locale value, in a t() fallback and in an alt, and on removing a Phase-6 exclusion; the branded tests fail when the update query, useMayOpenScreen's gate, the route gate, the logo branch or the title are reverted (the AppLayout banner gate is defence in depth: the disabled query already keeps the banner away). Brand-leak smoke in MSW mode with a "Zebra Labs" brand forced into window.__EDDI_BRAND__: /welcome, /manage, agents, resources, approvals, secrets, connections, cluster, sync, privacy and /workforce show no EDDI in text, alt, aria-label or title, and every image comes from /branding/. The remaining hits are the "EDDI Cluster" Grafana name (allow-listed) and the shell <title> on /welcome and /workforce, which only the dev plugin fills with EDDI; EDDI itself renders it per brand. /manage/updates redirected to the dashboard. The full Vitest suite was not run locally.
What's next
Phase 4: the Settings → Branding page, which calls setBrand after a save. Phase 6: the Platform Operator (its prompt, activation screen and API errors still say EDDI; the guard excludes those files with a TODO) and the A2A agent-card defaults in agent-detail.tsx. Also open: src/lib/llm-parameter-catalog.data.ts carries two generated notes naming EDDI.
🎨 feat(manager): Settings → Branding page with live preview and live update — white-label phase 4 (2026-10-25)
Repo: EDDI (feat/white-label-5-branding-page)
What changed and why
Phase 4 of the white-labeling plan: an admin edits the brand in the Manager instead of with curl. docs/white-labeling.md has a new "The Branding page" section.
Backend tweak.
__brand__.jsnow carriesassets: {logo, logoDark, icon, favicon, ogImage}, booleans saying which slots have an image of their own (uploaded or fromassets-dir); the hashes stay on the admin API./branding/logoalways answers an image, the bundled EDDI one when nothing is uploaded, so without this a brand that set only a name kept the EDDI wordmark (the Phase 3 gap). Both Vite plugins'DEFAULT_BRAND_SCRIPTandbrand.ts'sDEFAULT_BRANDfollow;BrandDeliveryTestgains a test for the flags and one thatui/manager/src/lib/brand-css.tscarriesBRAND_SCALEverbatim.Logos close the Phase 3 gap.
BrandWordmarkshows the product name as a text wordmark when the brand has no logo (per mode: only a dark logo means text in light mode).BrandIcondraws the short name's initial on the primary colour when the brand has no icon. Branded image URLs carry?r=<revision>(brandAssetUrl), so a replaced logo shows at once despitemax-age=300.The page (
src/pages/branding.tsx, route/manage/branding, Admin section,nav.branding): names with character counts; five colours with a picker and a text field; the two toggles; a light and a dark preview (components/branding/brand-preview.tsx); five image drop zones (components/branding/brand-asset-slot.tsx); Save; Reset behind a confirmation; the source badge and last-saved line; a locked notice namingeddi.branding.lockedand the source.Validation mirrors
BrandValidatorinsrc/lib/brand-validation.ts(caps 40/12/120,</>, control and bidi characters, the colour grammar, WCAG contrast). Save is disabled while any field fails; serverviolationsare shown on the field they name, and serverwarningsafter an accepted save. A per-pair contrast badge updates as you type.Preview uses the brand's tokens on the preview container:
brand-css.tsbuilds the same declarationsBrandDelivery.stylesheetwrites, andindex.cssgains.brand-preview-light/.brand-preview-dark, which restate each mode's surfaces and the EDDI defaults (token-definition lines, so the no-amber guard allows them). So the light panel is light on a dark page, and a cleared colour previews as the default instead of the brand still in effect.Concurrency. The PUT carries the revision the form was based on. A 409 with
currentRevisionshows a conflict notice and disables Save until Reload latest rebases the form. An image upload or removal moves the base revision without touching the text fields, so unsaved edits survive it and the next save does not conflict with the admin's own upload.Live update (
src/lib/brand-live.ts): after every successful write, swap the shell'sbrand.cssand favicon<link>s to?r=<revision>in place, inject a fresh<script src="/branding/__brand__.js?r=…">(noeval, CSP unchanged), andsetBrand(window.__EDDI_BRAND__)on load. A failed reload leaves the brand in effect and shows a "reload the page" toast; the write itself is not failed.API and hooks.
src/lib/api/branding.ts(typedBrandingView,BrandUpdate,brandingErrorInfo),src/hooks/use-branding.ts(query plus four mutations withmeta.silent, since the page renders every refusal in place).ApiClientErrorgains an optional parsedbody, andApiClientpassesBlob/ArrayBufferbodies through unchanged, so the upload keeps the token-refresh path instead of a rawfetch.Roles.
/manage/brandingiseddi-admininlib/roles.ts, so the sidebar and command palette hide it from everyone else (the page explains a 403 too).MSW.
src/test/mocks/branding-handlers.tsis a stateful stand-in for the admin API (revision checks, validation, magic-byte type check, unsafe-SVG 400, 413, 415, locked 409) and, in the browser worker, answers__brand__.js,brand.cssand uploaded images from the mock's state so the live update can be seen without a backend. Variants:sessionStorage["eddi-mock-branding-locked"]="true", and the taglinetrigger a conflict.resetBrandingMockStateruns after every test.i18n. 88
branding.*keys plusnav.branding, translated in all 11 locales; the subtitle uses{{productName}}.Fix found on the way:
route-integrity.test.tswas red since Phase 3, because the Updates route was declared aspath={UPDATES_PATH}and the test reads the route table as text. The route is literal again;brand.test.tspinsUPDATES_PATHto it.
Design decisions
The route is
/manage/brandingin the Admin section, not a new Settings section: the Manager has no settings area, and the Admin section is where the other deployment-wide admin screens are. The page title says "Branding". The plan's "Settings → Branding" wording is for Phase 6 to align (the operator prompt names the page).Hidden, not just refused, for non-admins. The neighbouring admin entries are role-gated the same way through
SCREEN_ROLES; this page has nothing to show a non-admin.Images apply on upload, text on Save. An image is one atomic request with its own errors; holding it until Save would mean staging binary data in the form. The page says so.
Mock delivery, not a second dev plugin. The dev plugin keeps answering the defaults on load (as Phase 1 decided); the mock answers only what it owns. Its
/branding/*handler had to be anchored at the origin: the leading-wildcard mask*/branding/*also matched/administration/branding/assets/…and sent uploads past MSW to the absent backend.browser-handlers.test.tspins it.
Verified
npm run typecheck, npm run lint (full), npm run i18n:check (6,155 keys), and Vitest over src/__tests__ (both guards, route integrity), src/i18n/__tests__, src/test/mocks/__tests__ (OpenAPI contract, unhandled recorder, browser handlers), the layout, roles and route-registry tests, and the new pages/__tests__/branding.test.tsx (15 tests: load, client validation, contrast, preview tokens, save + live update through a real applyBrandRevision run, server violations, server warnings, the 409 → Reload latest flow, reset confirmation, locked mode, upload/remove, 400/415/413/409 image errors), lib/__tests__/brand-{css,validation,live}.test.ts and lib/api/__tests__/branding.test.ts. Mutation checks: dropping the live-update call, the base-revision rebase after an upload, the text-wordmark branch, and the origin anchor of the mock's /branding/* handler each fail a test. Backend: formatter:format, then Brand*Test,Branding*Test,BrandedShell*Test,ImportStyleTest,BuildQualityGatesTest,ChangelogFragmentTest,Documentation*Test — 225 tests, green. The full Vitest suite: 8,955 of 8,957 passed; the two failures were badges.test.tsx still expecting warn for the rules/behavior badge after the ochre split, fixed in a separate commit. In MSW mock mode in Chrome: name, colours and an SVG logo saved and uploaded; the sidebar logo, the title, the mock banner and every brand colour changed live in light and dark; the conflict notice and the locked view shown. Against a real backend (full ./mvnw package, the jar on MongoDB 7): save, logo upload, the unsafe-SVG refusal and a 409 after a concurrent curl PUT all behaved as in mock mode, and __brand__.js carried the new assets flags. Locked mode was not run against a real backend.
What's next
Phase 5 (Chat UI) can read the new assets flags the same way (chat.logo when a logo is uploaded). Phase 6: tell the Platform Operator where the page is (the screen-context table in use-current-screen-context.ts has no branding entry yet, on purpose), and offer the Keycloak theme download on this page. Phase 7's brand-leak E2E can drive this page, or the REST API, to set its test brand.
🎨 feat(chat): deployment brand for title, logo, accent and head — white-label phase 5 (2026-10-25)
Repo: EDDI (feat/white-label-6-chat-operator-surfaces)
What changed and why
Phase 5 of the white-labeling plan: the Chat UI widget follows the deployment brand. docs/white-labeling.md has a new "The Chat UI" section, and the Chat UI README and embedding guide say what overrides what.
ui/chat/src/api/brand.tsreadswindow.__EDDI_BRAND__field by field, withDEFAULT_BRANDequal to the Vite plugin'sDEFAULT_BRAND_SCRIPT(brand.test.tspins it;BrandDeliveryTestalready pins the plugin against the backend). It derives the header title (brandTitle), the logo (brandLogoUrl:/branding/logo?r=<revision>when a logo is uploaded,nullmeaning "show the name as text" when branded without one, EDDI's logo otherwise), the tab title (brandDocumentTitle) and the brand's config layer.Precedence, highest first: URL parameters, the embedder's
<ChatProvider config>, the agent's own appearance (agentAppearanceLayer(), a named seam that answers nothing yet), the brand, the built-in defaults.ChatProviderbuilds its initial config from those layers once, at mount;ChatWidgetdispatches the URL's config over it as before.Header. The title nobody overrode is the product name; an explicit
?title=still replaces the agent name. A brand without a logo shows its name as a text wordmark (chat-header__title--wordmark). Alt text is the title. The tab title is<agent> — <product>when branded and exactly<agent> — EDDI Chat/EDDI Chatwhen not.Accent, and the old gap.
ChatConfig.accentColorwas stored but never applied. It now goes throughapplyAccentColor, the same function?accentColor=uses (accent, user bubble, focus ring, thecolor-mixtints). One effect appliesconfig.accentColorand then the URL's colour parameters, so?accentColor=beats the embedder and the brand, and?userBg=still beats the bubble colour an accent derives.defaultConfigno longer carriesaccentColor: "#113B92"or the logo URL: unset means "the stylesheet's tokens" and "the brand's logo", so setting either is always an override and an unbranded widget paints exactly as before.Demo route.
ChatRoutewraps the/chat/:environment/:agentId[/:userId]routes; under a brand/chat/demo/showcaseshows a neutral "The demo is not available on this site." (demo.unavailable, all four locales) instead of EDDI's showcase script, and makes no request.Head.
chat.htmlalready had the placeholders,/branding/favicon.icoand/branding/og-imagefrom Phase 1. The dev entryindex.htmlnow has the same brand wiring (placeholders,brand.css,__brand__.js), the plugin knows its defaults, andvite-plugin-brand.test.tsgrades both shells.vite-proxy.test.tsexempts/branding, which the dev plugin serves itself.Guard.
src/no-eddi-brand-literal.test.tsfails on\bEDDI\bin a locale value, a string literal or JSX text outside an exact allow-list (the unbranded defaults and one integrator console warning) anddemo-api.ts. It caught the old tab-title template when mutated back in.
Design decisions
The accent is applied in JS, not only by
brand.css.brand.csssets--chat-accentalone, so the user bubbles, focus ring and quick replies stayed EDDI blue. The JS path sets the full set the URL parameter sets, as inline styles that beat both stylesheets. Both read the same resolved value (chat accent, else primary), so they never disagree;brand.cssstays for the first paint.The demo route is refused in the client, not with a backend 404. The Chat shell is one SPA page; a 404 would need a route-aware resource for one path. The neutral state shows nothing of EDDI either way.
The "Chat" suffix was not made translatable. Branded titles no longer carry it, and the unbranded title stays byte-identical.
Verified
In ui/chat on Node 24: npm run typecheck, npm run lint and the full npm test — 32 files, 531 tests, green. New: brand.test.ts (defaults = plugin script, normalisation, title/logo/tab-title/config layer), ChatWidget.brand.test.tsx (12 tests: unbranded unchanged, branded logo and alt, text wordmark, tab title, ?title= and logoUrl still override, brand accent, ?accentColor= beats the brand, config.accentColor beats the brand and an unsafe one is ignored, ?userBg= beats the derived bubble colour, demo route branded and unbranded) and the guard. Mutation checks: the old ChatHeader fails the guard and two header tests; dropping applyAccentColor(config.accentColor) fails three accent tests; disabling the demo guard fails the demo test. Backend: BrandDeliveryTest,BrandedShellRendererTest,RestHtmlChatResourceTest,ChangelogFragmentTest,Documentation*Test,BuildQualityGatesTest,ImportStyleTest — 93 tests, green. Against a real backend (full ./mvnw package, the jar on MongoDB 7, an agent with no workflows deployed): unbranded, the demo and a chat look as before (EDDI logo, EDDI Chat, no inline accent); with a name and teal colours, the header shows "Zebra Labs" as text, the user bubble and focus ring are teal, the tab title is the product name and the demo shows the notice; after an SVG logo upload the header shows /branding/logo?r=2 with alt "Zebra Labs", and the head carries the brand's description, theme-color, favicon and og:image; ?accentColor=%23cc3366&title=Support%20Desk turns the bubble pink and titles the tab "Support Desk" under the brand; after a reset everything is EDDI again.
What's next
Phase 6 (Platform Operator, Keycloak theme download) and Phase 7 (brand-leak E2E). The per-agent appearance seam (agentAppearanceLayer) needs its own design pass (§4.6). Noticed, not changed: chat.html lacks the viewport-fit=cover, interactive-widget=resizes-content viewport the dev index.html got in #1075, so production phones do not get that fix.
🎨 feat(branding): operator persona, API surfaces, Keycloak theme download and Helm values — white-label phase 6 (2026-10-25)
Repo: EDDI (feat/white-label-6-chat-operator-surfaces)
What changed and why
Phase 6 of the white-labeling plan (§4.7–4.9, R6, R7, R9). docs/white-labeling.md gains "The Platform Operator", "API surfaces", "The Keycloak login page" and "Helm"; docs/kubernetes.md and the configuration reference point at them.
Platform Operator (
ui/manager/src/lib/operator/system-prompt.ts, revision 38). The preamble now opens "You are the Platform Operator" and carries the one sentence that still names the engine ("built on the EDDI engine; its documentation andeddi.*configuration properties use that name"); every other mention says "this deployment", "the platform" or "the engine". The default body is brand-independent, so a rebrand never flips an untouched body to "customized", and the revision fingerprint hashes the preamble with the EDDI default name. The body tells the operator that Admin → Branding exists, what it controls, that it has no tool for it and that its own name changes on Upgrade; the docs map gains "white-labeling". Braces are dropped from the name in the prompt (it is a Qute template server-side and the validator allows{}). New operators are namedoperatorAgentName()=<product> Platform Operator. The branding endpoints stay off the allow-list;tool-scopes.tsdocuments the exclusion and a test keeps any/brandingpath out of both scopes.use-current-screen-context.tsgains/manage/branding→branding. The operator's user-facing errors say "this deployment" / "the server" instead of EDDI.Identification audit. Activation, supersede, upgrade, trust (
useOperatorTrust) and discovery read the[eddi-platform-operator]descriptor marker or the configured agent id; the only name read is discovery's fallback for pre-marker operators (/operator/i), which every built name satisfies. A new test proves a marked operator named "Acme Assist Helper" is still recognised; requiring a name match fails it.Guard.
no-eddi-brand-literal.test.tsloses its Phase-6 exclusions and now also gradesnew Error("…")messages.Manager, other. The A2A card preview on the agent page uses the product name. The two generated LLM-parameter notes say "the server" (
model-parameters.json, regenerated intollm-parameter-catalog.data.tsanddocs/llm-parameters.md). On the Branding page an empty colour's swatch shows what it falls back to — dark → light, chat accent → primary, otherwise the unbranded default (UNBRANDED_COLORS, pinned toindex.cssand the chat'svariables.css) — instead of black.A2A (
AgentCardService): provider, fallback name and description, default skill and token description use the product name, read per card; an unreadable brand serves the card under EDDI.OpenAPI (
BrandedOpenApiRoute): under a brandinfo.titleis<product> APIand the LABS.AI contact is dropped; unbranded the request falls through to SmallRye's cached document untouched. A first attempt as aRUNTIME_PER_REQUESTOASFilterpassed its unit tests and did nothing at runtime: SmallRye'sOpenApiDocument.initializerunsfilterModeland thenConfigUtil.applyConfig, so theinfo-*properties overwrite whatever a filter set. Found only against the real jar.Swagger UI (
BrandedSwaggerUiRoute+SwaggerUiBranding, R6 spike → implemented). Swagger UI requestsindex.html,logo.png,favicon.icoandstyle.cssrelative to/q/swagger-ui/; Quarkus serves them from generated web-jar resources (META-INF/io.smallrye_smallrye-open-api-ui__jar/META-INF/resources/openapi-ui/). A Vert.x route at the shell route's order answers those four while a brand is set: title and alt from the product, no footer, the brand's logo (or its name as text), its favicon/icon, and the stylesheet with amber accents swapped per mode (the PUT method colour stays). Unbranded, and underquarkus:devwhere the files are not on the classpath, it falls through.MCP (
BrandedMcpServerInfo implements InitialResponseInfo):serverInfo.name/titleare the product name under a brand, asked perinitialize; an explicitquarkus.mcp.server.server-info.namewins.Keycloak theme ZIP (
KeycloakThemeExport,GET /administration/branding/keycloak-theme.zip,eddi-admin).pom.xmlcopieskeycloak/themes/edditokeycloak-theme/eddion the classpath (outsideMETA-INF/resources). The ZIP is the theme renamedbrand: the shipped files byte for byte,theme.propertiesloadingcss/brand-overrides.csslast, the generated overrides (the--eddi-*palette per mode plus both PF5 tiers, F18; warnings stay amber; text heading when there is no logo), the brand's logo / dark logo / ICO-or-PNG favicon, and a README withloginTheme,displayNameand HTML-escapeddisplayNameHtmlas JSON. Fixed file list (a test pins it to the directory), fixed entry times, colours re-validated on output, the name only in the README. Branding page: "Download login theme" (all 11 locales), MSW handler,openapi-operations.json.Helm (chart 2.13.0,
EXPECTED_CHART_VERSION):eddi.branding.*values (names, colours,poweredBy/showUpdateCheck,locked,assets.configMap+mountPath) renderEDDI_BRANDING_*only when set and mount the ConfigMap read-only asassets-dir. Off by default.HelmBrandingValuesTestpins the mapping.
Design decisions
Neutral wording over i18n for the operator's errors. They are thrown
Errormessages shown verbatim; "this deployment" / "the server" removes the leak without a second translation path for one screen.The operator's persona lives in the non-editable preamble. The body stays brand-free, so "is the body the default?" keeps working across a rebrand, and the persona is rebuilt on every Upgrade/Reconfigure.
OpenAPI as a response rewrite, not a filter or a property change. Moving the title and contact from properties to
@OpenAPIDefinitionwas tried so a filter would win; Quarkus then defaults the title toquarkus.application.name+ " API" ("eddi API") and dropped the annotation contact, changing the unbranded document. The route keeps the unbranded document byte-identical and cached, and costs one parse and serialisation per/openapifetch only while branded.Swagger's page is derived from the generated file rather than re-implemented, so a Quarkus upgrade that changes the page keeps working (the rewrites are regex replacements that leave a non-matching page as it was).
The Keycloak favicon is replaced only by an ICO or PNG, because Keycloak links
favicon.icoby name; an SVG icon keeps the shipped one and the README says so.No Keycloak theme mount in the Helm chart. Its in-cluster Keycloak mounts no themes today; documented instead of adding a second ConfigMap layout.
install.sh/docker-compose.auth.ymlare documented, not changed.Outbound
User-Agentand logs keep EDDI, as decided.
Verified
Manager (Node 24):
npm run typecheck,npm run lint,npm run i18n:checkgreen; the full Vitest suite 624 files / 8973 tests green. Mutation checks: requiring a name match next to the marker inoperator-discovery.tsfails the new discovery test; putting "EDDI" back into an operator error fails the brand guard.Backend: the full
./mvnw testran 29,948 tests with 42 failures and 134 errors, all of themUnable to establish loopback connection/failed to create a child event loopin the HTTP-client, LLM-builder, A2A-client and MCP-client tests (the known long-session environment fault), none in a branding, A2A-card, Swagger, Helm or guard class. The repo-wide guards (ImportStyleTest,BuildQualityGatesTest,Documentation*Test,ChangelogFragmentTest,DocumentedRestPathsTest,HttpMetricsUriTagsConfigTest,SkillToolReferencesTest) and the new and changed classes pass on their own. Mutation checks: writing an unvalidated colour failsKeycloakThemeExportTest; dropping the comment strip failsSwaggerUiBrandingTest.Helm:
helm lintandhelm template(alpine/helm 3.16.3) render the default with noEDDI_BRANDING_*and no branding volume, and a branded values set with the env vars and the read-only mount.Real jar (full
./mvnw package, MongoDB 7). Unbranded:/openapiequals the Phase-5 jar's document except the new path, and/q/swagger-ui/,style.cssandlogo.pngare byte-identical. With "Zebra Labs", teal colours, an SVG logo and a PNG favicon:/openapi,/openapi.json,?format=JSONand/openapi.yamlsay "Zebra Labs API" with no contact; Swagger UI shows the title, the logo, no footer, the favicon and teal accents (PUT stays amber); MCPinitializeanswersserverInfo"Zebra Labs"; an A2A-enabled agent's card names Zebra Labs as provider, name, description and skill; the theme ZIP holds the 10 shipped files, the overrides, the logo, the PNG favicon and the README. Keycloak 26.8.0 with the ZIP mounted and a realm usingloginTheme: brandshows the Zebra logo, teal button, focus ring and bloom, in dark and light.Found, not changed: on Keycloak 26.8 the card header gets a 4 px blue top border from keycloak.v2's new
--keycloak-card-top-color, whicheddi-login.css(written against 26.0) does not set. Nothing in the shipped theme sets it either, so the unbranded theme is affected the same way (read from the stylesheets, not screenshotted); it belongs to a theme fix, not the brand.
What's next
Phase 7: the brand-leak E2E. Notes for it: Swagger UI is branded only in a packaged build; the operator's name changes only after Upgrade, so an E2E that rebrands an existing operator should expect the old name until then; A2A discovery lags a rebrand by up to ~60 s (brand + roster caches); the Keycloak login page is branded only once the downloaded theme is installed.
feat(alerts): masked webhook URLs, protected system schedule, OUTPUT_MATCH rules and e2e specs (2026-10-25)
Repo: EDDI (feat/conversation-ratings) — review fixes to PR 5a and PR 5b of planning/conversation-rating-plan.md (§0.2)
What changed and why
Webhook URLs are treated as secrets. A webhook URL often carries its own token, so no read returns it any more, for administrators either: REST (list, single read, create/update responses), MCP and the operator see https://host/*** plus urlConfigured: true (DeliveryTarget.masked(), applied in AlertAccess.redact). On update an omitted or masked URL keeps the stored one (RestAlertRules.restoreUrls, matched by position and host, else the only stored webhook on that host); a new value replaces it; a masked URL in a create is refused. A ${vault:…} reference is accepted as the URL itself and resolved only at send time (AlertSenders); unresolvable, or not http(s), means no delivery — the rule the signing secret already followed. "Send test alert" for a saved rule restores the stored URL server-side and requires write access to that rule. The Manager editor shows the masked URL with a "kept unless you replace it" hint.
The alerts-maintenance schedule cannot be changed through the schedule surfaces. RestScheduleStore answers 409 {"error":"SYSTEM_SCHEDULE"} to update, delete, enable, disable, retry and dismiss of a schedule carrying the system alertType; MCP delete_schedule refuses with errorCode: SYSTEM_SCHEDULE. Self-healing on startup and rule save stays as the backstop. The Manager's schedule list marks it system-managed with no edit, toggle or delete.
OUTPUT_MATCH (§0.2). A rule can now fire on what a clean turn produced:
OutputMatcher— pathsproperties.<a.b>,output.json.<a.b.c>(the agent's output parsed only when it starts with{/[, at most 64 KB, Jackson nesting capped) andactions; depth ≤ 8, segments[A-Za-z0-9_-], no wildcards or indexes; opsexists|eq|neq|in|gt|gte|lt|lte|contains, comparisons type-strict (numbers by value, a string never equals a number). The value is the author's constant: no expression engine, no template evaluation of runtime data.Save-time validation (
AlertRuleValidator→OutputMatcher.problems): path grammar, op/value fit,inlist 1–50 scalars, constants ≤ 1000 characters,actionsonly withcontains/exists, and no field of another source.OutputMatchHookruns fromConversationStepRunnerfor a turn that completed cleanly (not failed, not timed out, not paused for a human). On the turn thread it does onegetIfPresentonAlertRuleCache.cachedOutputNeeds; an agent without enabledOUTPUT_MATCHrules stops there. Otherwise it copies only what the rules read — the named top-level properties (detached copies), the output text, the action list — into aTurnSnapshotand hands it to the alert worker; the live memory never leaves the turn. A cache miss loads the needs on the worker and that one turn copies all three.includeValueis honoured only when the agent version has conversation review enabled (ConversationReviewPolicy); the value goes tomatch.value, cut to 280 characters. Otherwise the alert names path, operator and constant only.Manager: condition builder (
output-match-builder.tsx) — path source dropdown, path input with inline validation, value type, operator filtered by type, value, and an includeValue toggle explaining the review requirement;pathProblem/outputMatchProblemsinalert-rules.tsmirror the server. 30 keys in all 11 locales; MSW fixture masks its webhook.Operator prompt: masked URLs, the system schedule and
OUTPUT_MATCH; revision 38 → 40.Docs: Alerts with the three §0.2 examples, masking, the system schedule.
E2E specs. ui/manager/e2e/alerts.spec.ts (MSW tier: inbox acknowledge, create rule, output-match builder, badge) and e2e/fullstack/ratings-feedback.fullstack.spec.ts (Chat UI rating → Feedback "Needs attention" + badge → mark reviewed → count back). Not run locally — Playwright browsers were not downloaded on purpose; CI runs them.
Design decisions
A masked URL is restored by position and host, never by position alone. A reordered target list still gets the right URL back when its host is unique among the stored webhooks; when it is not and the position does not match, nothing is restored and the masked URL is refused at validation rather than guessed.
Only top-level property names are copied, even for a nested path: the snapshot copies the property's value detached (
AlertJson), so a later change to live memory cannot reach the worker.A cache miss copies everything once instead of loading rules on the turn thread: the turn never waits on the store, and the first turn after a restart is not lost.
Tests
Review fixes:
RestAlertRulesTest.WebhookUrls(list, single read, create/update response, restore by position and host, masked create refused, test send restores and needs write access),AlertSendersTest(vault URL resolved at send, unresolved → no delivery, labels),RestScheduleStoreExpandedTestandMcpAdminToolsBranchCoverageTest(system schedule refused). Mutation check: 9 of 9 mutants killed (redaction, create and update responses,masked(), the label,restoreUrls, unresolved vault URL, the REST and the MCP system-schedule guards).OUTPUT_MATCH:
OutputMatcherTest(paths, JSON-only parsing, size and nesting caps, type-strict operators, grammar and op/value validation),OutputMatchHookTest(an agent without rules costs one cache lookup and touches nothing else —verifyNoMoreInteractionson memory and cache, nothing queued; only needed values copied, detached; cache miss copies everything;includeValueneeds review; 280-character cut),AlertRuleValidatorTest,ConversationStepRunnerTurnOutcomeTest(only clean turns reach the hook),AlertStoreContract.outputMatchRuleRoundTrips(ITs 28/28, 14 MongoDB + 14 PostgreSQL). Mutation check: 6 of 6 killed — value without review, hook working for agents without rules, wildcard grammar, no truncation, type-mismatched equality, whole property map copied.Manager:
alert-rules.test.ts(path grammar, ops per type, problems),alerts.test.tsx(builder, inline path error, actions ops, masked URL hint),schedules-regressions.test.tsx(alerts-maintenance has no edit, toggle or delete); operator tests for revision 40.Live check (dev mode on MongoDB 7 in Docker): an agent with
ratingConfigand conversation review rated over REST (conversation + reply),/ratings,/ratings/summary,/ratings/attention-count,PATCH /ratings/{id}(count 2 → 1); a RATING rule with inbox-only delivery produced exactly one event when a 5-star rating was re-rated to 1, and a second low re-rating in the same window counted asduplicates: 1; acknowledged. An OUTPUT_MATCH rule onactions contains handoff_requestedfired once over two turns withmatch.valuepresent (review on). An agent whose LLM points at127.0.0.1:9produced one CONVERSATION_ERROR event (TURN_ERROR). A webhook rule read back ashttps://hooks.example.com/***everywhere while MongoDB kept the full URL across a PUT that sent the masked value; its delivery stayed PENDING with "signing secret could not be resolved";DELETEanddisableonalerts-maintenancereturned 409SYSTEM_SCHEDULE.Full runs: backend
./mvnw test29,924 run, 3 failures, 8 skipped. Two failures (PostgresIngestionStateStoreTest.recordedDeadlineGoverns,PostgresSecretPersistenceTest.timestampsRoundTrip) are off by exactly one hour because the run fell in the night the clocks went back (Europe, 2026-10-25); both pass with the JVM in UTC (77/77) and neither class is touched here. The third is the known-flakyDocumentExtractorsTest.honoursItsTimeBudget. Manager vitest: 622 files, 8,961 tests passed;npm run lint,npm run typecheckandnpm run i18n:check(6,333 keys) clean.
✨ feat(mail): EDDI verifies DKIM and DMARC alignment itself — email sender authentication (2026-10-25)
Repo: EDDI (feat/email-dkim, on top of feat/email-hitl-notifications and feat/email-mail-core)
The sender-authentication slice of the email plan (§8, the DKIM/DMARC part of §21), built ahead of Phase 2 so the IMAP poller can call it. No channel, transport or poller is part of this change.
The facade Phase 2 calls
SenderAuthenticator.authenticate(byte[] raw, InboundMail parsed)(engine/mail,@ApplicationScoped) →MailAuthentication: verdictALIGNED_PASS·PASS_UNALIGNED·FAIL·NONE, the signing domain, a fixed-text reason (safe to log), atemporaryflag (a DNS failure or the lookup budget kept a check from running — retrying later may authenticate), and oneDkimResultper evaluated signature (domain, selector, algorithm,PASS·FAIL·TEMPERROR·TESTING, reason). The caller passes the bytes it received and the parser'sInboundMailof those bytes (a size mismatch is refused), then attaches the verdict withInboundMail.withAuthentication. Never throws.Only an aligned pass authenticates, and never when the message has anything but exactly one
Fromfield with one mailbox (counted on the raw bytes and from the parser'sMULTIPLE_FROM/MISSING_FROM) or a duplicated singleton header (DUPLICATE_SINGLETON_HEADER): an unsigned secondFromorSubjectadded above a validly signed one is not hashed, so the signature still verifies, while clients show the forged one.MailAuthenticationgainsreason,temporaryandsignatures(the two-argument constructor stays).Judged as of delivery:
authenticate(raw, parsed, Instant deliveredAt, fallback)evaluatesx=and the future-t=check at the delivery instant — the transport passes the mailbox server'sINTERNALDATE, the receiving server's own clock, never a sender header — so a shortx=does not expire while the mail waits for the poller or the cost budget. The instant is clamped to[now − eddi.email.dkim.max-delivery-age, now](new property, default7d): a later value is now, an older one is the cap boundary, so a broken or forged value can neither revive an ancient signature nor postdate one. Without it, signatures are judged at the current time, as before.DkimVerifier.verify(raw, budget, evaluatedAt)takes the instant unclamped.Provider fallback:
authenticate(raw, parsed, SignedProviderVerdict), an interface for a verdict delivered under a signature the transport checked (SES over SNS). Consulted only when the local check could not run (no raw bytes, or every key lookup failed temporarily); never over a local fail, none or pass; alignment is still EDDI's. No provider is implemented.
DKIM (DkimVerifier)
RFC 6376 on the raw bytes:
simple/relaxedheader and body canonicalisation in all four combinations,rsa-sha256(1024–8192-bit keys, exponent ≤ 64 bits; SPKI or bare PKCS#1p=) anded25519-sha256(RFC 8463, the JDK's EdDSA). Refused asFAIL:rsa-sha1(RFC 8301) and other algorithms,l=(body-extension attack), a signature not coveringFrom,i=outsided=, expiredx=,x=beforet=,t=in the future (5 min skew), revoked (p=empty) or missing keys, more than one key record,k=/h=/s=that do not admit the signature,t=swithi=≠d=, malformed or duplicated tags. At=ykey givesTESTING, not a pass.Bottom-up header-instance selection with over-signing semantics (a name in
h=more often than present binds the absence); the signature being verified is never one of its ownh=instances. Bare-LF input is converted to CRLF.Bounds: 5 signatures evaluated (rest counted), 256 KB header block, 100
h=names, 8 KB signature field, one body hash per canonicalisation, the body checked before the key is fetched (a tampered mail spends no lookup).
DMARC alignment (DmarcAlignment) and the Public Suffix List
RFC 7489 §3.1.1: relaxed (same organisational domain) or strict (equal) per the
Fromdomain's_dmarcadkim=, falling back to the organisational domain's record (§6.6.3); no record = relaxed; severalv=DMARC1records = no DMARC; a temporary lookup failure assumes strict and is flagged.p=is not applied. SPF is not evaluated (EDDI never sees the connecting IP).PublicSuffixList: the upstream file bundled unmodified assrc/main/resources/mail/public_suffix_list.dat(MPL-2.0, newlicenses/MPL-2.0.txt; commit8437e5262f13, 2026-10-22), ICANN and private sections, wildcard and exception rules, IDN rules in ASCII.public_suffix_list.propertiesrecords commit and SHA-256;PublicSuffixListTestfails when the file is missing, small, or differs from that hash. Refresh with the newscripts/update-public-suffix-list.py. The.datis-textin.gitattributesso its hash is stable.
DNS (MailDnsResolver, DnsjavaTxtSource)
dnsjava 3.6.5 (BSD-3-Clause; runtime dependency slf4j-api only, BOM-managed; CVE-2024-25638 and the KeyTrap advisories fixed in 3.6.0 and confined to the DNSSEC validator, which is not used). Its jar registers a
java.net.spi.InetAddressResolverProviderthat stays inert unlessorg.dnsjava.spi.enable=true— documented inpom.xmlandsecurity.md, with a test that fails if the switch's constant disappears.New properties
eddi.email.dns.servers(empty = system resolvers),.timeout(5 s, one retry),.cache-max-entries(10000),.cache-max-ttl(1 h; record TTLs and the SOA minimum for negative answers honoured, temporary failures not cached),.max-lookups-per-message(10; cache hits free). Records over 4096 characters or answers over 10 records are refused; multi-string TXT records are joined. No DNSSEC requirement. TheTxtSourceseam keeps every test offline.
Metrics, docs
eddi.email.auth{result}andeddi.email.dns.lookups{result,cached}: two panels in the Full Metrics dashboard's Integrations row (k8s copy re-synced), described inmetrics.md.security.md→ Mail Sender Authentication: the rules, what an aligned pass proves and does not (the domain, not the person; forwarded and list mail; no ARC; no SPF), the PSL refresh and the dnsjava resolver switch.configuration-reference.md→ Email lists the six properties.compliance-data-flow.md→ Other outbound recipients: the DNS resolver learns the signing domains, selectors andFromdomains of received mail.
Tests
DkimVerifierTest(60): the RFC 8463 Appendix A message and key records stored as fixtures (src/test/resources/mail/dkim/, byte exact) — both signatures pass, also with LF endings; body, header, second-Fromtampering and re-folding. The RFC 6376 §3.4.6 canonicalisation example, signed over the canonical text the RFC prints. Self-signed RSA-2048 and Ed25519 messages (DkimTestSigner, a regex-based signer written independently of the verifier) in all canonicalisations, with folded headers, trailing whitespace, 8-bit text, empty and header-only bodies; every refusal above; DNS outcomes; bounds.SenderAuthenticatorTest(31): verdicts, DMARC through the facade (subdomain relaxed/strict, org-domain fallback,d=co.uk, DMARC tempfail), header injection (secondFrom, two mailboxes, noFrom, secondSubject, mismatched bytes, and each of the two From guards on its own against a parser that disagrees), judging as of delivery (expired since delivery passes; a delivery instant older than the cap or in the future is clamped), provider fallback, 300 random inputs, and a hostile message (5000 header lines, 50 signatures × 100h=names, 10 MB body) within a 5 s budget.DmarcAlignmentTest(9),PublicSuffixListTest(24),MailDnsResolverTest(13; three run dnsjava against a loopback UDP server built in the test).Every verdict path was mutation-checked: the check reverted, a test failed, the check restored.
For Phase 2
Call
authenticatewith the transport's bytes right after parsing; keeptemporaryin mind (leave the message for the next poll rather than treating a DNS outage as an unauthenticated sender).Pass the mailbox server's
INTERNALDATEasdeliveredAt; without it,x=is judged at processing time.eddi.email.authcarries onlyresult. Prometheus requires one tag set per meter name, so per-integration tags mean moving the counter to the channel layer rather than adding tags here.No real-world signed mail (Gmail, Outlook.com, Exchange Online, a list) is in the corpus yet (§21); add it with its DNS records when a test mailbox is available.
fix(manager): https-only webhook check, bulk-acknowledge mock, operator revision 41 (2026-10-25)
Repo: EDDI (feat/alerts-manager, PR #1139) — the Manager side of the alerts backend review fixes (PR #1138)
What changed and why
Rule editor:
ruleProblems(alert-rules.ts) accepts only anhttps://webhook URL or a${vault:…}reference, as the server now requires; the maskedhttps://host/***of a stored URL still passes.MSW: the bulk-acknowledge handler answers 400
INVALID_PARAMETERto an emptyidslist or an empty entry, as the server does; the Manager sends{}when it acknowledges by filter and a non-empty list otherwise, so its calls are unchanged.Platform Operator: the prompt says webhooks must be https and corrects "no conversation text" — a rating comment, or an
OUTPUT_MATCHvalue withincludeValueand conversation review on, can appear, each at most 280 characters. Revision 40 → 41.
Review follow-ups
AlertDeliveryServicederives the send claim lease as the longer of 30 s and three timeseddi.alerts.webhook-timeout, andAlertSettingskeeps that timeout between 1 s and 60 s, so a long timeout can no longer make every send skip.Manager: test-result rows in the rule editor have unique keys; removing a chat rating clears its reasons and comment; the chat hook reads a conversation's own rating controls even when the current profile is null; the feedback list steps back to the last existing page when triage empties the current one.
Tests
npm run typecheck, eslint on the changed files and npm run i18n:check pass; the alert and operator suites (19 files, 530 tests) pass.
fix(manager): second round of alerts review findings — throttle bounds, bulk-acknowledge body, inbox paging (2026-10-25)
Repo: EDDI (feat/alerts-manager, PR #1139)
What changed and why
Throttle checked before saving:
throttleProblemsinalert-rules.tsusesAlertRuleValidator's bounds exactly (whole numbers, 1–1440 minutes, 1–1000 per window);ruleProblemsreportsthrottle, which disables Save and Send test, and the editor marks the field with an inline error (alerts.throttleRange, all 11 locales).Bulk acknowledge body:
acknowledgeAlertEventssends{}only fornull/undefinedand{ ids }otherwise, so an empty list reaches the server, which refuses it, instead of being widened to everything matching. The page's only "all matching" caller passesnull.Inbox: keyed on the agent, so changing it starts from page 1 with nothing selected; the page moves back to the last one that exists when acknowledging empties the one it is on (instead of "No open alerts"); the selection clears when the source or the acknowledged filter changes.
Schedules: a dead-lettered server-owned schedule (
alerts-maintenance) gets no Retry on its row and no Retry/Dismiss in Failed fires — the server answers 409SYSTEM_SCHEDULEto both.Output-match builder: switching the path source to
actionsturns the value into text (contains compares strings) and keepsexistswithout one.Full-stack e2e spec: each resource is recorded as soon as it exists, and cleanup removes every recorded one even when setup failed midway.
Tests
New: output-match-builder.test.tsx (5), lib/api/__tests__/alerts.test.ts (3), throttle cases in alert-rules.test.ts, four page tests in alerts.test.tsx (throttle error, page clamp, selection reset on filters, fresh inbox on agent change) and the server-owned case in schedules-regressions.test.tsx. The alerts, schedules, operator, mocks and i18n suites: 34 files, 770 tests. Mutation check: 10 of 10 mutants killed (throttle not reported, window bound off by one, fractions accepted, empty ids widened, no page clamp, selection kept on either filter, Inbox not keyed on the agent, row Retry and Failed-fires actions for a server-owned schedule). The Playwright spec is typechecked and linted, not run.
fix(manager): carry each webhook target's targetId through the rule editor (2026-10-25)
Repo: EDDI (feat/alerts-manager, PR #1139) — the Manager side of the backend's targetId restore (PR #1138)
What changed and why
Types:
DeliveryTarget.targetIdinlib/api/alerts.ts, documented as the server's id to send back unchanged.Editor (
alert-rule-editor.tsx): targets are edited, removed and — new — moved up or down as whole objects, so each keeps its owntargetId; rows are keyed by it. A new target has none. Save and Send test send the ids as loaded. Two new strings (alerts.moveTargetUp,alerts.moveTargetDown) in all 11 locales.Validation:
ruleProblemsaccepts a masked URL only together with atargetId, so a masked URL is never sent without one.MSW (
alert-handlers.ts) now mirrors the server: it stores full URLs and answers reads masked, assigns ids on create (replacing client ones), restores a masked or empty URL on update and test send only from the stored target with the sametargetId, and refuses one without a known id with 400INVALID_RULE.Platform Operator: the masked-URL paragraph explains
targetIdand theINVALID_RULErefusal. Revision 41 → 42; it ships as 43, because merging main (where the ratings work had moved the operator to 39) needed a revision above both.
Tests
New page tests (alerts.test.tsx): removing one of two masked same-host webhooks sends the other with its own id, reordering moves ids with their targets, editing a masked target's secret keeps its id, a new target goes without one, a test send of a saved rule sends the ids, and saving the stored webhook rule round-trips through the mock. alert-handlers.test.ts (4) pins the mock's contract; alert-rules.test.ts covers the masked-URL check. npm run typecheck, the full npm run lint and npm run i18n:check (6,336 keys) pass; the alerts page, alert components, src/lib (operator included), src/test/mocks (OpenAPI contract included), schedules and i18n suites: 143 files, 2,518 tests. Mutation check: 5 of 5 killed (edit drops the id, removal re-pairs ids by position, reorder leaves ids behind, masked URL accepted without an id, mock restoring without matching the id).
fix(alerts): review findings on the alerts backend — https-only webhooks, GDPR export, digest healing, bulk acknowledge (2026-10-25)
Repo: EDDI (feat/alerts-backend, PR #1138; Manager follow-ups on feat/alerts-manager, PR #1139)
What changed and why
Webhook URLs must be https.
AlertRuleValidatorrefuses a plainhttpURL at save time;AlertSenderschecks again at delivery, which is the only place a${vault:…}URL is known — one that resolves tohttp(or to no host) is not delivered to. STRICT SSRF and no redirects are unchanged. Docs: Alerts → Delivery.GDPR export (
AlertGdprParticipant.exportreturnednull): it now lists the rules the person created or last edited (id, name, created/updated time,authorand/orlastEditor) and the events they acknowledged (id, rule name, source, agent, fired and acknowledged time), at most 10,000 of each, and no other person's identity or event content. New store readsIAlertRuleStore.findByAuthorandIAlertEventStore.findAcknowledgedBy, implemented for MongoDB and PostgreSQL and covered byAlertStoreContract. Docs: Alerts → Privacy, GDPR Compliance.A digest could stay stuck. When the digest's insert hit its dedupe key — another runner sent it, or this one crashed between the insert and marking the held events — the held events stayed
DIGEST_PENDINGand every pass retried a digest that never inserted.AlertMaintenanceService.sendDigestnow marks them on a dedupe hit too, still without delivering.actions existsfired on every clean turn: an empty action list is now absent (OutputMatcher.resolve);containsis unchanged.A cache miss copied the turn even when nothing would run it: when submitting the output-needs loader fails (alerts off, queue full),
OutputMatchHookreturns before building a snapshot.Bulk acknowledge: a present
idslist is the selector. An empty list or an empty entry is a 400INVALID_PARAMETERinstead of falling through to "everything matching the filter"; the filter applies only whenidsis left out. The MCP tool acknowledges one event by id and the Manager sends{}when acknowledging by filter, so both stay valid.Wording:
OUTPUT_MATCHadded to thesourcetag ofeddi_alerts_fired_total(Metrics), toAlertEventQueryParams.sourceand tolist_alert_events' description andsourceargument. "No conversation text" is corrected wherever it was repeated (REST Javadoc, MCP description, Alerts, MCP Server, theeddi-adminskill): a rating comment and, only withincludeValueand conversation review on, anOUTPUT_MATCHvalue appear, each cut to 280 characters.
Design decisions
On a digest dedupe hit every held event is marked, including any held after the existing digest was written. They stay in the inbox but are not listed in a digest message. The alternative, reading the existing digest to mark only what it covered, needs the event ids on the digest, which it does not store.
The export re-checks each row against the user id, so a store returning a wider set cannot leak another person's rule or acknowledgement into it.
Tests
448 unit tests across the alert, output-match, REST, MCP, step-runner and GDPR classes pass, among them the new AlertGdprParticipantTest, RestAlertEventsTest.bulkEmptyIdsRefused, AlertMaintenanceServiceTest.digestCrashBetweenInsertAndMark, OutputMatchHookTest.cacheMissLoaderRefused, OutputMatcherTest.emptyActionsAreAbsent and AlertSendersTest.httpsOnly. Store ITs: 32/32 (16 MongoDB + 16 PostgreSQL, with the two new contract cases). The doc and style guards pass. Mutation check: 9 of 9 mutants killed — http accepted at save, an http vault URL delivered to, an empty export, another person's acknowledgement exported, the lastEditor role lost, a dedupe hit leaving events pending, a refused loader submit still snapshotting, an empty ids list falling back to the filter, a blank id entry accepted.
fix(alerts): erasable output values, queued rating alerts, exact digest recovery, targetId-based URL restore (2026-10-25)
Repo: EDDI (feat/alerts-backend, PR #1138) — the second round of review findings
What changed and why
OUTPUT_MATCH values can be erased. An event that stores a matched value (only with
includeValueand conversation review on) also records the conversation owner in an internal field,AlertEvent.subjectUserId. It is@JsonIgnored, written by both stores and never read back, so no REST row, MCP answer, operator answer, Slack message or webhook payload can carry it (asserted on the serialized row and on both payloads). Events without a stored value never get it.AlertGdprParticipant.eraseblanks the value and the field (IAlertEventStore.redactOutputValues, partial index on both stores); the owner's export lists those values (value, conversation, time) underoutputMatchValues— their own conversation content, as the ratings export lists their ratings.A rating alert queued across an erasure.
AlertEngine.evaluateRatingre-reads the rating first and skips it when it is gone or itsupdatedAtchanged (the newer save has its own alert). After the event is written it re-reads again; if the rating was erased in between, the event's excerpt is blanked (redactRatingComment) before anything is delivered. No per-user lock.Digest recovery marks exactly what the digest covers. The digest records the held event ids it covers (
digestEventIds, internal, at most the 500-event batch); on a dedupe hit the maintenance pass reads that digest (findByDedupeKey) and marks only those ids, so events held later stayDIGEST_PENDINGfor the next digest.Webhook URLs are restored by
targetId, never by position or host. Every delivery target gets a server-assignedtargetId, kept across updates and returned by every read. An update or test send that sends a masked or empty URL keeps the stored URL of the target with the sametargetIdonly; a masked or empty URL without a known id is a 400INVALID_RULE; a new target must bring a real URL; ids the stored rule does not have (and all ids on a create) are replaced. Removing or reordering two masked targets on one host no longer hands one target the other's URL.Alerts → Privacy now says what is stored: the acknowledger's id (shown in the inbox, never sent out) and the internal subject id of a stored output value, both until erasure or retention.
Design decisions
Rules saved before ids existed need no migration. A target without an id gets
t+ its existing hashedkey()on every read — the same id each time — so the first update of such a rule matches the ids the client read, and that save stores them. Both stores already persist targets as JSON, sotargetIdis stored without a schema change.The subject id is write-only. Erasure and the export query by it in the store; no read maps it back into an event, which is a stronger guarantee than hiding it at each serializer.
A digest written before covered ids existed would match nothing on a dedupe hit. Alerts have not shipped, so no such digest exists outside development databases.
Tests
477 unit tests across the alert, output-match, REST, MCP, step-runner, GDPR and rating classes pass, including the new AlertPrivacyRaceTest (both race orderings, the subject recorded only with a value, never serialized or sent) and the targetId cases in RestAlertRulesTest (remove one of two same-host targets, reorder, new target, unknown id refused, client ids replaced, legacy rule). Store ITs: alert stores 20/20 on MongoDB and on PostgreSQL (new contract cases: erasable subject, covered ids and findByDedupeKey, one-event excerpt redaction, persisted targetId), rating stores 15/15 on each. Mutation check: 9 of 9 for the erasure, race and digest changes, 5 of 5 for the targetId match.
fix(alerts): erasure fence for queued alert work, deliveries send the stored event (2026-10-25)
Repo: EDDI (feat/alerts-backend, PR #1138) — two more review findings
What changed and why
A queued OUTPUT_MATCH value could land after an erasure.
AlertErasureFenceis aUserErasureParticipant: the erasure's step 0 (stopInFlightWork, andstopInFlightWorkByHashon every other node through the existing clustergdpr-stopbroadcast, asConversationServiceandAuditLedgerServicereceive it) records the time the erasure started, per user, keyed by the user id's hash.TurnSnapshotnow carries its capture time.AlertEngine.evaluateOutputstores no value (and no subject) when the snapshot was captured before a live fence — the alert still fires — and after the insert re-checks the fence and blanks value and subject (redactOutputValues) before delivery when the fence went up meanwhile. Queued rating alerts use the same fence on top of the re-read: a fenced rating is not evaluated, and an excerpt written while the fence went up is blanked. Fences last 15 minutes (AlertErasureFence.FENCE_TTL).A hand-made schedule could pass for
alerts-maintenance. The schedule API refused only bodies carrying the alert marker, so a plain schedule namedalerts-maintenancecould be created, andAlertMaintenanceSchedule.ensure— which looked the schedule up by name — then took it for the installed one, leaving retries, digests and retention unprocessed. The API now also refuses the reserved name (trimmed, case-insensitive) on create and on a rename (AlertSchedules.isReservedName), andensurecounts only a row carrying the maintenance marker; a same-named row without it (possible on a deployment from before the name was reserved) triggers a bounded scan for the marked row, and the real schedule is created when none exists.AlertMaintenanceScheduleTestand a newRestScheduleStoreExpandedTestcase cover it; the docs now say a rating alert captured before an erasure is dropped altogether, while anOUTPUT_MATCHalert fires without its value.Delivery could send a copy older than the store.
AlertDeliveryService.deliverskips an event that no longer exists and reads the event again right before each send, sending the stored (possibly redacted) version — first delivery and every retry, on any node. No cross-node lock: the remaining window is between that read and the send, and a send already on its way cannot be recalled (said in the code and in Alerts → Privacy).
Design decisions
A dedicated fence bean, not the dispatcher or the engine: it has one job, both the engine and the cluster handler reach it through CDI, and it keeps the engine free of erasure bookkeeping.
The fence only holds back content captured before the erasure started, so expiry is a matter of memory, not correctness: a later conversation of a reused id is never blocked, and 15 minutes is far longer than the alert queue takes to drain.
Tests
486 unit tests across the alert, output-match, REST, MCP, step-runner, GDPR, rating and cluster-handler classes pass, including the fence cases in AlertPrivacyRaceTest (captured before the fence stores no value, fence up between check and insert blanks before delivery, captured after keeps the value, expiry, set by hash, fenced rating not evaluated) and AlertDeliveryServiceTest (first delivery and a retry send the redacted stored version, a deleted event is not sent). Mutation check: 7 of 7 killed.
🐛 fix(email): HITL email notification review findings (2026-10-25)
Repo: EDDI (feat/email-hitl-notifications)
Eight review findings on the HITL email notifications (docs/hitl.md, section "Email notifications").
What changed and why
GDPR erasure keeps the user directory entry when an earlier participant failed (
GdprComplianceService). The email ledger finds a person's rows by the address in the user directory, which is why the directory participant runsLAST. The loop did not link the two: with the ledger step failing, the directory entry was still erased, so the re-run the result asks for could no longer find those rows and they stayed until ledger retention. ALASTparticipant is now skipped, and reported as failed, when an earlier participant failed (the same reasoning as step 4c, which keeps the snapshots for the retry).A pause on the conversation-start turn is announced only after the descriptor is written (
ConversationService.startConversation). A failed descriptor write discards the conversation again, and the asynchronous notifier could already have mailed about it. The say and resume sites already fire after the conversation is final.eddi.mail.smtp.connectionmust match the connection-name grammar (SystemMailer.parse). A name no stored connection can carry ("my mail") used to leave the mailer reported as enabled with every send failing; it now disables the mailer at startup with the reason.The email ledger caps
providerId(255) andlastError(512) on every write, in both stores (IEmailMessageLedger.cap, Mongo and PostgreSQL). Those are the PostgreSQL column widths; an uncapped render error made PostgreSQL refuse the update, which left the row claimed until its lease ran out and retried it after every lease. The cap never splits a surrogate pair.A timeout past the end of the time-line no longer aborts the notification (
HitlNotificationContent). A positive duration such asP1000000000000Dpasses config validation but overflowsInstant; the deadline line now names the duration instead of a date.HitlEmailNotifier.attemptalso treats any runtime failure while building the mail as a terminalFAILEDrow, instead of letting it escape and leave the rowPENDING.Manager: Save is refused while the recipients box is invalid (
HitlConfigSectionreports it throughonValidityChange,agent-detail.tsxrefuses every save path, as it does for the spend limit). An invalid list never enters the draft, so an earlier valid edit was saved while the field showed something else. The recipients label is now associated with its textarea, and the hint no longer says the mail carries no conversation content: a tool-call pause lists the pending tools with redacted, shortened arguments (all 11 locales, plus the newagentDetail.hitlNotifyFixBeforeSavemessage).
The operator system prompt already described the content correctly (it names the redacted tool arguments), so it is unchanged.
feat(alerts): alert rules framework — ratings and failed turns to inbox, Slack and signed webhooks (2026-10-24)
Repo: EDDI (feat/conversation-ratings) — PR 5a of planning/conversation-rating-plan.md (§0.2, §11)
What changed and why
People running an agent can now be told when something needs them: a low rating or a comment, or a turn that failed, was interrupted, ran past its deadline or was stopped by a cost limit. One mechanism with sources, evaluated outside the pipeline — see Alerts, whose top section is the design note.
Model and stores —
AlertRuleandAlertEvent(engine/alerts), MongoDB (alertrules,alertevents,alertwindowswith a TTL index) and PostgreSQL (alert_rules,alert_events,alert_windows) twins selected inDataStoreProducers.OUTPUT_MATCHis not accepted yet; its fields slot intoAlertConditionand a constant intoAlertSource.REST —
/alerts/rules(CRUD +POST /alerts/rules/test) and/alerts/events(list, unacknowledged count, read, acknowledge one / bulk, retry), save-time validation (AlertRuleValidator, every problem named), coded errors (AlertErrors).Hooks — ratings: a CDI event after the rating is stored (
ConversationRatingSaved). Turns:ConversationStepRunner.waitForExecutionFinishOrTimeout, the one method the say path and the HITL resume path both wait in, now classifies the outcome from in-memory data (ERROR, cancelled / EXECUTION_INTERRUPTED, watchdog timeout, anllm:spend_refused:*record) and firesTurnOutcomeonly for a bad one.AlertDispatcherobserves both and only enqueues onto one worker with a bounded queue; a full queue drops witheddi.alerts.droppedand a rate-limited WARN.Cluster-safe spam control — the dedupe is a unique index over
ruleId|agentId|conversationId|windowStart; the per-rule cap an atomic window counter ($incupsert /INSERT … ON CONFLICT DO UPDATE RETURNING); delivery updates and claims are conditional on a version (Postgres claims withFOR UPDATE SKIP LOCKED); digests mark only events stillDIGEST_PENDINGand carry a dedupe key of their own.Delivery — Slack through the channel integration that serves the channel (
ChannelTargetRouterbot token +SlackWebApiClient), mrkdwn-escaped; webhooks throughOutboundHttp(STRICT SSRF, no redirects, timeout, 64 KB body cap, 16 KB answer read) signedX-Eddi-Signature: t=…,v1=…withHmacSignatures— the scheme EDDI's own inbound webhook channel verifies; the signing secret must be a${vault:…}reference and an unresolved one stops the delivery. The inbox always.Retries, digests, retention — one
alerts-maintenancesystem schedule (HEARTBEAT, 60 s) routed by a metadata fast-path inScheduleFireExecutortoAlertMaintenanceService, so it runs under the poller's cluster-wide claim and lease. Backoff 30 s × 4ⁿ⁻¹, 5 attempts. An idle pass writes no fire log. User-created schedules claimingalertTypeare refused.Privacy — no user id and no conversation text anywhere an alert goes; the payload is built field by field (
AlertPayloads); the rating comment is cut to 280 characters, and GDPR erasure blanks it (ConversationRatingGdprParticipantredacts before deleting the ratings) and forgets acknowledgers and rule authors (AlertGdprParticipant).Manager — Alerts page (
pages/alerts.tsx,/manage/alerts, admin + editor): inbox with source / acknowledged filters, per-target delivery status, Retry, acknowledge one / selected / everything here; rules list and editor (source picker, scope, condition, Slack and webhook targets, "Send test alert", throttle and digest, delete with confirmation). Sidebar badge of unacknowledged alerts, administrators only, polled every 30 s. 99 alert keys plusnav.alertsin all 11 locales; MSW handlers (alert-handlers.ts);openapi-operations.jsonregenerated.MCP —
list_alert_events,acknowledge_alert_event(McpAlertTools, AUTHOR tier, in-process bean);McpRatingTools' coded-error mapping moved toMcpToolUtils.codedFailureand shared. 95 tools.Operator — reads
GET /alerts/events,/alerts/events/unacknowledged-count,/alerts/rules,/alerts/rules/{ruleId}; prompt section on rules, states, retries and scoping; revision 37 → 38.Docs — Alerts (new, in
SUMMARY.md), Metrics, a Grafana alert-rule example in the Monitoring Guide, an Alerts row in the full metrics dashboard (synced tok8s/overlays/monitoring), theeddi.alerts.*properties in the Configuration Reference, MCP Server, theeddi-adminskill.
Design decisions
The turn hook sits in the wait, not at error sites.
waitForExecutionFinishOrTimeoutis where ERROR, interruption and the watchdog's deadline converge for both turn paths, andBaseRuntimeruns the turn's callbacks beforeFuture.getreturns. A mid-loop cost-ceiling stop is not visible there (the loop ends with an answer); the next turn's refusal is.One maintenance schedule, not one per event or rule. Fewer rows in the schedule list, one claim per minute; every step it takes is a conditional write, so a duplicated schedule (two nodes creating it at once) is harmless.
Editors: one agent, Slack and inbox only. A rule over several agents and a webhook target (arbitrary URL, signed with a vault secret) are an administrator's. An editor sees a webhook by host only. Access is re-checked against the stored rule on update and delete.
Fixed, epoch-aligned windows for dedupe and cap — exact across replicas through unique keys and atomic counters, at the price of a boundary where two windows meet.
The rule author, the acknowledger and the reviewer come from the caller, never the body; MCP and the operator use the same in-process resources.
Operator: reads only. Acknowledging is a person's statement; retry and test send real messages; rule writes decide where alert content goes. A rule read shows a webhook URL to the operator (it runs as the admin); the prompt says not to repeat it.
Tests
Backend unit: 129 in the alert, step-runner, GDPR and MCP classes run together, plus ScheduleFireExecutorTest and RestScheduleStoreExpandedTest (648 with the related service suites); "never blocks" is proven twice — AlertDispatcherTest (10,000 hand-offs to a stuck worker in under a second) and ConversationStepRunnerTurnOutcomeTest (2,000 failing turns through the real hook). ITs: MongoAlertStoresIT and PostgresAlertStoresIT share AlertStoreContract (13 each, incl. a 40-thread window-counter race, the unique dedupe, version-conditional updates and single claims). Mutation check: 22 of 22 mutants killed by a test failure — every editor scoping guard (agentId required, single-agent scope, no webhooks, the EDIT check, agent-less events, webhook redaction, the stored-rule re-check on update and delete, editor rule listing, per-id bulk acknowledgement, single acknowledgement), the author from the caller, the privacy guards (comment truncation, no comment in the summary, Slack escaping, GDPR redaction), the hook never throwing into the turn, deadline classification, a full queue never throwing, and the webhook's strict SSRF, no redirects and unresolved-secret refusal. Manager: 18 new tests (page, editor, badge, ruleProblems). Full backend ./mvnw test: 29,895 run; the two coverage guards it caught (configuration reference, dashboard) are fixed, the third failure is the known-flaky DocumentExtractorsTest.honoursItsTimeBudget.
✨ feat(engine): self-continuation — an agent can start its own next turn (2026-10-24)
Repo: EDDI (feat/conversation-continuation) — item E8 (core) of the evaluated-generation plan
What changed and why
A job of many model calls (the plan's video pipeline: ~150 calls over ~20 minutes) cannot be one turn: the per-request deadline header is capped at 10 minutes, and the turn is EDDI's unit of tracing, persistence and recovery. Instead of a workflow engine, a job is now many ordinary turns of one conversation, and the conversation is its job log.
CONTINUE_CONVERSATION— a new reserved action (IConversation,ReservedActionLint). A turn that emits it queues the next turn of the same conversation, without user input, after the turn has been committed.Off unless configured. Two agent-level fields (
AgentConfiguration):maxContinuations(per conversation,0..10000, default unset = off — the action is ignored with a WARN, the step recordscontinuation:refused = disabled, andeddi.continuation.refused{reason="disabled"}counts it) andcontinuationInput(a literal string, ≤ 4096 characters, never a template; default empty). Validated at save time and on ZIP import (AgentStore).Bounds. Each continuation is an ordinary turn under the agent's
turnDeadlineMs. The count is the number of steps carrying the engine-written markercontinuation:number.maxCostPerConversationUsdbounds them all together — it already sumsaudit:costover every step (LlmSpendGate.conversationCost, verified); a continuation is also refused before it is armed once the ceiling is reached. The tenant budget applies throughsaylike on any turn.What a continuation turn sees. The designer's
continuationInputand the engine-reserved context entryselfContinuation = {number, max}(added toClientContextGuard.RESERVED_KEYS, so a client cannot forge it). Rules route on a phase property, so the job is a state machine in config.Delivery: a one-shot schedule, not the coordinator queue (
ConversationContinuations,ContinuationFireHandler, a fast-path inScheduleFireExecutor). The coordinator's queue lives in memory and dies with its node; a schedule row survives a restart, exactly one node claims it, a failed fire is retried with backoff and dead-lettered, and the turn it starts still goes throughsay— coordinator, conversation lease and fencing, quotas, audit. The cost is the poll interval (≤ 15 s) between two continuation turns.Once only. Delivery is at-least-once, so two guards: the fire first looks for a step carrying its number in the stored conversation (written before the persist, never expires), and the turn carries an automatic
Idempotency-Key(eddi-continuation-<n>). Under the lease, a queued turn rebuilt over a newer document is dropped when that document already holds its marker — also with theIdempotency-Keyfeature switched off (ConversationService).Lifecycle. Decided before the persist (the outcome —
continuation:nextorcontinuation:refused— is part of the committed step) and armed only after it, in the say path (ConversationStepRunner), the resume path and theCONVERSATION_STARTturn. Nothing is armed for a turn that paused, failed, was cancelled, lost its lease or could not be stored. A fire never runs a turn for anENDED,AWAITING_HUMAN, deleted/erased or Art. 18-restricted conversation; an undeployed agent is retried (undeploy disables the schedule, redeploy re-enables it) and dead-lettered; an interrupted continuation stops the chain.endConversationandcancelwithdraw the pending continuation — cancel between two continuation turns now answersCANCELLEDinstead of409(ConversationHitlService); the approver's paused-only cancel never touches it. A group member's turn cannot continue itself. The schedule carries the owner'suserId, so erasure deletes it.Schedule surfaces. A continuation schedule cannot be fired manually (REST
409, MCP error) and is never exported (RestScheduleStore,McpAdminTools,RestExportService).Metrics:
eddi.continuation.scheduled,eddi.continuation.run,eddi.continuation.refused{reason}— described inmetrics.mdand charted in the Scheduling row of the Full Metrics Reference (k8s copy re-synced).Docs: new page Long Jobs — the Conversation as the Job Log; reserved-action lists (
agent-config-authoring.md,hitl.md,AGENTS.md), reserved context key (passing-context-information.md,configuration-reference.md),conversations.md,scheduling.md(engine-minted schedules),httpcalls.md(do not poll long operations with retries),upgrading-from-6.5.md(newly reserved names, the cancel200).Manager: a Self-continuation section on the agent page beside Limits (
maxContinuationswith the backend's 0..10000 bound, refusing to save an invalid count;continuationInput), i18n in all 11 locales (agent-config-sections.tsx,continuation.ts).Platform Operator: the prompt explains self-continuation, its schedule, step records and metrics, and maps the
long-jobspage; revision 36 → 37. Other open branches also bumpoperator-revision.json— operator PRs land one at a time.
Review fixes
Only the engine arms a continuation. REST schedule create, update and ZIP import accepted the
continuationTypemarker, and a fire runs a turn in the conversation its metadata names — so a client that may create schedules could inject a turn into another user's conversation. The marker is now refused (400, for everyone, like the HITL-timeout and ingestion markers), and a fire whose scheduleuserIddoes not own the conversation runs nothing (owner_mismatch, a new refusal reason) (RestScheduleStore,ContinuationFireHandler).A fire is
COMPLETEDonly for a turn that was stored. The reply reaches the handler before the persist; the handler now confirms the turn's marker is in the stored conversation (re-checked for about two seconds) and fails the fire otherwise, so the schedule retries it.A schedule write that fails for a moment is retried (three attempts) before
schedule_failed. The crash window between commit and arm is documented in long-jobs.md with how to spot and resume a stopped job; an automatic reconciliation sweep is planned with part 2.Manager: a half-typed count (
5e,-) no longer silently clearsmaxContinuationsand lets Save through.Docs: only continuation turns are retried by their schedule (the first turn is resent by its caller); the poll interval does not guarantee a minimum delay between continuations.
A cancel that races the arm wins. A cancel that signalled a running turn found no schedule to withdraw yet, and the turn then armed one. Arming now skips a cancelled turn, and withdraws a schedule it wrote if the cancel landed during the write (
interrupted).Interrupts are kept. An interrupted retry pause gives up and keeps the thread's interrupt flag, and the continuation fire log is written with the interrupt parked and restored afterwards, as the other fire paths already do.
End-to-end ITs on both datastores (
ConversationContinuationITand its Postgres twin, with a one-second poll profile). A deterministic agent (rules + output, no LLM) runs one user turn, then the real poller runs continuations 1..3 on its own and the fourth is refused (limit); asserted on the stored conversation through REST (markers,continuation:next, the reserved context, the literal input), the schedule listing and the fire logs. Also: cancel between turns withdraws the pending continuation (200) and nothing runs after it,endConversationwithdraws it, REST create/update with the marker is400, and an agent withoutmaxContinuationsarms nothing.Fixed, found by those ITs: cancelling a finished job answered
CANCELLED. A fired one-shot is disabled, not deleted, so every continuation that ran stays undercontinuation-<conversationId>, anddisarmcounted those spent rows as withdrawn: a cancel after the job ended answered200instead of409.disarmstill deletes them but now reports only the pending ones — enabled, or switched off by an undeploy — through a newIScheduleStore.countPendingSchedulesByName(Mongo and Postgres) (ConversationContinuations).Spent continuation rows are bounded. Every fired continuation stayed behind as a disabled one-shot with its fire log — up to
maxContinuationsrows per conversation. Arming the next continuation, and the last continuation turn of a job, now first deletes the conversation's used-up rows with their fire logs through a newIScheduleStore.deleteUsedUpOneShotsByName(Mongo and Postgres, reusing the delete cascades). Used up means exactly whatmarkCompletedleaves for a one-shot: disabled,PENDING, no next fire, fired, unclaimed, no disabled reason — so the running continuation's claimed row, dead-lettered, undeploy-disabled and hand-disabled rows are never touched, and a conversation keeps at most its latest used-up continuation plus the pending one. A failed prune is logged and never stops the arm. Rejected: deleting a continuation's row when its fire completes, which would erase its fire history and put continuation logic into the generic poller.deleteSchedulesByNameno longer logs every deletion as "HITL timeout schedule(s)".
Not in this change (planned)
Part 2 of E8 — parking a turn on an external long-running operation (the HITL pause machinery with a machine as the resolver, a poll schedule bound to the pauseId, an optional signed webhook to resolve it sooner) — and the async video provider (needs E6/E7).
Verification
New: ConversationContinuationsTest, ContinuationFireHandlerTest, ConversationServiceContinuationTest (the real say path: armed only after the commit; fire twice → one pipeline run through the stored document; two deliveries serialized by the lease → one run, with and without Idempotency-Key), AgentStoreContinuationValidationTest; extended ConversationHitlServiceCancelTest, ScheduleFireExecutorTest, RestScheduleStoreTest, AgentStoreClientLibraryMemoryToolsTest, ClientContextGuardTest.
✨ feat(llm): spend checks that see every attempt, and per-conversation reservations (2026-10-24)
Repo: EDDI · Branch: feat/llm-spend-checks · Plan item E4 of planning/evaluated-generation-plan.md
What changed and why
The agent's maxCostPerConversationUsd and the tenant's monthly budget were checked once per LLM task, before its first model call, and between tool-loop rounds. Every further paid call of the task ran unchecked — and, since a task writes its cost into audit:cost only once it has finished, even a check would have missed the attempts before it:
a same-model re-ask (
FormatRetryRunner) was bounded only bymaxRetryCostUsd, priced from per-1M prices, and never consulted the conversation's spend;a cascade escalation to its next step was bounded only by the cascade's own
maxCostPerRun;an output guardrail
repromptand aclassifierguardrail's model call (input and output) ran whatever the ceiling or the tenant budget said;nothing reserved the cost of a call in flight, so calls running at the same time would all pass the same check.
Now every one of these is admitted by LlmSpendGate.admit before it starts, with what the task has already spent and not yet recorded (earlier attempts at their prices; the primary answer's cost before a reprompt; earlier cascade steps before an escalation; the tool loop's tool cost before its final re-ask). A refused re-ask is skipped (eddi.llm.recovery{outcome="skipped_spend"}) and the reply is handled as unresolved; a refused escalation returns the cascade's best answer so far (eddi.llm.cascade.ceiling.exceeded{kind="spend"}) — or, when no earlier step produced one, raises the spend refusal so LlmTask serves the task's fallback answer, as for a refused primary call; a refused reprompt degrades to the existing "no reprompt could start" block; a refused classifier call is "could not decide" with the new audit reason spend_refused, so its failMode applies. Every refusal is counted by the existing eddi.llm.spend.refused{reason} with the existing reasons — no new meter.
Reservations. SpendReservations (one per loaded ConversationMemory, transient) holds the expected cost of each admitted call until it is closed; LlmSpendGate.check and admit both count what is held. It is per conversation and per node — exact for the ceiling, because a conversation's turns are serialized (coordinator; conversation lease in a cluster) and the ceiling is computed from the conversation's own steps, not from the cluster COSTS KV. The tenant budget is read, not reserved — but its check now adds the turn's unsettled spend (the current step's audit:cost not yet metered, plus the running task's unrecorded spend), through a new TenantQuotaService.checkCostBudget(tenantId, pendingUsd): the monthly counter is charged only when a turn settles, so without it every paid call of a turn was compared with the counter as it stood before the turn. LlmSpendGate.admit(memory, pendingUsd, expectedUsd) and TaskSpend (a PaidCallGate) are the entry points for E5 (forEach) and E7 (media).
Behaviour kept, now documented precisely. A call is admitted while the spend so far — recorded, unrecorded and in flight — is below the ceiling; its own price is not compared, so the call that crosses the ceiling completes and the next is refused. No configuration field was added; an agent without a ceiling and with quotas off behaves exactly as before.
Design decisions
One gate, one rule: re-asks, escalations, reprompts and classifier calls use the same
admitthe primary call'scheckis built on, and the same reasons and metric.The reprompt check sits in
GuardrailService.runOutput, behindGuardrailContext.spend(), so every execution branch (plain, tool loop, cascade, HITL resume) gets it;Reprompter.Attemptnow carries the reprompt's priced cost.A phase's unrecorded spend lives in a
TaskSpendthat is discarded once the phase's cost is recorded, so no amount is counted both there and inaudit:cost.Expected costs are cheap estimates (previous attempt's price; the classifier prompt at its input price). They only matter for concurrent calls, of which there are none inside one task today.
Files
SpendReservations.java, LlmSpendGate.java, TaskSpend.java, PaidCallGate.java, FormatRetryRunner.java, CascadingModelExecutor.java, GuardrailService.java, ClassifierGuardrail.java, LlmTask.java; docs in langchain.md, llm-resilience.md, tenant-quotas.md, metrics.md; Platform Operator prompt and revision 37.
End-to-end tests
LlmSpendChecksITand its PostgreSQL twinPostgresLlmSpendChecksITdrive a deployed agent against a WireMock OpenAI endpoint whoseusageblocks are priced by the task: the ceiling refusing the turn after the one that crosses it; a re-ask, a guardrail reprompt, a cascade escalation and an outputclassifiercall each refused on the task's unrecorded spend (each with a control that makes the call when nothing stops it); the tenant budget charged by one conversation and refusing the next, and refusing a re-ask on the same turn's unsettled spend; and an under-budget turn whoseaudit:costand tenant usage equal the reported usage at the configured prices. Each asserts the client's answer, the stored conversation and the exact number of provider requests.
Not done / next
The cascade's
judge_modelconfidence call is still unchecked (it is priced through the cascade's run cost and the next step's check sees it).Tenant-level reservations would need the quota store: a turn's own spend is now counted, but another conversation's unsettled turn is not, so concurrent conversations can each complete one call past the tenant budget.
Operator revision 37 will collide with other open branches that bump it; re-bump at merge.
🐛 fix(llm): per-cascade-step vision, one repeat-guard test, consistent trace-header presence (2026-10-24)
Repo: EDDI (fix/provider-capability-gaps)
What changed and why
Follow-ups from the review of #1056, #1057 and #1062.
Attachments are decided by the endpoint actually called.
LlmTaskforwarded attachments once, with the task's own type and parameters, so a cascade step on its ownopenai-compatibleendpoint withvision=truegot no images, and a step without it inherited the task's. The JSON response format already used the step's parameters.CascadingModelExecutornow takes an optional per-step prompt provider;LlmTasksupplies one that re-forwards the attachments with the step's type, model and vision decision, but only when the task or the step isopenai-compatibleand the endpoint differs (type, model or vision decision). Non-cascade tasks andtype: openaicascades take exactly the old path. The re-forward is non-recording (AttachmentForwarder.forward(..., record=false)), so the turn's attachment errors and meters are not counted twice. A rebuilt-prompt retry after a context-too-long error (onContextTooLong: retry) still forwards with the task's decision; that rarely-hit path is unchanged.Input guardrails no longer undo it. The step's prompt is screened by carrying the task-level rewrites onto it (
LlmTask.screenedStepPrompt): each text part the screening changed is rewritten by its text in the step's message, while the step's own image and document parts and engine notes are kept.GuardrailService.reapplyis not used for a step, because it swaps the whole last user message for the task's screened one, attachments included.Text only a step's prompt carries is screened. An attachment can turn into different text per endpoint (a PDF extracted to text for a step without native PDF, a file inlined for one step and skipped for the task, a vision-skip note naming the file). That text is current-turn content the task-level screening never saw, so
GuardrailService.screenUnseenTextscreens it with every input guardrail, including the classifier, which skips earlier messages for cost. It is quiet (no outcome, metric, SSE event or audit entry; the turn's findings were recorded once); its cost is added to the turn.redactrewrites the text; a block, or a guardrail that cannot decide (a classifier that is down or unparseable) according to itsfailMode(aredactguardrail withoutfailModelets the text through), replaces it with the withheld placeholder. This differs from the task path on purpose: a BLOCK on attachment text there blocks the whole turn, while on a cascade step's step-only text the part is withheld and the turn continues, because step-only parts are never replayed into later history. The cost of a classifier call is counted whether it flags or clears the text. A verdict is kept for the turn by text, so several cascade steps carrying the same part cost one classifier call. When the step's prompt cannot be matched to the task's, the step gets the task's screened prompt.What is recorded. The attachment errors written to the step data and the
eddi.attachment.*meters come from the task-level pass (the task's endpoint), not from the cascade step that answered. A step's own forwarding is non-recording.Repeat guard, gated batch.
ToolLoopRunnerToolPolicyTestgains a test for the ungated half of a gated (HITL) batch, the secondexecuteGuardedcall site, which no test drove.MCP trace headers.
McpToolProviderManager.withTraceHeaderscheckedtraceparentandtracestateone at a time, whileTracePropagation.headersMissingFromis all-or-nothing. It now reuses the shared rule (TracePropagation.withoutIfAnyPresent): an author's owntraceparentortracestatesuppresses both.Refuted:
create_api_agentalready runs the sameOutboundTargetPolicycheck onllmBaseUrlassetup_agentdoes onbaseUrl(AgentSetupService.createApiAgent, covered byAgentSetupLlmBaseUrlPolicyTest); no change.
Design decisions
The per-step decision compares (type, model name, effective vision) of the step with the task's and re-forwards only on a difference, so the common cascade keeps the one prompt it always had.
Verification
Mutation-checked: bypassing the per-step provider, the guard at the gated-batch site, and the shared presence rule each fail the new tests.
chore(release): attest SHA256SUMS with SLSA provenance (2026-10-24)
Repo: EDDI · Branch: chore/release-provenance-attestation
The OpenSSF Scorecard Signed-Releases check reported 6.6.0 as signed (the cosign bundle SHA256SUMS.sigstore.json) but without provenance. The image job already attested its digest with actions/attest-build-provenance; the release job, which publishes the installer checksum list, did not attest anything.
ci.yml— thereleasejob getsattestations: writeand aGenerate SLSA provenance attestation (SHA256SUMS)step after the cosign signature, using the same pinned action as the image job. It runs before the GitHub Release is created, so a failed attestation publishes nothing.Verify a release with
gh attestation verify SHA256SUMS --repo labsai/EDDI.Applies to tags cut after this merges. 6.6.0 stays without provenance; it cannot be attested retroactively.
Open question: Scorecard's check may look for a
.intoto.jsonlrelease asset rather than the attestation store. Confirm on the next tag; if it still warns, the fallback is theslsa-framework/slsa-github-generatorgeneric generator, which emits that asset.
📝 docs(planning): evaluated generation — checks and repair for every step that produces something (2026-10-24)
Repo: EDDI (docs/evaluated-generation-plan)
What changed and why
New planning document planning/evaluated-generation-plan.md. No code changes.
It started as an analysis of whether EDDI could host a production AI video-generation pipeline: about 150 model calls per job, best-of-N keyframes, multimodal judges, a repair ladder, a human cost gate, and ffmpeg assembly. The answer generalises beyond video. Make → judge → repair is the loop behind grounded RAG answers, extraction, text-to-SQL, output compliance, content production, group deliverables and media.
Verified against main at 5028af0a3, EDDI already runs that loop in seven places:
output guardrails (#1064, with the
classifiertype from #1112);format recovery (R5);
the model cascade;
TASK_FORCE VERIFY, which has no rework within a run;
group task approval;
single-agent HITL;
team cadences.
The plan builds on them instead of adding an eighth:
E1
A judge output guardrail that answers with author-declared issue codes, so a reprompt says what to fix; onExhausted: deliver-best for quality checks, so the best attempt is delivered (still screened by every other guardrail) instead of a block message
E1c
A deterministic expression guardrail
E2
Rework after a failed verdict, for humans and groups
E4
Spend checks that see every attempt, and reservations for parallel calls
E5
Checks and forEach on tool and HTTP steps
E6
Media groundwork
E7
Speech and image providers
E8
Long jobs through self-continuation and parked operations
E9
A fingerprinted DAG
E10
A composition service outside core
Design decisions
Checks on meaning are output guardrails, not a new block in
responseValidation. Guardrails already run after it in every execution mode, with their own reprompt loop, cost metering andfailMode.judgeis a sibling ofclassifier, not a mode of it. It shares the classifier's model-call machinery: provider pass-through, timeouts, deadline, pricing andpromptTemplatedata. Its contract differs: a structured list of codes rather than "safe is a positive label".Judge feedback uses a closed vocabulary.
GuardrailService.correctiveMessagenever puts the user's or the model's text into a reprompt, so the judge returns only declared codes, and the producer is told only the designer's fix text for them.The pipeline stays a straight line. Loops live inside a step, and repairs that must reach an earlier step leave as actions.
ffmpeg, music and domain-specific logic stay outside core.
feat(chat-ui): conversation and reply ratings (2026-10-24)
Repo: EDDI (feat/conversation-ratings) — PR 2 of planning/conversation-rating-plan.md (§7 and §0.1 "User — UX rules")
What changed and why
The Chat UI now lets the person chatting rate the conversation and, when the agent asks for it, single replies, against the owner endpoints PR 1 added. Everything is driven by the profile's rating object; without it the widget renders exactly as before.
Reply thumbs (
StepRating.tsx) under the last agent bubble of each step — hover/focus on desktop, always on touch,aria-pressed, 44px targets on touch. Thumbs down rates at once, then offers optional reason tags and a comment.Rating card (
RatingCard.tsx), a sibling ofPausedCard: stars as a radio group (roving focus) or thumbs; offered on end (askOnEnd) and/or afteraskAfterTurnsreplies, at most once per conversation, never to somebody who already rated, never again once closed (localStorage, guarded); always available from a header entry. One tap rates, tags/comment follow (comment peraskBelowScore), then a thanks state naming who receives the feedback; editable and removable afterwards; never blocks the composer.State (
useRatings.ts): restored viaGET /agents/{id}/ratingwhen a conversation opens; optimistic updates with rollback and a short notice; every backend error code mapped to translated copy (rating-api.ts); a rerun clears the local thumb of that step.Steps (
rating-steps.ts): reply ratings are keyed by step. Full conversation reads now stampstepIndexon their messages (stepsToMessages(…, fullHistory),processSnapshot({ fullHistory })); live turns are counted from the nearest stamped message.Demo mode gets an in-memory rating backend and a profile asking for every control. i18n for en/de/fr/es; styles for both themes and phones.
Docs: Chat UI section in
conversation-ratings.md;ui/chat/AGENTS.mdstructure and the rating error envelope.
Design decisions
The rating endpoints' error body is
{error: CODE, message}, not the attachments'{error, code};rating-api.tsparses its own and never shows the server's message.One thumb per step, under the step's last bubble, because the server stores one reply rating per step.
Stars use radio semantics for screen readers, but arrow keys only move focus and Enter/Space rates: with "one tap rates", arrow-selects-and-submits would send a rating per key press.
A rerun clears the thumb locally only, as plan R8 says; the stored rating reappears after a reload (documented limitation).
Testing
npm run typecheck, npm run lint and the full vitest suite (34 files, 564 tests, 67 of them new) pass; key logic was mutation-checked. Vitest needs Node ≥ 22.15 (jsdom 30's undici): the Maven-downloaded ui/node/v24.* works.
feat(ratings): conversation ratings — backend (2026-10-24)
Repo: EDDI (feat/conversation-ratings) — PR 1 of the plan in planning/conversation-rating-plan.md
What changed and why
People chatting with an agent can now rate the conversation and, if the agent asks for it, single agent replies; the people running the agent can list, summarize, export and triage those ratings. Off unless the agent designer adds ratingConfig with "enabled": true (checked per agent version the conversation runs on, cached per version in ConversationRatingPolicy like ConversationReviewPolicy).
Config:
AgentConfiguration.ratingConfig(scaleTHUMBS|FIVE_STAR, conversation and reply ratings, comment rules, reason tags, rating window), validated on agent create/update/duplicate (RatingConfigValidator), and aratingsubset onGET /agents/{agentId}/profileso chat clients need no extra call.Store:
IConversationRatingStorewith MongoDB (ConversationRatingStore) and PostgreSQL (PostgresConversationRatingStore) implementations selected inDataStoreProducers. Key(conversationId, stepIndex), conversation rating at-1; atomic upsert keepingid/createdAt; summaries aggregated in the database; indexes for agent+time, agent+version, user (GDPR) and the needs-attention count.Owner REST (
IRestConversationRating):PUT|GET|DELETE /agents/{conversationId}/ratingandPUT|DELETE /agents/{conversationId}/steps/{stepIndex}/rating, with stable error codes (RATING_DISABLED,RATING_WINDOW_CLOSED,INVALID_STEP,INVALID_SCORE,INVALID_TAG,COMMENT_NOT_ALLOWED,COMMENT_TOO_LONG,NOT_CONVERSATION_OWNER,CONVERSATION_NOT_FOUND).Maintainer REST (
IRestConversationRatingAdmin,eddi-admin/eddi-editor):GET /ratings,/ratings/summary,/ratings/export(CSV, 100k cap, formula-injection escaping), and the triage loop of plan §0.1:GET /ratings/attention-count,PATCH /ratings/{ratingId},POST /ratings/review.GDPR:
ConversationRatingGdprParticipantjoins erasure (deletes the user's ratings, clears them as reviewer) and export; processing restriction blocks new ratings.Metrics:
eddi_conversation_ratings_total,eddi_conversation_ratings_normalized,eddi_conversation_ratings_withdrawn_total, charted in a new "Conversation Ratings" row of the Full Metrics Reference dashboard.Docs: new
conversation-ratings.md,ratingConfigsection inagent-config-authoring.md,gdpr-compliance.md,metrics.md.
Design decisions
Only the owner rates.
requireConversationOwneradmits administrators too; the endpoint additionally requiresOwnershipValidator.isOwner, so an admin can read and withdraw but never write a rating in somebody's name.User ids for administrators only — decided on
isAdmin(), notseesEverything(): without workspace enforcement every editor "sees everything", and the plan's R3 is about admins.Scoping (R6): a caller who does not see everything must pass
agentIdand holdEDIT;PATCHchecksEDITon the rating's own agent.canOpenTranscriptapplies the existing conversation-read rule per row (owner, admin, or conversation review) and is false for purged conversations — one descriptor read per distinct conversation on the page (≤ 100).Triage is hidden from the rater: owner responses strip status, reviewer and note. A re-rating resets triage to
NEWand clears the note.PATCHis conditional on the rating'supdatedAt, so a maintainer cannot mark reviewed a rating that changed after they read it (409RATING_CHANGED). The reviewer always comes from the principal.minScore/maxScorefilter the normalized score (0..1), so one filter means the same on every scale. Addedsort=newest|lowest,reviewStatusandneedsAttentionfilters.Admin endpoints share one
@BeanParam(RatingQueryParams) so the five filtered endpoints cannot drift.
Deviations from the plan
A reply rating records the conversation's agent version at rating time: conversation memory stores no version per step (plan §10 assumed one).
The per-reply excerpt for callers who may read the transcript (§6) is not returned; clients with
canOpenTranscriptopen the conversation instead.GDPR: implemented as an
IGdprParticipant(erase + export), which is the SPI for stores;UserErasureParticipantis for stopping in-flight work and has nothing to stop here.No separate
(conversationId)index: the unique key's prefix serves it.
What's next
The MCP rating tools ship with this backend. Next: the Chat UI and the Manager Feedback page (badge on attention-count) with the Platform Operator's read access, then push alerts. The store ITs (MongoConversationRatingStoreIT, PostgresConversationRatingStoreIT) need Docker.
✨ feat(mail): email notifications for pending approvals — email Phase 1 (2026-10-24)
Repo: EDDI (feat/email-hitl-notifications, on top of feat/email-mail-core)
Phase 1 of the email plan (§16 "Notifications", the outbound half of §12).
Socket guard: an operator policy
SafeSocketConnector.resolveOperator(Policy.OPERATOR) for a host the operator set inapplication.properties— today only the system mailer's relay. Private and loopback addresses, IP literals, single-label names and any port (25 included) are allowed, andeddi.email.allowed-hosts(which confines authors) is not consulted. Still resolved once and pinned, still no link-local or cloud-metadata address, TLS still verified.TlsMode.PLAINTEXTexists only on an operator endpoint: theEndpointconstructor refuses it for an author one.resolve(the author policy) is unchanged.
Connections: mail origins on baseUrlAllowlist
A connection's
baseUrlAllowlistnow acceptssmtp://,smtps://,imap://andimaps://origins (ConnectionConfiguration.requireCanonicalAllowlistOrigin), soresolveAccessToken(XOAUTH2) and the newresolveBasicLogin(username + vault-backed password for SMTP/IMAP login) can check a mail server against it. The ports a mail scheme implies fold away (smtps465,smtp587,imaps993,imap143);smtp://relay:25stays a distinct origin. An https entry for the same host does not cover a mail origin. The credential-endpoint allowlist and the public base URL stay http(s) only. The Manager'sconnection-validation.tsmirror accepts the same schemes, with theoriginSchememessage updated in all 11 locales.
The system mailer
SystemMailer(engine/mail): the deployment's one SMTP sender, configured by the operator undereddi.mail.smtp.*(host, port,tls=starttls|implicit|none,from,from-name, and at most one credential source:connection—BASICorOAUTH2_CLIENT_CREDENTIALS/XOAUTH2 — orusername+password). Unset host = disabled, one INFO line at startup; an unusable configuration disables it with one ERROR line and never falls back to something weaker. Sockets come fromSafeSocketConnector.resolveOperator. STARTTLS is required, not opportunistic;tls=noneneedseddi.mail.smtp.allow-plaintext=trueand never carries a credential. Failures are classified (MailSendException.Category), permanent only for a 5xx refusal.GreenMail 2.1.14 (Apache-2.0, test scope; its aggregate
org.eclipse.angus:jakarta.mailand JUnit 4 are excluded) runs implicit TLS, plain SMTP and AUTH inSystemMailerTest; a small in-test STARTTLS server covers the upgrade GreenMail does not speak, and proves AUTH (PLAIN and XOAUTH2) only ever crosses the wire after it. The certificate is a throwaway made with the JDK'skeytool; the production TLS path, with certificate and host-name checks, is what accepts it.
The message ledger (outbound)
IEmailMessageLedger(integrations/email/ledger) withMongoEmailMessageLedger(email_message_ledgercollection) andPostgresEmailMessageLedger(email_message_ledgertable, created on first use), selected byeddi.datastore.typeinDataStoreProducers. One row per message: integration (systemfor system mail), kind (NOTIFY;REPLYlater), direction, RFC Message-ID, conversation,sourceRef(what the message is rebuilt from — the pause id for a notification), idempotency key, recipient, statePENDING → SENT | FAILED | SUPPRESSED, attempts,nextAttemptAt, claim token, provider response, last error, created/updated/expires. No body, subject or MIME — a retry re-renders from the source. Two unique keys (idempotency key;(integrationId, direction, messageId)) make an insert a cluster-wide claim.claimDueleases rows by a conditional update (findOneAndUpdateper row on Mongo;UPDATE … FOR UPDATE SKIP LOCKED … RETURNINGon Postgres), and every state change is conditional on the claim token, so a taken-over claim cannot overwrite the new owner's result.MongoEmailMessageLedgerIT/PostgresEmailMessageLedgerITrun one shared contract against real databases (Testcontainers): duplicate keys, eight concurrent inserts of one notification (one winner), two sweepers claiming 20 rows at once (no overlap), lease expiry and stale claims, reschedule, retention, erasure by recipient, and the stored field set (no body field exists).
HITL email notifications
Agent opt-in
hitlConfig.notify.email.recipients(HitlNotifyConfig): 1–20 plain ASCII addresses, validated at save and import time (HitlConfigValidation.validateNotify— empty, over 20, malformed, display-name, non-ASCII and duplicate-after-normalisation entries refused with the position, never the address). Configs without the field are unchanged.The hook:
HitlPauseCommittedEvent(conversationId, pauseId), fired asynchronously byConversationService.firePauseCommittedat the three places a regular pause is committed — the say turn (ConversationStepRunner, after the state CAS and the timeout schedule), theCONVERSATION_STARTturn, and a resume that pauses again (ConversationHitlService). Not for a pause restored after a failed resume, nor on a CAS miss. Group discussions are not covered yet.HitlEmailNotifier(integrations/email/notify): re-reads the pause from the store (state andpauseIdmust still match), inserts one ledger row per recipient under a digest key of kind/conversation/pause/recipient, and sends at once for the rows it won. A@Scheduled(identity = "email-ledger-sweeper")sweep retries due rows with exponential backoff (eddi.email.outbound.retry-backoff, capped at 1 h) up toeddi.email.outbound.max-attempts, removes expired rows (eddi.email.ledger-retention) and refreshes theeddi.email.ledger.pendinggauge. A decided pause endsSUPPRESSED; a 5xx fails at once.Content (
HitlNotificationContent): agent name, pause type, reason, start, deadline + policy, conversation id, and for a tool-call pause the same redacted, 300-char-truncated argument lines as the Slack card — extracted fromSlackHitlSupportinto the sharedHitlToolCallPreview. No conversation content. Subject[EDDI] Approval needed: <agent name>, designer text flattened to one line. The link iseddi.connections.public-base-url+/manage/approvals, no token; without a base URL the page is named, not linked.Metrics
eddi.email.outbound{kind,outcome}andeddi.email.ledger.pending, on the Full Metrics dashboard's Human-in-the-Loop row and inmetrics.md. Audit entryemail.notifyper sent/failed notification with the recipient as a SHA-256 hash plus domain (the audit ledger is write-once). GDPR:EmailLedgerGdprParticipant(emailLedger) erases/exports rows by the user id's address and the directory's recorded email;IGdprParticipant.order()makes the user directory run last so the address is still readable.
Recipient domain policy and flood brake (review follow-up)
eddi.mail.notify.allowed-recipient-domains(NotifyRecipientPolicy,engine/mail): exact domains,*.domainfor subdomains,*for any; unset = the domain ofeddi.mail.smtp.fromand its subdomains. Recipients are set by anyone with EDIT on an agent while the mail leaves through the operator's relay under the operator's sender, so without a bound the relay was an open mailer for agent authors. Enforced at send time on every attempt (the row endsSUPPRESSED,RECIPIENT_NOT_ALLOWED,outcome=not_allowed) and at save time inHitlConfigValidation— refused when a mailer is configured, accepted with a WARN when not (read throughConfigProvider, since the validation is static). A malformed entry fails closed: nobody is mailed, ERROR at startup.eddi.mail.notify.max-per-recipient-per-hour(default 30):IEmailMessageLedger.countCreatedSince(recipient, kind, since)counts the recipient's non-suppressedNOTIFYrows of the last hour across the cluster (new index(recipient, kind, createdAt)on both stores); over the limit the row isSUPPRESSED(RATE_LIMITED,outcome=rate_limited) and each instance logs one WARN per recipient per hour, naming it by hash. Suppressed rows do not count, so the window empties once the flood stops. Count and insert are two steps, so concurrent pods can overshoot by a few.Docs (
hitl.md,configuration-reference.md,metrics.md), the Manager hint and the operator prompt say so; operator revision stays 37 (one PR) with the new fingerprint.
Manager and the Platform Operator
The agent's Human-in-the-Loop settings gain "Email people when this agent waits for approval" with a recipients field (
agent-config-sections.tsx, parser inlib/hitl-notify.tsmirroring the save-time rules: 1–20, plain ASCII, no duplicates). As with the approval timeout, an unsavable list never enters the draft; the field shows what is wrong. Eight newagentDetail.hitlNotify*keys in all 11 locales.Operator prompt (
system-prompt.ts): how email notifications are set up — the operator'seddi.mail.smtp.*, the agent'shitlConfig.notify.email.recipientsin the Manager (the operator cannot writehitlConfig), what the mail contains, why there is no "all approvers" switch. No new endpoint, sotool-scopes.tsis unchanged. Operator revision 36 → 37.Docs:
hitl.md→ Email notifications (with a sample config),configuration-reference.md→ Email,metrics.md,security.md→ the operator policy,connections.md,gdpr-compliance.md,compliance-data-flow.md.
For Phase 2 and 3
The ledger API is the one they extend: add inbound states and a stranded-turn query to
IEmailMessageLedger,Kind.REPLYrows get their own worker (claimDuetakes a kind),sourceRefcarries the conversation step a reply is rebuilt from. The unique(integrationId, direction, messageId)key is already the inbound dedup key.The SMTP client is
SystemMailerfor operator relays only; a channel's author-configured SMTP must useSafeSocketConnector.resolve(the author policy), notresolveOperator.Group discussions (
AWAITING_APPROVAL) are not notified yet;GroupHitlCoordinatorcommits group pauses in three places and would need its own event.
✨ feat(mail): mail core, socket guard and bare OAuth tokens — email Phase 0 + 0b (2026-10-24)
Repo: EDDI (feat/email-mail-core)
The first slice of the email plan (Phase 0 and 0b): a pure library under engine/mail that later phases (notifications, trigger mode, conversation mode) and the mail RAG source (rag-ingestion-source-types-plan.md §8) build on. No channel, no transport, no conversation code — nothing here is reachable from an agent yet.
What changed and why
Angus Mail (
org.eclipse.angus:angus-mail2.0.5,jakarta.mail:jakarta.mail-api2.1.5 — the versions the Quarkus BOM manages, so one copy on the classpath; EPL-2.0 / GPL-2.0-with-CPE / EDL-1.0) for MIME grammar.MimeMessageParser: raw RFC 5322 bytes →InboundMail. Every limit (MailLimits: raw bytes, header bytes, nesting depth, part count, attachments, per-attachment bytes, output characters) is enforced before the work it bounds — multipart delimiters are counted in the raw bytes before Jakarta Mail materialises a part, so a few KB declaring thousands of parts is refused, not allocated, and a base64-encoded multipart (which would hide its delimiters) is skipped.text/plainpreferred, HTML converted as fallback. Broken and unknown charsets, RFC 2047 words (split multi-byte, unknown charset), unparseable dates and invalid addresses becomeMailAnomalyvalues, never exceptions. A message without a Message-ID getssha256:<hex of raw bytes>, flaggedsyntheticMessageId. Executables (by name, type and magic bytes) never carry content; archives are flagged, never expanded;message/rfc822is never walked into.multipart/reportDSNs are parsed into aDeliveryReport(recipient, action, status, original Message-ID) for later bounce suppression.AddressNormalizer(lower-case, IDN→ASCII, no dot/+tagfolding, no domain literals or numeric TLDs),QuoteStripper(trailing>blocks with en/de/fr/es/it/nl attributions; Outlook header blocks in en/de/fr; Gmailgmail_quote, Apple/Thunderbirdblockquote type=cite+moz-cite-prefix, Outlook web markers — interleaved inline replies, forwards and quote-only messages are kept whole),AutoReplyDetector(RFC 3834,X-Autoreply/X-Autorespond,Precedence,List-*, null/daemon return paths, reports),PlainTextMailRenderer(text/plainUTF-8format=flowed, threading headers with a capped References chain,Re:without stacking,Auto-Submitted,X-Auto-Response-Suppress: All, random<eddi.<uuid>@domain>ids, and a refusal of any header value containing CR/LF or another control character).HiddenContentFilter, run byHtmlToMarkdownConverter, in two modes. Page mode (convert(), every existing caller — crawler, file upload,WebScraperTool) is conservative: only HTML comments, text of 1px or less, transparent text, and text the colour of a background set explicitly on it or an ancestor are dropped. Accordions,hiddentab panels,opacity:0fade-ins, off-screen skip links andsr-onlytext — what pages hide until script reveals it, and what a knowledge base wants — are kept. Mail mode (convertMail) is strict, since mail runs no script: alsodisplay:none, opacity ~0,mso-hide, zero-size + overflow hidden, off-screen,clip,scale(0),hidden, inheritedvisibility:hidden,display:none/visibility:hiddenrules in<style>outside@media(HiddenStylesheetRules), and an assumed white page with black text.convertMailalso skips themain/articlescoping and the<title>.Linear on hostile input. Style blocks are read by one forward
indexOfscan (no backtracking regex) and matched in one pass against an index of rules; nothing is truncated, so a hiding rule after megabytes of junk is still applied. Where exact matching would cost more, it over-approximates (rightmost compound selector only; an element more than 64 hiding rules could apply to counts as hidden), which can only remove more. The quote stripper's Outlook-header search computes subtree text sizes bottom-up and its top-level searches skip matched subtrees. jsoup 1.23.2 itself caps tree depth at 512 (deeper elements become siblings).ALTERNATIVES_DIVERGE: when amultipart/alternativehas both parts, the plain text (what the agent reads) is compared with the HTML as rendered, hidden content removed (what a reviewer sees), by word sets in both directions; a substantial difference adds the anomaly.text/plainstays the preference.SafeSocketConnector(engine/net): the socket-level SSRF guard the RAG plan §3.10 proposed. DNS names only (every IP-literal spelling refused), IMAP 993/143-STARTTLS and SMTP 465/587-STARTTLS only, optionaleddi.email.allowed-hosts, resolved once with every address checked byUrlValidationUtils.isPrivateAddress, pinned to the first address (PinnedSocketignores a library's second lookup), TLS always verified, timeouts.angusProperties(endpoint)wires Angus Mail to it withsocketFactory.fallback=false; a loopback smoke test proves Angus connects through it, requires STARTTLS before any credential, and does not fall back.ConnectionResolver.resolveAccessToken: the bare access token forXOAUTH2, OAuth connections only (STATIC,BASIC,CALLER_SUPPLIED→UNSUPPORTED_PLACEMENT), with the allowlist,PER_USER/VERIFIEDrules and the shared token supplier (refresh, caching) unchanged.
For the next phases
InboundMail.authentication()isNOT_EVALUATEDuntil the DKIM verifier attaches a verdict withwithAuthentication; onlyALIGNED_PASSauthenticates. The verifier must also treat theMULTIPLE_FROMandDUPLICATE_SINGLETON_HEADERanomalies as unauthenticated. Raw bytes are not kept inInboundMail; the verifier gets them from the transport.baseUrlAllowlistholds http(s) origins only, soresolveAccessTokenrefuses animaps://target today (fails closed). The IMAP phase must teach the connection model (and the Manager's mirror inconnection-validation.ts) mail origins.Private-address mail servers (on-premises Exchange) are refused, with no override yet.
Files: engine/mail/, SafeSocketConnector.java, HiddenContentFilter.java, HiddenStylesheetRules.java, ConnectionResolver.java, security.md, configuration-reference.md, rag.md, fixtures under src/test/resources/mail/.
✨ feat(llm): expression guardrail — a deterministic check over a JSON answer (2026-10-24)
Repo: EDDI (feat/llm-expression-guardrail, from main at 5028af0a3) — item E1c of the evaluated-generation plan. Independent of the judge guardrail (#1121, feat/llm-judge-guardrail): it builds only on what main has (ContentGuardrail, GuardrailVerdict.violation(reason, hint), GuardrailUndecidedException, failMode).
What changed and why
A well-formed answer can still be wrong: an invoice whose total is not the sum of its lines passes responseSchema and json-object. expression (output only) parses the answer as JSON and evaluates an author-written boolean expression over it, and reprompts with author-written feedback — the deterministic sibling of the judge.
SafeJsonExpression(ai.labs.eddi.utils, new) — a small recursive-descent language in the style ofCalculatorTool.SafeMathParser: number/string/true/false/nullliterals; paths (invoice.total,lines[0].amount,invoice['due-date'],$for the answer itself) with a[*]wildcard that yields a list;+ - * / %onBigDecimal(34 significant digits,0.1 + 0.2 == 0.3is true);== != < <= > >=(not chainable);&& || !with short-circuit; parentheses; nine functions —sum,count,min,max,len,abs,round(x, n)(half-up),exists(path),approx(a, b, tolerance). No script engine, no expression library, no reflection, no Qute; an unknown function is a compile-time error. JDK-only and Java 17 syntax so ClusterFuzzLite can compile a vendored copy.Null semantics: a missing path and a JSON
nullare bothnull;== null/!= nulltest it; any other comparison withnullisfalse; arithmetic, logic or a function onnull, a type mismatch, division by zero, an emptymin/maxand an out-of-range number are evaluation errors — could not decide, neverfalse.exists(path)tells a present key holdingnullfrom a missing one.Bounds: expression ≤ 2000 characters, nesting ≤ 32, ≤ 500 parts, ≤ 32 segments per path (all refused at compile time with a position, never a
StackOverflowError); ≤ 10,000 values per path, ≤ 200,000 steps per evaluation; numbers beyond 1000 digits or a ±1000 scale refused rather than materialised.ExpressionGuardrail(modules/llm/guardrails/impl, new bean, picked up byGuardrailService's type index) — parametersexpr,issue([A-Z][A-Z0-9_]{0,39}),fix(≤ 1000 characters), all required and checked invalidate()at deploy (parameter 'expr' is not valid at position 21: '=' is not an operator; compare with '=='). Compiled expressions sit in a bounded Caffeine cache (512, refusals cached too). The answer is read withModelOutputParser(fence and prose tolerant) over its own exact mapper: decimals asBigDecimal, integers asBigInteger, duplicate keys refused. Verdicts:true→ allow;false→VIOLATIONexpression_failed:<ISSUE>with a hint that is EDDI's fixed frame (the judge guardrail's wording) around the author'sfixonly; not JSON / > 262,144 characters / duplicate key →GuardrailUndecidedExceptionexpression_unparseable; evaluation error or a non-boolean result →expression_undecided:<cause>(the evaluator's own codes).failModedecides as for every type.Fuzzing:
SafeJsonExpressionFuzzTest(Jazzer@FuzzTestover expressions and over JSON data, plus seeded random sweeps that run in every unit-test run) and a ClusterFuzzLite targetSafeJsonExpressionFuzzer;.clusterfuzzlite/SafeJsonExpression.javais the vendored copy, and theVendored Fuzz Sources In Syncguard knows the fourth file.Docs: langchain.md (grammar, semantics, bounds, the invoice example and the exact corrective message), security.md (sandboxed evaluator, closed vocabulary, fuzz targets), security-review.md.
End-to-end proof:
ExpressionGuardrailITruns a real agent against a WireMock fake OpenAI endpoint: pass (also from a code fence), fail then repair (the second request carries the fixed frame around the author'sfixand no computed value), exhausted reprompt andblock/warnactions, non-JSON, duplicate-key and null-operand answers under bothfailModes, exact decimal arithmetic (0.1 + 0.2 == 0.3, a one-cent difference caught), and deploy refusal for a syntax error, an over-long or over-deep expression, sandbox escapes and a bad issue code or fix.
Design decisions
A new evaluator, not
ExpressionProvider(plan §9.1): that is the NLP expression grammar, with no arithmetic or paths into JSON.PathNavigatorhas only+/-on path values, no comparisons, logic or aggregates.Could not decide is the safe default for anything ambiguous. A missing amount inside
sum(...)is not skipped, comparing a number with a string is notfalse: both are undecided, so areprompt/blockguardrail withholds the answer (fail closed) unless the author setfailMode: open.Closed vocabulary: nothing read or computed from the answer — not the sum, not the total — reaches the corrective message. Only the issue code (author-declared, pattern-checked) reaches the audit reason.
Duplicate keys are unparseable, so the check and a downstream reader of
convertToObjectcannot see two different totals.No new meter;
eddi.guardrail.triggeredcounts the action as for every type.
Manager and operator
The guardrail editor offers
expressionon the output side (guardrails.ts: type list, phases, no-rewrite set, list-row summaryISSUE · expr, type text). Its sheet has fields forexpr,issueandfix, andexpressionProblems()mirrorsvalidate()'s refusals (required, length caps, the issue-code pattern) as warnings; the expression's syntax is left to the server, which names the position at deploy. 16 newllmEditor.grExpr*/grTypeExpression*keys in all 11 locales. Tests:guardrails-expression.test.tsand anexpressionblock intask-guardrails-section.test.tsx.The Platform Operator's prompt explains the type (parameters, the language, null rules, the reasons, closed-vocabulary feedback, deploy refusals with a position);
operator-revision.json36 → 37. #1121 also takes 37, so whichever merges second re-bumps.
Next
When #1121 lands,
expressioncan useonExhausted: deliver-bestlike any reprompting type, and itsHINT_HEADER/HINT_FOOTERcan be shared with the judge's (same wording today).
✨ feat(llm): judge guardrail and onExhausted: deliver-best — evaluated generation E1a + E1b (2026-10-24)
Repo: EDDI (feat/llm-judge-guardrail) — item E1 (E1a and E1b; not E1c) of the evaluated-generation plan.
What changed and why
A well-formed but wrong answer passed every output guardrail EDDI had: the built-ins check shape and patterns, the classifier checks safety. E1a adds a check on meaning whose feedback says what to fix; E1b lets a quality check that cannot be satisfied deliver its best attempt instead of a block message.
GuardrailModelClient(modules/llm/guardrails/impl, package-private) — the classifier's model-call machinery, extracted rather than forked:ChatModelRegistryprovider build with parameter pass-through (vault and${vars}resolved by the registry),timeoutMscapped at 60 s and bounded by the turn deadline, the virtual-thread executor,promptTemplaterendering with the screened text as data only ({input},{output},{context}),includeRetrievedContext, pricing frominputPricePer1M/outputPricePer1M, the unavailable/unparseable mapping (provider messages never propagated) and the per-call timer.ClassifierGuardrailnow delegates to it; its behaviour, reasons, metric and test surface are unchanged (all 54 of its tests pass untouched). Each type passes its timer as() -> Timer.builder(METRIC_DURATION)soMonitoringSeriesstill finds the meter where it is named.JudgeGuardrail(judge, output only,screensHistory()false) — parametersprovider,promptTemplateandissues(a JSON object of issue code → author fix text; 1–20 codes matching[A-Z][A-Z0-9_]{0,39}, fix text non-blank and ≤ 1000 chars, duplicate codes refused), plus the shared ones and a per-guardrailjsonResponseFormatoverride. After the rendered template EDDI appends a fixed instruction listing the codes and the reply shape{"issues": [...]}. The request carries a JSON response format per request throughJsonResponseFormatPolicy— with the codes as anenumschema where the provider enforces one — never baked into the cached model. The reply is read withModelOutputParser(fence, prose around the object), codes matched case-insensitively. Only a parsed empty list passes; any other shape or an undeclared code isjudge_unparseable, an unreachable or slow judgejudge_unavailable—failModeapplies.Closed-vocabulary feedback. A finding is a
VIOLATIONwith reasonjudge_failed:<CODE>[,<CODE>…](declaration order) and a reprompt hint made of EDDI's frame and the author's fix texts for those codes only.GuardrailService.correctiveMessageis untouched, so its invariant — never the user's or the model's text — now also holds for judge output.GuardrailVerdict.issues— a sixth record component (the 5-argument constructor stays), plusGuardrailVerdict.issues(...)andseverity()(0 = nothing found, the code count for a grading guardrail, 1 for any other finding).GuardrailConfig.onExhausted—block(default; also when unset) ordeliver-best, plusdeliversBest()(not a bean getter, never serialized). InGuardrailService.runOutput, adeliver-bestreprompt guardrail records every attempt it rates; when it may not reprompt again (retries spent, no reprompter, or a reprompt that cannot start) the attempt with the lowest severity is delivered — ties to the later attempt, so a binary guardrail delivers the last — with awarnoutcome, reason<reason>:delivered_best,retryCount= reprompts sent. That attempt is then re-screened by the output guardrails after the exhausted one, with no further reprompts — the ones before it already screened that attempt in the pass that rated it, so each guardrail sees it once and a model-backed one is called once:redactstill rewrites,warnstill records,blockandrepromptfindings block. The re-screen's outcomes are held back until it ends, so the:delivered_bestwarn is recorded only for an attempt that was actually delivered; a blocked one leaves the re-screen's records and the block, each counted once. A guardrail that could not decide is not "exhausted": itsfailModeapplies as before. Because this lives inrunOutput, it covers every mode output guardrails run in — plain, streaming (buffered), tool loop, cascade, HITL resume — and audit records, the ledger, SSEguardrail_triggeredandeddi.guardrail.triggeredstay on the oneemitpath.Deploy time.
GuardrailService.validaterefuses an unknownonExhausted,deliver-beston any action butreprompt, anddeliver-beston input guardrails;JudgeGuardrail.validaterefuses a missingprovider/promptTemplate/issuesand a malformedissues. NewGuardrailService.warnings/ContentGuardrail.warnings(default none) are logged byLlmTask.validateGuardrails:deliver-beston aclassifier, an unpriced judge, and a judge on the task's own provider and model (self-judging bias) — risks the plan's §8 lists.Metric: timer
eddi.guardrail.judge.duration{provider, outcome}(pass,fail,unparseable,unavailable,timeout), mirroring the classifier's, with a panel on the Full Metrics dashboard next to it;eddi.guardrail.triggeredcounts the actions as before.Docs: langchain.md (type row,
onExhaustedfield row, thejudgesubsection, When the retries run out), security.md (closed vocabulary; a quality check never overrides a safety check), metrics.md.
Design decisions
Deviations from the plan, and why. (1)
onExhausted: "block"is accepted on any action (it is the default and changes nothing); onlydeliver-bestis refused outsidereprompt, and also on input guardrails, where a reprompt blocks. (2)deliver-bestalso applies when no reprompt can run at all (no reprompter, out of time, open circuit), not only whenmaxRetriesis spent — in each case the guardrail has nothing further to try. (3) An attempt the guardrail passed but another guardrail later sent back is still a candidate with severity 0; if chosen, the re-screen decides. (4) A per-guardrailjsonResponseFormatparameter was added as the escape hatch for providers the matrix does not know, mirroring the task setting. (5) The judge's defaulttimeoutMsis 5000, not the classifier's 3000: a grading LLM is slower than a safety classifier. (6) The fix texts are also listed in the judge's instruction, so the judge knows what each code means. (7) The prices-missing and self-judging notes from §8 are WARN logs at deploy, not refusals.The judge's free text never travels. Extra keys in the reply object are ignored, never forwarded; only declared codes are kept, mapped to their declared spelling.
Unusable
issuesat run time (a config that bypassed deploy validation) isjudge_unavailable, before any model call.
Manager
The guardrail editor offers
judgeon the output side (guardrails.ts: type list, phases, no-rewrite set, row summary, type text) with its own settings panel: provider, base URL, model and API key (shared with the classifier panel through a newModelCallFields, so both write the provider's own model and credential keys), the required prompt template, an issue-code editor (rows of code + fix text, written back as theissuesJSON string; codes upper-cased; a stored value that is not an object of strings is shown raw rather than rewritten; duplicates stay visible and are reported), timeout (default 5000) and prices (sharedCallLimitFields), retrieved context, and warnings mirroring the deploy checks (missing provider, template or codes, malformed codes, unpriced judge).onExhaustedis a select under Max retries on an outputrepromptguardrail:blockis stored as absent,deliver-bestas set, and switching the action away fromrepromptdrops it (as it dropsmaxRetries).deliver-beston aclassifiershows the same warning the deploy logs.28 new
llmEditor.*keys in all 11 locales. Tests:task-guardrails-section.test.tsx(+11) andguardrails-judge.test.ts(5).
Platform Operator
system-prompt.ts: the guardrail bullet listsjudgeandonExhausted(what deliver-best delivers, that it is re-screened, what the deploy refuses and warns about); a newjudgebullet covers its parameters, theissuesformat, the closed-vocabulary reprompt, the could-not-decide reasons and failMode, cost and the timer, and the self-judging note; the docs pointer names the new topics. No allow-list change: the operator already edits LLM configs throughPATCH.operator-revision.json36 → 37.
Tests and checks
JudgeGuardrailTest (47: parsing — fenced, prose-wrapped, undeclared codes, wrong shapes, oversized replies; closed-vocabulary hint and corrective message; template data; native schema enum, provider matrix and override; parameter pass-through; cost; unavailable/timeout/deadline; failMode both ways; validate bounds; warnings), GuardrailServiceDeliverBestTest (13: selection, ties, default block, re-screen with redaction, block and reprompt, deploy refusals and the classifier warning), LlmTaskGuardrailsTest (+5: acceptance reprompt with the author's fix text and judge cost in audit:cost; deliver-best in plain chat with PII redaction, SSE and audit records; tool loop; cascade; configure refusals), GuardrailConfigDeserializationTest (+1). Mutation-checked: free judge text in the hint, an undeclared code accepted, a missing issues field read as a pass, the re-screen removed, and a reprompt finding let through the re-screen — each fails the suite.
End-to-end:
JudgeGuardrailIT(9, Mongo) runs a real agent against a WireMock OpenAI endpoint that plays both the task model and the judge (told apart by the request'smodel): a pass (judge reply in a code fence), fail-then-repair (the second task-model request carries only the author's fix text for the found code, never the judge's free text; call counts per model asserted), exhaustion withdeliver-best(fewest codes wins) and with the defaultblock, and bad judge output (unparseable reply, undeclared code, HTTP 500) underfailModeclosed and open. Outcomes are read back through the conversation REST API and the audit ledger.Review fix (docs):
deliver-bestis re-screened only by the guardrails after the exhausted one, so on aclassifierit delivers what that classifier flagged.docs/security.md,docs/langchain.mdand the operator prompt no longer claim a classifier is never bypassed; a safety classifier should keeponExhausted: "block". Operator revision stays 37, fingerprint updated.Merge with
main(#1130, history-replay protection). Conflicts inGuardrailService(both sides added methods next tovalidate: this branch'sonExhaustedProblem/warnings,main'sanySkipsHistory— all kept),LlmTaskGuardrailsTest(an import) andoperator-revision.json. Two semantic fixes the auto-merge did not show: #1130 taughtrunOutputto act on a fail-open guardrail's partial finding (GuardrailUndecidedException.partialFinding), and the deliver-best re-screen now does the same, so a pattern list that timed out part-way still applies its rewrite to the delivered attempt (GuardrailServiceDeliverBestTest.partialFindingStillApplies); andClassifierGuardraillost its lastTimeUnituse to #1130'sRegexDeadlineswitch, so the import went. The operator prompt keeps both sides' additions;operator-revision.json37 → 38.
feat(manager): Feedback page, rating triage and rating controls (2026-10-24)
Repo: EDDI (feat/conversation-ratings) — PR 3 of planning/conversation-rating-plan.md (§8 and §0.1 "Admin — triage")
What changed and why
The people running an agent can now see and triage what people said about it, in the Manager.
Feedback page
pages/feedback.tsxat/manage/feedback(route registry, sidebar,SCREEN_ROLESadmin+editor). "Needs attention" first (NEW ratings that are low or commented, newest first) with per-row Mark reviewed / Reopen, internal note (≤ 2000), Open conversation (only whencanOpenTranscript) and bulk review; "All ratings" with URL-synced filters, KPI tiles against the previous period, trend, distribution, top reasons, a by-version table greying buckets under 10 ratings, CSV export honouringX-Ratings-Truncated. A non-administrator is asked to pick an agent instead of hittingAGENT_ID_REQUIRED; a 409RATING_CHANGEDreloads and says so. Components undercomponents/feedback/.Attention badge on the sidebar entry and a dashboard tile, administrators only, sharing one
ratingKeys.attentionquery polled every 30 s.Agent editor:
rating-config-section.tsxfor everyratingConfigfield;lib/rating-config.tsmirrorsRatingConfigValidatorand the page refuses to save invalid values. Agent detail gets a 30-day feedback strip; conversation detail shows the conversation rating, review status and per-step reply thumbs.Manager chat gets the Chat UI's rating controls (
chat-rating.tsx,use-chat-ratings.ts,chat-rating-steps.ts); snapshot messages now carrystepIndex.API/hooks:
lib/api/ratings.ts,hooks/use-ratings.ts,ratingKeysinquery-keys.ts.ApiClientErrornow carries thecodeof an{error, message}body (with tests), so callers branch onAGENT_ID_REQUIRED/RATING_CHANGED/RATING_WINDOW_CLOSEDrather than on translated text.Backend: the
/ratingsendpoints takeconversationId(filter + both stores + tests), so the conversation view does not list everything.MSW:
test/mocks/rating-handlers.tswith an in-memory store shaped likeRatingRow; e2e spece2e/feedback.spec.ts. i18n: 146 keys in all 11 locales.
Design decisions
No chart library is added: the trend and distribution are plain markup in the house style (as the Workforce analytics are), with numbers in text for screen readers. KPI tiles reuse
StatCard.Bulk review of a selection PATCHes row by row (each conditional on the rating not having changed); "mark everything here" uses
POST /ratings/reviewwith the same filter.The CSV download uses raw
fetch(blob body and a response header to read) withapi.getAuthHeader(), likebackup.ts.The Manager chat offers the card after End conversation (when
askOnEnd) because it does not track the ENDED state otherwise; prompted-once state is per page, not persisted.
Not done here
The Playwright spec could not run locally (the installed Chromium build is older than the one Playwright 1.64 expects); CI's UI Manager E2E (MSW) runs it. MCP tools and the Platform Operator are PR 4, alerts PR 5.
feat(ratings): MCP rating tools and Platform Operator read access (2026-10-24)
Repo: EDDI (feat/conversation-ratings) — PR 4 of planning/conversation-rating-plan.md
What changed and why
Ratings can now be read and triaged from an MCP client, and the Platform Operator can answer questions about them.
MCP —
McpRatingTools:list_conversation_ratings(every/ratingsfilter incl.needsAttention,reviewStatus,conversationId;sort,index,limit),summarize_conversation_ratings(groupBy),count_ratings_needing_attentionandreview_conversation_rating(REVIEWED / NEW and a note). Registered inMcpToolFilter; 89 → 93 tools, 292 arguments of which 128 are required.Operator —
tool-scopes.tsallow-listsGET /ratings,GET /ratings/summaryandGET /ratings/attention-count;system-prompt.tsgains a ratings section (what a rating holds,ratingConfigand its defaults, needs-attention,AGENT_ID_REQUIRED, how to answer "how is agent X rated since version N"), gated on a newgrantsRatingReadspredicate. Operator revision 39 (37 when written; main had meanwhile claimed 37 too, so the merge made it 38, and clarifying the date-onlytoin the prompt made it 39).Docs — MCP Server (section, count, Author tier row), Conversation Ratings, and a "Feedback from users" section in the
eddi-adminClaude Code skill.
Design decisions
Access is the REST rule, run for the MCP caller. The tools inject the in-process
IRestConversationRatingAdminbean — the patternMcpAdminToolsuses withIRestAgentAdministration— not the loopback REST client, which sends no credentials (401 with authorization on, no scoping with it off). That bean'sResourceAccessGuardandConversationAccessGuardread the request'sSecurityIdentity, i.e. the MCP caller: admin sees everything, an editor names an agent it holdsEDITon,userIdfor admins only,canOpenTranscriptas on REST. Nothing is re-implemented, so MCP cannot drift from the Feedback page.Tier
McpRoles.AUTHOR(admin, editor) — equal to the REST@RolesAllowed, pinned byMcpRoleTierParityTest(IRestConversationRatingAdminadded to the mirrors).eddi-viewerstays out.Reviewer = the caller's plain principal (
callerActor), as on REST — not the HITL tools'mcp:<principal>form — so one person is one reviewer whichever surface they triage from.Errors keep the REST codes as
errorCode(AGENT_ID_REQUIRED,RATING_CHANGED,INVALID_PARAMETER, …). A guard refusal (io.quarkus.security.ForbiddenException) is mapped toFORBIDDENexplicitly: left totoolFailureit is not "caller-facing" and would surface asINTERNAL.No writes for the operator.
PATCH /ratings/{ratingId}andPOST /ratings/reviewrecord the caller as the person who looked at the feedback, and a bulk review empties the queue in one call — that judgement stays with a human on the Feedback page.GET /ratings/exportis atext/csvdownload of up to 100,000 rows (userIds included for an admin) that no chat answer needs. Both are documented as deliberate exclusions in the allow-list.MCP export and bulk review are left out too; both stay REST and Manager only.
Tests
McpRatingToolsTest(13) wires the realRestConversationRatingAdminwith mocked guards and store: role tier,AGENT_ID_REQUIRED, missingEDIT, userId redaction, admin cross-agent listing, grouping and the attention filter, reviewer from identity,NOT_PERMITTEDfor an agentless rating,RATING_CHANGED/RATING_NOT_FOUND, bad requests, non-leaking internal errors. Mutation-checked: 8 of 8 mutants killed by a test failure (role tier widened, role gate dropped, guard refusal not mapped to FORBIDDEN, agentId / needsAttention / conversationId not forwarded, REST code lost, empty review accepted).McpRoleTierParityTest,McpToolContractTest,McpToolFilterCoverageTestandSkillToolReferencesTestupdated (ratingConfig,canOpenTranscriptexempted as config/result fields).Manager: operator
tool-scopesandsystem-prompttests for the grant, the excluded writes/export and the gated section.
✨ feat(httpcalls): forEach — one call per element, every result collected (2026-10-24)
Repo: EDDI (feat/step-checks-foreach) — item E5 part A of the evaluated-generation plan
What changed and why
preRequest.batchRequests only works with fireAndForget, so a call that needed one request per element of an array threw every response away. An httpcall now takes an optional forEach block that sends the call once per element and stores what each element produced — index, ok, httpCode, body or error, timedOut, sent, attempts, bodyDropped — as one array under responseObjectName, in source order whatever order the items finished in. postResponse runs once with 200 when every item succeeded and 207 (Multi-Status) when any failed, so property instructions gated on the default codes only see complete results unless the author opts in.
New field, not an extension of
batchRequests. A stored config withbatchRequestson a call that waits for its response sends exactly one request today; reusing the field would have turned it into N requests silently. WithoutforEachnothing changes, andforEachis refused (400) together withfireAndForgetorbatchRequests.Bounded four ways.
maxItems(the batch default 100 and ceiling 1000, refused as a whole before anything is sent),maxConcurrency(default 1 — the load the same calls written one after another would send; at most 16, on virtual threads), the turn deadline per item (an item whose turn comes after it is not sent), and memory: each body is capped bymaxResponseSizeInBytesand all of them together bymaxTotalResponseSizeInBytes(default the same value, so the array gets what one response would).Never abandon paid work. A failing item never cancels its siblings; the pool is shut down, never interrupted;
onItemFailure: "fail"fails the step only after every item finished and the results are stored. When the step stops waiting, queued items are not started at all, so nothing is sent whose result nobody collects.A request that threw is never retried — a timeout above all, since the API may have processed (and billed) it.
retryApiCallInstructionstill applies per item to responses.Security unchanged. Every item's request is built on the turn's thread by the same
buildRequesta single call uses (templating, vault/connection/caller resolution, SSRF check, approval scope); only sending is parallel. The element is bound as template data, never template source. AforEachcall is unpinnable for HITL fingerprints, like a fire-and-forget batch.Seams left for parallel work.
BoundedFanOut.Admissionis asked before each item starts and told when it finished — where the per-conversation cost reservation (E4) plugs in. The fan-out runner is generic, so mcpcalls can reuse it. The deploy-time turn-budget warning counts aforEachcall once per round.
Files: ForEachInstruction.java, ApiCall.java, ApiCallExecutor.java, ForEachItems.java, ForEachItemResult.java, BoundedFanOut.java, ApiCallsConfigurationValidator.java, RestApiCallsStore.java, TurnResilienceWarnings.java, docs/httpcalls.md (also drops a duplicated "Turn deadline" section), the Platform Operator prompt and revision.
What's next
Part B of E5 — checks on httpcall and mcpcall results, reusing the output guardrail types — and forEach on mcpcalls are not in this change; the plan is in the PR description.
End-to-end proof
ForEachHttpCallsIT drives a deployed agent over REST against WireMock: one request per element (templated into path and body, source order, read back from the stored conversation), a filter leaving index gaps, maxItems refusing the whole call before anything is sent, the total-size budget counting UTF-8 bytes of a non-ASCII payload, an empty list sending nothing, a 500 and a timeout not stopping or being retried, 207 gating of postResponse, onItemFailure: "fail" running every item first, and the concurrency bound (1 by default, 2 when configured) observed from WireMock's arrival times.
✨ feat(hitl,groups): humans and groups produce verdicts — revise with the note, rework within a run, stop on a verdict (2026-10-24)
Repo: EDDI (feat/verdict-rework) — item E2 of planning/evaluated-generation-plan.md.
What changed and why
Three places where a check already ran but its verdict could not repair anything now can, each off by default.
1. Single-agent HITL: hitlConfig.onRejection: "REVISE" (decision 9.5: a hitlConfig policy, not a new verdict value). Under the default SKIP a rejected rule pause skips the remaining tasks, as before. Under REVISE, a rejection with a human's note has the same model revise the answer it gave before the pause: one tool-less re-ask over the frozen request that produced the draft (system prompt, history, retrieved context, tool results), the draft as the assistant turn and the note as the user turn, then the pipeline continues from the task after the model's, so a rule that paused on the draft pauses again on the revision. maxRevisionsPerTurn (1..10, default 3) bounds it.
Scope: behavior-rule (
RULE) pauses only. A rejected tool call (TOOL_CALL) is a rejected action, not a rejected answer, and already reaches the model as a tool result with the note; it is unchanged. A rejection without a note, an automated one (system:*), a Slack button (its note is its own attribution), a pause before any answer, an answer from a later task or workflow, an over-cap request, a spend refusal, a model failure, a failedresponseValidationor a guardrail block all fall back toSKIP, andhitl:revision:outcomerecords which.The note is data: concatenated into the user message, never template source. The revision passes
responseValidationand the output guardrails and asks the spend gate first; its tokens and cost are recorded like any answer's.The candidate (
HitlRevisionCandidate) is recorded byLlmTaskonly while the policy is on, stamped with its pipeline position byLifecycleManager, and persisted by the RULE pause as step datahitl:revision:candidate— so it travels through both stores unchanged, is scrubbed of secret input and context with the step, is withheld fromreturnDetailedand from the approver's full snapshot, and is removed when the pause is decided. Capeddi.hitl.revision.transcript-max-bytes(256 KB). The round count rides on the candidate, so the bound holds across re-pauses and reloads.New seam:
IAnswerRevisingTask(implemented byLlmTask) andILifecycleManager.reviseAnswerAt, which runs one task's revision with its audit entry and converts a later task's gated tool call into a TOOL_CALL pause. Output that the draft and the tasks after it wrote is cut back before they run again.Records:
hitl.approvalcarriesonRejection: REVISE; metereddi_hitl_revision_total{outcome}.
2. TASK_FORCE maxReworks (group field, 0..5, default 0). A task that fails VERIFY returns to ASSIGNED with the verifier's feedback (SharedTaskList.reworkTask, the same transition and feedback channel as onTaskRejection: RETRY), the nearest EXECUTE phase runs it again inside the VERIFY phase and VERIFY checks it again, up to maxReworks times per task. Stopped by maxTurns (a round needs one turn per task plus the verifier's) and the cost ceiling; a rework that could not run ends FAILED, never stranded. Not applied when EXECUTE gates tasks for human approval. Counts persist in taskList.reworkCounts (additive, no schema bump: an older pod re-saving drops them, which fails soft). An unparseable verdict keeps the fail-open auto-verify but is now warned and counted (eddi_group_verify_unparseable_total); reworks are eddi_group_task_reworks_total.
3. convergence.mode: "VERDICT" on a repeating phase. The moderator reviews the latest repeat against the question and the phase ends once it passes ({"passed": true} as a JSON boolean; anything else keeps it going). threshold is unused and minRepeats may be 1. "SIMILARITY" stays the default, and an unknown mode is a save-time 400.
Compatibility: stored agent and group configs load and behave identically — onRejection absent is SKIP and captures nothing, maxReworks absent is 0, convergence.mode absent is SIMILARITY with the old minRepeats floor. Old pods ignore the new fields (FAIL_ON_UNKNOWN_PROPERTIES is off). The approval API (REST /resume, MCP resume_conversation, Slack buttons, Manager approvals) is unchanged in shape.
Manager: the agent HITL section gains "When a reviewer rejects" and "Revisions per turn"; the phase editor gains a convergence "Stop when" select (VERDICT hides the threshold, floor 1); Task force settings gain "Reworks after a failed verification". All 11 locales. Platform Operator: a cheatsheet entry for the three settings; revision 36 → 37. Four other open branches (E1c, E4, E5, #1121) also bump operator-revision.json, so whichever lands second must re-bump and refresh the fingerprint.
Docs: hitl.md (new "Revise with the reviewer's note"), group-conversations.md (rework within a run, convergence.mode), llm-resilience.md, metrics.md, configuration-reference.md; three dashboard panels, synced to the Kubernetes copy.
Verification
New tests: LlmTaskHitlRevisionTest, ConversationHitlRevisionTest (including a resume after a JSON and a BSON round trip of the paused snapshot), LifecycleManagerRevisionTest, HitlRejectionPolicyConfigTest, TaskForceEngineReworkTest, ConvergenceVerdictModeTest, plus Manager tests for the three editors. Nine mutants (revision bound, default policy, note requirement, automated decisions, per-task rework bound, maxReworks default, rework turn budget, convergence default mode, boolean-only verdict) are each killed.
End-to-end ITs on MongoDB and PostgreSQL (
HitlRevisionIT,GroupVerdictITand theirpostgres/twins), with WireMock as the model: a rejection with a note revises over the frozen request (the note and the draft reach the model, the candidate and its round count survive the store across both pauses, approval delivers the revision only),no_noteandexhaustedskip; VERDICT convergence stops on a JSON"passed": truewhile prose, a string"true"or a failing judge run every repeat, and an unknown mode is a 400; TASK_FORCEmaxReworkssends a failed task back with the verifier's feedback and persiststaskList.reworkCounts. Not persisting the candidate, dropping the rework feedback and never passing a verdict each fail them.Fix — the raw read leaked the frozen request.
GET /conversationstore/conversations/{id}(the owner's and the Platform Operator's raw read) served the paused step'shitl:revision:candidatewhole, so itstranscriptJson— the compiled system prompt and every tool result — reached anyone allowed to read the conversation, inresultand again in thepossibleResultscopy.ConversationMemoryUtilities.redactRawPendingToolCallsForRead, already the raw surface's single redaction point for the tool-call batch, now also withholds the candidate's frozen input (REVISION_CANDIDATE_FROZEN_INPUT_FIELDS) on every step and the redo cache, keeping the draft and bookkeeping. The other surfaces were already safe:returnDetailed(REST, MCPread_conversation, the Manager's inspector and the/simpleread) drops the key,approval-status?detail=full(REST and MCP) removes the candidate, and the GDPR export carries onlyconversationOutputs.ConversationMemoryUtilitiesRevisionRedactionTest;HitlRevisionITasserts no candidate entry carries the transcript or the system prompt while the revision request still carries it. Not changed, and older than E2: the raw read still servesaudit:compiled_prompt, the LLM task's own audit step data (written on every answered turn while the audit ledger is on), which holds the same compiled system prompt; the IT pins that this is the only place it appears. Whether the raw read should dropaudit:*likereturnDetaileddoes is a separate decision.hitl.mdnow sayshitlDecisionreadsREJECTEDonly until the revision is decided.
What's next
The judge machinery of E1 (#1121) could serve as VERIFY's and VERDICT's verdict parser, and the agent-testing harness's LLM-as-judge expectation should reuse it. A failing VERDICT review is recorded but not shown to the members of the next repeat; feeding it back is a follow-up.
📝 docs(planning): white-labeling plan for every UI (2026-10-24)
Repo: EDDI (feat/white-label-ui)
What changed and why
Added planning/white-label-ui-plan.md: an inventory of every place the Manager, the Chat UI, the backend-served pages, the Platform Operator and the Keycloak login theme show the EDDI brand, and a phased design to replace it with an admin-defined brand without a rebuild or restart.
Design decisions
The brand is one database document edited on a Manager Settings → Branding page.
eddi.branding.*properties seed it, andeddi.branding.locked=truemakes them authoritative for GitOps installs.Delivery stays same-origin: fixed
/branding/*asset URLs with a bundled fallback, a runtime/branding/__brand__.jsplus/branding/brand.css, and serve-time<head>substitution in the HTML shells. The CSP does not change.Technical identifiers (
eddi.*properties,X-EDDI-*headers, storage keys, postMessage types) are contracts and are not renamed."Powered by EDDI" is switchable and on by default. The update check stays opt-in, and its UI is hidden when branded. The docs link is parked.
The branding endpoints are deliberately left off the Platform Operator's allow-list.
Next
Phase 1 of the plan, the backend brand store and delivery.
🎨 feat(branding): brand store, admin REST and same-origin delivery — white-label phase 1 (2026-10-24)
Repo: EDDI (feat/white-label-ui)
What changed and why
Phase 1 of the white-labeling plan: the backend brand store and its delivery to every UI. With no brand set, nothing visible changes. The page is White-Labeling.
Brand store.
configs/branding: oneBrandDocumentper deployment, behindIBrandingStore. It has a MongoDBBrandingStore(collectionsbrandingandbrandingassets) and aPostgresBrandingStore(tablesbrandingandbranding_assets), picked inDataStoreProducers. Images are stored per slot (logo,logoDark,icon,favicon,ogImage, a closed enum); the document holds only theirsha256:hashes. Writes are compare-and-set on the revision.BrandingConfig(@ConfigMapping,eddi.branding.*) seeds every field the stored document leaves unset. Withlocked=truethe properties are authoritative.BrandingServiceis the single entry point (current(BrandRequest)). It resolves locked → document → seed → defaults field by field, and validates writes and the seed with one validator (BrandValidator,BrandAssetValidator); an invalid seed fails startup naming the property. It caches for 30 s with immediate local invalidation, answers 409 on a stale revision or when locked, and writes an INFO audit line.Admin REST
IRestBrandingAdminat/administration/branding(eddi-admin):GET,PUT,DELETE, andPUT/DELETE /assets/{slot}.Public delivery
IRestBrandingat/branding/*(@PermitAll, hidden from OpenAPI): the five images with a bundled fallback, plus__brand__.jsandbrand.css./branding/*joins the static-assets permit list and the micrometer path patterns.Head substitution. The five shells (
manage,welcome,workforce,chat, rootindex.html) carry%BRAND_PRODUCT_NAME%,%BRAND_TAGLINE%and%BRAND_THEME_COLOR%,/branding/*favicons, the brand script and the brand stylesheet.BrandedShellRendererfills them in, HTML-escaped and cached per (shell, revision), for the four shell resources.BrandedShellRoute, a Vert.x route, does the same for the static/,/index.htmland/<shell>.htmlpaths.One JS-string escaper,
JsGlobalScript.__auth_config__.jsand/chat/__config__.jsmoved onto it with byte-identical output.Dev server.
scripts/vite-plugin-brand.mjsin both UIs fills the defaults and serves/branding/*undernpm run devand MSW mode. A test in each UI runs a realvite buildover the real shells and checks that the placeholders survive and thatbrand.csscomes after the bundle's stylesheet. The MSW passthrough list gained*/branding/*.Docs:
docs/white-labeling.md, a White-labeling section inconfiguration-reference.md, andSUMMARY.md.ConfigurationReferenceCoverageTestnow reads@ConfigMappinginterfaces, so mapped properties are held to the same documented-and-real rule as@ConfigPropertyones.ReservedPrincipalsTestclassifiessha256:(the image hash) as a non-principal prefix.Verified through the persistence boundary.
BrandingStoreMongoITandBrandingStorePostgresITshare one contract (BrandingStoreContract). Their first run foundisEmpty()serialized as an"empty"property that the reader then refused, so every stored brand was unreadable;BrandingJsonTestnow pins the round trip without Docker.
Design decisions
Field-wise merge, and a monotonic revision. A
nullin the document means "the seed's value, else EDDI's". Reset writes an empty document under the next revision rather than deleting it, so caches keyed on the revision can never serve a stale page.brand.cssis linked as the first child of<body>, not in<head>. Vite injects the bundle's stylesheet at the end of<head>, so a<head>link would come first and lose to the bundle's.darkblock. The build test pins the order.Per-shell default taglines (
BrandedShell) keep every unbranded description byte-identical. The welcome and chat descriptions differed before branding existed./branding/favicon.icofor the chat shell, which already used an ICO. The favicon falls back to the icon, and the dark logo and og-image fall back to the logo, so a brand with only a logo and an icon leaves no EDDI image behind.The SVG filter is stricter than the plan. On top of
<script>,<foreignObject>,on…=,javascript:and externalhref, it refuses namespace-prefixed elements,<animate>/<set>, entity declarations, character references (which would hidejavascript:from a text check),@importand external CSSurl().brand.cssalso sets--color-sidebar-accent-foreground, so the sidebar accent keeps the brand's contrast pair.Not on the Platform Operator's allow-list (plan R9).
openapi-operations.jsongains the five admin operations.
What's next
Phases 2–7 of the plan, starting with the Manager token cleanup.
🐛 fix(agent-tests): mocked httpcall tools keep their postResponse, runs can be cancelled, replicas stop aborting each other's runs (2026-10-24)
Repo: EDDI (fix/agent-tests-fidelity)
Review follow-ups to the agent regression harness (PR #1065).
What changed and why
An httpcall mocked on the LLM tool path now runs its response handling.
ToolLoopRunneranswered every mocked LLM tool call itself, before any executor, so for an httpcall toolsaveResponse, retries andpostResponseproperty instructions never ran: an agent that sets a property from a tool's response behaved differently mocked than live, and itspropertiesexpectations failed. The call is still decided and recorded once inToolLoopRunner(ToolMockRegistry.decideToolCall); aMOCKEDdecision for an executor that implements the newMockAwareToolExecutor(the httpcall tools ofHttpCallToolsProvider) is handed to it, andApiCallExecutoranswers the call with it — no request built — exactly as it already did for a rule-triggered call. Refusals (unmocked, fail-closed) and every other tool source short-circuit as before. A mocked call is uncached and unpriced.A retried mocked call is recorded once.
ApiCallExecutorintercepted inside the retry loop, so each retry was recorded again and counted againstmaxToolCalls(and a retried unmocked call produced severalunmockedToolfailures). The decision is made once per call, as a retried live call is one call.Cancel.
POST /agenttests/runs/{runId}/canceland the MCP toolcancel_agent_test_run(author tier, EDIT on the agent — what starting one takes) stop a run cooperatively: no further turn starts, a waiting turn is abandoned, its conversations are ended and deleted, and the run ends with the new statusCANCELLED. Before, a run of up to 2,000 turns × 900 s held one of two run slots until the node restarted. Manager: a Cancel run button on a running run, theCANCELLEDbadge and notice (11 locales).Orphan recovery is owner- and heartbeat-aware. At startup every
RUNNINGrun was markedABORTEDand its conversations deleted — wrong when several replicas share one database without cluster mode. A run now recordsownerNode(<nodeId>/<bootId>) and refreshesheartbeatAtevery 30 s; a node aborts only a run of an earlier boot of itself or one whose heartbeat is older than three minutes, at startup and every three minutes.Capacity before the deploy.
AgentTestServicechecked the run slots after deploying the version totest, so a request refused with 429 had already changed what thetestenvironment serves.Reserved test user ids. A conversation started from outside as
agent-test:<liveRunId>:c:rjoined that run's mock session and wrote into its results.OwnershipValidator.validateAndResolveUserIdnow refuses any requested user id in that namespace (403), for an admin and with authorization off too.A permanent delete removes memory checkpoints.
ConversationPurgeService.purge(every permanent conversation delete, not only test runs) left the checkpoints the tool loop writes before every tool call; only GDPR erasure removed them.PostgreSQL IT and a two-turn case.
PostgresAgentTestSuiteITruns the harness IT against PostgreSQL;AgentTestSuiteITgained a two-turn case.Docs.
agent-testing.md: the Manager page is shipped (not a follow-up), the "a mocked httpcall is still built" limitation was wrong and is replaced, cancel and the liveness rules are documented, and test conversations are noted to appear in listings and metrics while a run is in progress.
Design decisions
The mock rides into
ApiCallExecutorin the template data (ToolMockRegistry.TOOL_PATH_MOCK), next to the existingTOOL_PATH_MARKER, rather than through aThreadLocal: the executor runs on the tool-timeout thread.Cancel is node-local. A cancel arriving at another replica answers 409 naming the owner; a cross-node flag would race the heartbeat's whole-document writes.
A run recorded before 6.6 (no owner, no heartbeat) counts from its
startedAt.
Files: ToolLoopRunner.java, MockAwareToolExecutor.java, HttpCallToolsProvider.java, ApiCallExecutor.java, ToolMockRegistry.java, AgentTestRunner.java, AgentTestService.java, AgentTestRunRecovery.java, ConversationPurgeService.java, OwnershipValidator.java, agent-testing.md
🐛 fix(agent-tests): review follow-ups — skew-proof orphan detection, CAS heartbeats, reserved ids at schedules (2026-10-24)
Repo: EDDI (fix/agent-tests-fidelity)
What changed and why
Recovery can no longer abort a live run. Staleness compared another node's
heartbeatAtwith the local clock (clock skew or a short write outage aborted a live run and deleted its conversations), and the "earlier boot of this node" rule needed no heartbeat at all — two EDDI processes on one host share a host-derived node id and aborted each other's runs. Now a run is an orphan only when its heartbeat has not changed across this node's own sweeps for 3 minutes (90 s for the same node id, another boot), timed on the observer's monotonic clock; the sweep runs every minute.Heartbeat, abort and final write are compare-and-swaps on
heartbeatAt(IAgentTestRunStore.updateIfHeartbeat,storeIfFieldEquals). An abort clears the heartbeat; the owner's next beat then fails, and the owner stops the run and writes nothing back — the record no longer flips fromABORTEDtoRUNNING.Abandoned turns. A turn given up on (timeout or cancel) can finish after its conversation was deleted; once it completes, the conversation is deleted again.
Tool calls are recorded after the loop's gates. A mocked httpcall tool (or a live call) refused by the tool budget, tenant quota or turn deadline no longer counts as a call (
ToolMockRegistry.previewToolCall/recordToolCall).Reserved
agent-test:ids are also refused at REST schedule save and at every schedule fire — including a persistent schedule that reuses its stored conversation and a Dream consolidation fire, which never start one — andOwnershipValidatorchecks the resolved id as well as the requested one.A non-
MockResultunder the tool-path mock key never mocks: the call is treated as undecided — refused in a test conversation, sent in any other.Permanent delete removes HITL tool-journal entries too, as GDPR erasure does.
Platform Operator may cancel a run (
POST /agenttests/runs/{runId}/cancel, gated) and knows the terminal statuses; revision 37.i18n:
ABORTEDis "interrupted" in de, es, pt, hi, th and ar, so it no longer reads the same asCANCELLED.
Files: AgentTestRunRecovery.java, AgentTestRunner.java, AgentTestRunStore.java, ToolLoopRunner.java, ScheduleFireExecutor.java, ConversationPurgeService.java, agent-testing.md
🐛 fix(tenancy): the cost gates fail closed on both datastores, and undo no longer refunds spend (2026-10-24)
Repo: EDDI (fix/cost-gate-consistency)
What changed and why
Follow-ups to the tenant monthly cost budget and the per-conversation cost ceiling.
The pre-call cost gate answered a store outage differently per backend.
PostgresTenantQuotaStore.getMonthlyCostcaught theSQLExceptionand returned0.0, so the gate read "nothing spent" and allowed every model and tool call (fail open).MongoTenantQuotaStore.getMonthlyCostdid not catch theMongoException, andLlmTaskasksLlmSpendGateoutside its guarded model phase, so the turn failed instead of serving the fallback answer.tenant-quotas.mdpromised fail closed. Both stores now raiseQuotaAccountingUnavailableException, as theirgetQuotaalready did (ITenantQuotaStoredocuments the contract), andTenantQuotaService.checkCostBudgetturns it into a refusal flaggedaccountingUnavailable, counted oneddi.tenant.quota.unavailable{type=cost}. An exception that still escapes the check is a defect, not an outage.LlmSpendGateand the tool-call gate inToolLoopRunnerboth refuse it (the fallback answer, a tool error result) under a separate reason,tenant_check_error. It is counted oneddi.llm.spend.refusedand logged at ERROR, with the stack trace at most once a minute. It does not pass for an outage oneddi.tenant.quota.unavailable.say → undo → say discarded spend. The ceiling summed
audit:costover the live steps. Undo moved the priced step to the redo cache, and the next say cleared it, so a public/undoreset what a conversation had spent.ConversationMemory.startNextStep()now carries the discarded steps' spend onto the new step asaudit:discarded_cost, a new key inMemoryKeysthat is persisted with the step. The ceiling countsaudit:discarded_costand the redo cache, which a rerun runs against. The snapshot's conversation total counts both as well, so it no longer drops between an undo and the next say; it is read by the Manager, the group cost ledger, Slack and schedule deltas. Redo leaves the total unchanged, and a rerun already added to the step's ownaudit:cost.Undo and redo kept the wrong
audit:pending_cost.TurnCostMeterreads the owed tenant charge from the newest step that has one, and undo and redo reorder those steps. An undone step's pending charge was lost on the next say. A rerun after an undo re-charged an amount the undone step had already recovered. A rerun's own outage charge was then shadowed by the undone or redone step's older value. Undo and redo now copy the pending value of the step they move aside onto the step that becomes current,0.0included. That step always holds the newer of the two values, and both writes are full replaces, so the copy is persisted.Dream charges lost to an outage are carried in
DreamService(node-local, in-process) and added to the next priced consolidation charge. The docs say a restart loses it.Manager quotas page. The cost-budget status checked "unlimited" before "enforced", so a disabled tenant with no budget was told its spend was metered, although
recordCostrecords nothing while enforcement is off. Enforcement is checked first, with a newquotas.budgetDisabledmessage in all 11 locales. Amounts under $1 keep up to four decimals, so $0.006 against a $0.01 cap no longer reads "$0.01 of $0.01 … $0.00 left".TurnCostMeterTest's outage test claimed the marker is left untouched. It advances, as the class documents, and the test now says so and asserts it.ReservedPrincipalsTest(inherited from main) declared the"sha256:"prefix twice, once for brand image hashes and once for mail Message-IDs.Map.ofEntriesrejects duplicate keys, so the class failed to initialise. The two entries are now one, whose description covers both uses.
Decisions
LlmSpendGate.countMidLoopstays onMetrics.globalRegistry. Its caller,ToolLoopRunner, is not a CDI bean and is built without a registry inAgentOrchestratorand a dozen tests. That is the same idiom asLifecycleManager, and Quarkus adds its registry to the global composite. The Javadoc now says so.The old-JSON round trip for
maxCostPerConversationUsdalready existed (ConversationCostCeilingTest.storedConfigCompatibility), so no test was added for it.Not added: an IT of the full deployment path, from a priced model through
ConversationServiceto a refused tool call. The existing IT scaffolding has no priced model to drive through the service. The store-level halves are covered for both datastores inTenantCostMeteringIT: a monthly-cost read that fails at the gate, and say → undo → say persisted through the real conversation store.
Docs: tenant-quotas.md, langchain.md, metrics.md.
🔒 fix(guardrails): a blocked message no longer reaches the model on the next turn (2026-10-24)
Repo: EDDI (fix/guardrail-history-replay)
What changed and why
Review of the input/output guardrails (#1064, #1112) found that a message the classifier guardrail blocked was sent to the main model on the following turn. An input block is served as a fallback; the history builder merges a fallback turn's question into the next user message so roles keep alternating; input guardrails treat that merged text as history, and history is only re-screened by guardrails with screensHistory() == true — which the classifier is not (one model call per history message would multiply its cost). So: an injection blocked on turn N, then "hi" on turn N+1, and the model received the injection. The same path undid a classifier redact.
A durable marker, not re-screening. When an input guardrail blocks — or redacts with a guardrail that does not re-screen history —
LlmTaskflags the stepllm:input_withheld:<taskId>(MemoryKeys.LLM_INPUT_WITHHELD_PREFIX).ConversationLogGenerator.isInputWithheldStepreads it (and, for steps written before it existed, anaudit:guardrail:input:*record with actionblock). Both history paths (ConversationLogGenerator.generatewithskipFallbackOutputs,ConversationHistoryBuilder.generateMessagesFromOutputs) replace that turn's user message — text, extracts and input files — with[earlier message withheld by a guardrail], for every guardrail type. The rolling summarizer's input and the recall tool get the same view throughConversationLogGenerator.modelFacingOutputs. Memory and the human transcript keep the message.Current-turn text is located structurally.
AttachmentForwarderappends extract/note text parts behind the typed text, so "the last text part" used to be the extract: a first-pass redaction was not applied to what the model saw, and the classifier screened the extract instead of the typed text.LlmTasknow records the typed text's content index before forwarding;GuardrailService.runInputapplies the (reused) first-pass result to it and screens each attachment text part after it as this turn's input — recorded, able to block.Bounded author regexes.
regex-filterandprompt-injectionpatterns run through a shared deadline-checking matcher (the classifierlabelPatternone, later folded intoRegexDeadline) with 250 ms per text; past it the guardrail throwsGuardrailUndecidedException("pattern_timeout"), sofailModeapplies — ablockguardrail refuses the text instead of passing it. Both types nowvalidate()their patterns, so an invalid one fails the deploy instead of being dropped (which left a block-only filter that never fires).Spend gate first. The spend gate is asked before the input guardrails and retrieval, so an over-budget turn pays no classifier call or embedding query; every guardrail reprompt asks it again.
postResponseafter an input block. It now runs, as after every other fallback (output block, spend refusal,onError), so aconvertToObject+addToOutput: falsetask whosepostResponsebuilds the reply answers the user instead of showing nothing — and the docs' claim that thefallbackFieldshape is whatpostResponsereads is now true for both sides.History-screening cost is recorded whether or not the guardrail fires.
Review follow-ups
A withheld turn's files stay out too.
AttachmentContextExtractor.attachmentsFromPreviousTurnsskips withheld steps (no re-inlined image, no "files shared earlier" note), andReadAttachmentToolis built withwithheldStorageRefssolistAttachments/readAttachmentcannot hand a blocked file's content back as an unscreened tool result.The current turn is not withheld by its own flag — a second LLM task of the same turn decides it with its own guardrails (both history builders skip the last output index).
Spend gate asked twice: before the input guardrails and again after them, so a classifier's price cannot carry the model call past a ceiling. A turn refused before screening is flagged withheld when a configured input guardrail does not re-screen history (it was never classified).
One regex deadline helper.
BoundedRegexis folded intoai.labs.eddi.utils.RegexDeadline(now with a deadline-preservingsubSequenceandmatcher(...));security.mdlists the guardrail patterns' bound. A pattern timeout in aregex-filterkeeps what the finished patterns found (GuardrailUndecidedException.partialFinding): failing open, aredactkeeps those rewrites and ablockthat matched still blocks.Docs: template data (
{memory.last.input},{memory.past},{conversationLog}, captured properties) is not filtered — don't template earlier user input into a guarded task's prompt orhttpCallbody; a turn on which the guarded task did not run was never classified.Persistence round trip and undo/redo of the flag through the real
ConversationMemory(InputWithheldRoundTripTest); the Platform Operator's guardrail paragraph learned the pattern budget, the deploy-time pattern check and the withheld placeholder.
Deferred: a reprompted answer is still not re-run through responseValidation (its re-ask loop does not return to the output guardrails, so wiring the two together is not a small change); documented in langchain.md.
Files: GuardrailService.java, LlmTask.java, ConversationLogGenerator.java, ConversationHistoryBuilder.java, RegexDeadline.java, RegexFilterGuardrail, PromptInjectionGuardrail, PatternCache, ClassifierGuardrail, ConversationSummarizer, ContextualToolsProvider, MemoryKeys; docs langchain.md.
🐛 fix(webhook): the replay-protection cache could evict live keys, was per node, and a few edges leaked or orphaned (2026-10-24)
Repo: EDDI (fix/webhook-dedup-replay)
What changed and why
Review of the signed inbound webhook channel (#1059) found that its de-duplication - the only replay protection of the github and generic-hmac schemes, and a second line for eddi-v1 - was weaker than documented.
Dedup cache sizing and admission.
webhook-event-deduphad no size entry inCacheFactory, so it inherited the 1,000-entry default and was shared by every webhook integration, each delivery storing up to two keys. About 500 deliveries in ten minutes from any one integration evicted another's keys, after which a captured request ran again. The cache now has its own entry and is rate-sized like the A2A nonce cache (100 keys per second over the 10-minute window, factor-two head-room: 120,000 entries), and the handler refuses instead of evicting (an evicted key is a replayable request, a refused delivery is only a retry), per integration so that one sender cannot push the others out:Each integration has its own budget,
platformConfig.maxDeliveriesPerWindow(default 3000 deliveries per 10 minutes, validated 1 to 100000 at save), counted over a rolling window of 11 one-minute buckets (longer than the 10-minute key lifetime, so a delivery is counted as long as its keys exist). A delivery that is not accepted (429, 503, ...) gives its slot back, so a sender looping on a quota refusal keeps seeing the real refusal. The counters are a bounded Caffeine cache that expires idle integrations.From half capacity, an integration above its fair share (half the cache divided by the active integrations, counting only those with 50 or more deliveries in the window, so throwaway integrations cannot shrink anyone's share) is refused even inside its own budget.
From 90% of capacity every new delivery is refused, whatever its integration holds - a last resort that keeps the cache clear of eviction.
Repeats of remembered deliveries are always answered, and the repeat check runs only when a refusal is pending, so an admitted delivery costs no extra cache read (in a cluster, no extra NATS round trip).
Refusals are their own metric outcome,
refused_capacity(metrics.md, dashboard), and theWARNis limited to once a minute per integration.ICache.size()stays a cheap estimate; the newICache.sizeExact()sweeps expired entries and is read only once the estimate reaches the threshold, so a refusal cannot outlast the data.In a cluster the budgets and the thresholds are per node: the counters are node-local and the cache size read is the node-local view (documented).
Cluster.
webhook-event-dedupjoinsslack-event-dedupin the sharedDEDUPNATS KV bucket (same 10-minute TTL), so a replay is caught on whichever node it hits. With NATS unreachable each node falls back to its own cache, as for Slack.Unsigned routing headers. Binary-mode
ce-type/ce-idand the plain-mode event-type header are outside every scheme's MAC. The replay key is already derived from the MAC alone, so within the window the same signed body is a duplicate whatever header it arrives with (now covered by tests at handler and endpoint level); the page now says plainly that routing headers are unsigned, what that means (tampering in transit can re-route a body without breaking the signature) and what to do (TLS, route on a field of the signed body). No wire-protocol change and no new signing scheme.Orphaned conversations. A
429(or any refusal) from the turn afterstartConversationleft one empty conversation per retried delivery. The conversation just created is now ended when its first turn is refused; a correlated conversation is kept, since the retry reuses it.Weak or plaintext signing secrets. Save-time validation already requires a vault reference, but a ZIP import or direct store write bypasses it, and no length was checked anywhere. The router now refuses to hand the verifier a plaintext secret, a reference that did not resolve (left unchanged by resolution, also with surrounding whitespace) or a resolved one shorter than 16 characters; the verifier independently rejects anything still containing a
${vault:reference (the integration answers401, with oneWARNper integration).Id probing. An unknown integration id answered
404before the signature was looked at. It now answers401with the same body as a bad signature (the log keeps the distinction). The Slack endpoint likewise answers a uniform403for anything it cannot verify.Two meanings of
409. The body now carriesreason:in_progress(retry in 5 seconds) orawaiting_approval(a human has to decide). The status code is unchanged.Behaviour change for 6.6.0 installs: a webhook integration whose vault secret is shorter than 16 characters used to work and now answers
401to every request (as does a plaintext secret that reached the store through import). Find them with the log line "signing secret is shorter than" (one WARN per integration version, repeated after a vault secret change) and rotate to 32 random bytes. Saving such a secret is now refused with 400 when it already exists in the default-tenant vault; references to another tenant are not resolved at save time (that would let any editor probe other tenants' secrets), so the router's runtime check is what covers them.The Platform Operator prompt now knows the new answers (unknown id 401, weak secret 401, capacity 503, 409
reason), operator revision bumped.Group targets still receive only the rendered input, not the event map; documented, not changed.
Files: CacheFactory.java, WebhookEventHandler.java, RestWebhookChannel.java, ChannelTargetRouter.java, webhook-triggers.md.
Design decisions
No new property: the capacity is derived from the window like the nonce cache's, and the refusal threshold follows from it. A property would let an operator size the cache below the traffic it must hold, which is the defect being fixed.
The check for a quota refusal before creating the conversation was rejected: the API-call quota has only an atomic acquire, no read-only peek, and adding one would race. Ending the orphan is the safe equivalent (each attempt still spends a conversation slot).
The shared bucket is not size-capped and the node-local cache that stands in for it is, so in a cluster the thresholds read each node's own view: a sender spread over N nodes may hold N times its budget in total. Reading the exact cluster-wide size is not possible (the bucket cannot enumerate its keys).
Per-integration admission rather than a global refusal: a global threshold let one integration with a valid secret push every other integration to 503. The fair share counts only integrations with 50+ deliveries because the roles that can create integrations (
eddi-admin,eddi-editor) could otherwise shrink everyone's share with many one-delivery integrations.
Tests
WebhookEventHandlerTest: an integration over its budget gets 503 while another still gets 202 (and a remembered repeat is answered); the window rolls over after 11 minutes and a delivery still counts at 10; from half full only the integration above its fair share is refused; the 90% hard stop refuses an idle integration; throwaway one-delivery integrations do not shrink another's share; an admitted delivery performs no extra cache read; refused deliveries do not spend the budget; the WARN is throttled to once a minute;refused_capacityis its own outcome; the refused turn ends its new conversation with its own reason; both409reasons; the same signed body under another event type is a duplicate.RestWebhookChannelTest: unknown or malformed id answers identically to a bad signature; rerouted replay is a duplicate;reasonin the body and noRetry-Afterforawaiting_approval.CacheFactoryTest: explicit, window-derived size; shared through theDEDUPbucket with the matching TTL.CacheImplTest:sizeExact()ignores expired entries.ChannelTargetRouterWebhookTest: plaintext and 15-character secrets are stripped, a 16-character one is kept; the weak-secret warning is logged once per refresh cycle and again after a vault change.RestChannelIntegrationStoreValidationTest: a short existing vault secret is refused at save, other-tenant references are never resolved,maxDeliveriesPerWindowis validated.
docs(llm): point self-hosted servers at openai-compatible everywhere (2026-10-24)
Repo: EDDI (docs/openai-compatible-doc-nits)
Why
Two places written before or alongside the openai-compatible provider type (#1062) still sent self-hosted servers to type: openai + baseUrl, which inherits OpenAI's capability answers (JSON mode with tools, vision by model name) instead of the per-endpoint flags that type exists for.
What changed
docs/langchain.md— the Jlama note ("for a GPU or a larger model…") now points at typeopenai-compatibleand its section instead ofopenai+baseUrl.docs/langchain.md— theclassifierguardrail: theproviderexplanation namesopenai-compatiblefor vLLM /llama-server, and the Granite Guardian on vLLM example uses"provider": "openai-compatible"withserverName: "vllm". Verified first that the classifier passesproviderstraight toChatModelRegistry, where the type is registered, and that its builder delegates to the OpenAI builder, socustomParameters,maxTokensand the rest of the example behave identically.Platform Operator system prompt (
system-prompt.ts) carried the same classifier advice; corrected the same way. Operator revision bumped 36 → 37 (operator-revision.json).
Verification
vitest run src/lib/operator — 16 files, 484 tests passed (run with Node 24; the machine's Node 22.14 cannot start the Vitest worker). DocumentationLinksTest and ChangelogFragmentTest green.
🐛 fix(ci): publish the -b image for a merge that does not touch ui/ (2026-10-21)
Repo: EDDI (fix/ci-docker-push-backend-only)
What changed and why
Since the monorepo split of 2026-09-15 (4f19e4767, "run each half only when it changed"), no merge to main that changed only backend code published a -b image. Build & Test, the integration tests and the E2E runs on the built image all passed, and Docker Build & Push was skipped.
The cause is GitHub's implicit success(). A job condition without a status function gets one added, and for a job with needs it grades every job upstream, not only the listed ones. Docker waits on ui-gate, which is written to pass when the UI did not change (always(), skipped ui-* jobs accepted). On a backend-only push those ui-* jobs are skipped, so the implicit success() of docker was false and it was skipped — and with it Smoke Test and Preflight Verify (Pushed Image), which depend on it. Of the last 25 merges, every backend-only one was affected; tag builds were not, because detect-changes forces ui=true for a tag.
dockerstarts its condition with!cancelled()and grades its ownneedsexplicitly: nofailure,cancelledorskippedresult. That keeps the gate the job's NOTE insists on — every listed job must have succeeded, so a failed or skipped test job still blocks the push, and noalways()is used.smoke-testgets!cancelled() && needs.docker.result == 'success', andpreflight-pushgains!cancelled()in front of its existing condition, for the same reason.
The tag-only jobs (release, Red Hat publish, post-release) are unchanged: on a tag the ui-* jobs always run.
Verification
The history check behind the diagnosis — Docker push outcome against the ui-* jobs for the last 25
mainpushes — lines up one to one.BuildQualityGatesTest#jobsBehindUiGateGradeTheirNeedsExplicitlyfails on any job behindui-gatethat runs on a non-tag push without a status function, and on a docker condition that loses its explicitneedschecks or gainsalways(). Against the oldci.ymlit fails, naming docker, smoke-test and preflight-push.The merge of this branch does not prove the fix: it changes
ci.yml, which theuipath filter counts as a UI change, so its ui-* jobs run and it would publish anyway. The proof is the next backend-only push tomain— it must publish a-bimage and run Smoke Test.
Fix: eddi update on a pre-#1034 Postgres install (2026-10-20)
Repo: EDDI, branch fix/update-backfill-postgres-password
An install made before docker-compose.postgres-only.yml required POSTGRES_PASSWORD has no such line in .env. eddi update refreshed the compose file, docker compose pull and up then failed to interpolate it, and the Windows wrapper still printed "EDDI updated."
install.shandinstall.ps1(theeddiwrapper): after refreshing the compose files, if one referencesPOSTGRES_PASSWORDand.envlacks it, write the legacyeddivalue and print a note. A fresh random value would lock EDDI out of the existing volume, because Postgres reads the variable only at initdb.install.ps1wrapper:updatenow stops with exit code 1 whenpullorup -dfails instead of reporting success.New installs are unaffected: both installers already generate the password.
🐛 fix(hitl): a resume could not re-supply secret context, because loading a conversation dropped secret (2026-10-20)
Repo: EDDI (fix/secret-context-survives-store-load)
What changed and why
Secret context on resume (#1114) refused every resume that re-supplied a secret with 400 — context['userToken'] was not a secret context value in the paused turn — although the paused step was stored with "secret": true and the placeholder. Both conversation stores rebuild a stored context:* entry as new Context(type, value) when they load a conversation, which dropped the flag, and ConversationHitlService.validateResumeContext and Conversation.injectResumeSecretContext both read it from that loaded memory. A resume always loads from the store, so the feature could not work in a deployment; the tests of #1114 and #1116 build the memory in process and never went through a load.
Both stores now keep the flag when they rebuild the entry. Nothing else changes: the stored value is still the placeholder, the re-supplied value lives for the resumed turn only, and that turn stores the placeholder again.
Files: ConversationMemoryStore.java (loadConversationMemorySnapshot), PostgresConversationMemoryStore.java (fixContextTypes).
Tests
MongoConversationMemoryStoreTest,PostgresConversationMemoryStoreTest: a secret entry keepssecret: trueand the placeholder through a real store round trip; an ordinary entry stays unmarked.ConversationMemoryStoreResilienceTest: the same on the MongoDB load path with a mocked collection, so it also runs without Docker.Without the fix all three new tests fail (
expected: <true> but was: <null>).End to end against an image built from this branch (MongoDB, an agent whose gated
POSTtool sendsBearer {context.userToken}): the resume that re-supplies the token now runs the approved call with it, where 6.6.0 answered 400; re-supplying a key that was not secret in the paused turn is still a 400 and leaves the pause; a resume without the token is still refused; neither token is stored in the conversation afterwards.
🔖 chore(release): after 6.6.0 (2026-10-20)
Repo: EDDI (chore/post-release-6.6.0, opened by post-release.yml after the release pipeline published the image)
What
Release pointers: 6.5.0 → 6.6.0 (Helm chart 2.10.0 → 2.11.0)
Build version (pom.xml): 6.6.0 → 6.7.0
Generated by python scripts/bump-version.py post-release 6.6.0. Files:
pom.xmldocs/build-reproducibility.mddocs/developer-quickstart.mddocs/getting-started.mddocs/kubernetes.mddocs/redhat-openshift.mddocs/release-signing.mddocs/setup-eddi-on-aws-with-mongodb-atlas.mdk8s/base/kustomization.yamlk8s/quickstart.yamlhelm/eddi/Chart.yamlsrc/test/java/ai/labs/eddi/deploy/DeploymentManifestsTest.java
📦 chore(deps): Quarkus 3.40.1 → 3.40.1.1 (2026-10-20)
Repo: EDDI (feat/compatible-import-sync, carried on that PR so the patch reaches main with the next merge)
What changed and why
Quarkus platform
3.40.1→3.40.1.1(pom.xmlquarkus.platform.version, the only pin). It is a patch release of the 3.40 LTS line, published 2026-10-19, and contains only dependency and bug fixes:Vert.x 4.5.35 and Netty 4.1.139.Final;
lz4-java 1.11.4, snappy-java 1.1.10.11 and Hibernate Validator 9.1.5.Final;
a fix that makes
rolesAllowedin REST Data PanacheMethodPropertiesinherit from@ResourceProperties, plus smaller REST Data Panache fixes.
No EDDI code or configuration changes were needed.
Verification
Compile with the style gates, the repo-wide guards, and an @QuarkusTest integration test that boots the application, all on the new platform. CI runs the full unit, integration and E2E suites.
📘 docs(integrations): Claude Code plugin with eddi and eddi-admin skills (2026-10-20)
Repo: EDDI (docs/eddi-claude-skills)
The MCP server gives an assistant EDDI's tools. It does not tell the assistant which tools to chain, which configuration mistakes deploy cleanly and then fail, or which calls need a person's approval. A new Claude Code plugin covers that, in integrations/claude-plugin/, with a marketplace entry at .claude-plugin/marketplace.json (/plugin marketplace add labsai/EDDI).
eddi(every role) covers connecting and reading auth failures,discover_agents, keeping one conversation (chat_managedby intent, or passingconversationIdback tochat_with_agent), group discussions (sync and async), approvals bound to thepauseIdthat was read, and the user's own memories.eddi-admin(editor and admin) covers orientation,setup_agent/create_api_agentintotest, and the change path:update_resource→ oneapply_agent_changes→ test → promote. It explains thecompatibledecision, and warns that undeploying withendConversationsends users' conversations, and that MCP cannot edit a workflow itself (adding a step is a Manager or REST change). It also covers agent test runs, intents, schedules, channels and groups. The references cover the change workflow, five config gotchas, a symptom-to-cause debugging table, groups, and the actions that need a yes, including the partial-result semantics of the GDPR tools.Design: the skills split along the MCP role tiers, so an
eddi-usersession never loads authoring tools it would getFORBIDDENon. The skills treat everything EDDI returns as data, never as instructions. They point to the server's ownread_docsinstead of copying documentation, so a skill cannot contradict the running version.No
.mcp.jsonin the plugin: each deployment has its own URL. The Claude Code docs also do not confirmclientId/callbackPortin a checked-in.mcp.json, and without them the client would try dynamic registration, which the shipped realm refuses. The README gives theclaude mcp add --client-id eddi-mcpcommand instead.Guard:
SkillToolReferencesTest(inengine.mcp, reusingMcpToolContractTest's tool scan) fails if a skill names an unregistered tool or a camelCase argument no tool takes, if it references aread_docspage that is missing or that the Dockerfile deletes from the image, if a SKILL.md frontmatter is incomplete, or if the marketplace entry and the plugin name disagree. Writing the skills against the source caught two stale names.create_schedule's description saidcronExpression, but the argument iscron: the description is fixed inMcpAdminTools. And the first draft used the REST parameterendAllActiveConversationswhereundeploy_agent's argument isendConversations. The argument check exists because of that one.Docs:
mcp-server.mdgains a "Claude Code plugin" subsection under Quick Start. The AGENTS.md §4.6 docs item now names the skills, because the guard catches renames but not new capabilities.
Not verified: the skills have not been run against a live server. Operator prompt unchanged: the only server change is one MCP tool description, which the operator (REST) never sees.
feat(hitl): opt-in reply and unverified approver on resume (2026-10-20)
Repo: EDDI (feat/hitl-resume-reply-and-approver)
What changed and why
Reply from resume.
POST /agents/{conversationId}/resumeaccepts thesayquery parameters (returnCurrentStepOnly,returnDetailed,returningFields). With any of them the request waits for the resumed turn (AsyncResponse,agentTimeoutInSeconds, 408 on timeout,Retry-Afteras onsay) and returns it through the same snapshot conversionsayuses, so secret context stays a placeholder. Without them the answer is the empty 200 it always was.IConversationService.resumeConversationgained a six-argument form; the three-argument form delegates with(false, true, []).Approver without authentication. With no authenticated principal, a body
decidedByis recorded asunverified:<value>(trimmed, 128 characters,[A-Za-z0-9._@:+-]only). It is a claim by the caller, not an identity. An authenticated principal still wins and the body is ignored.Tool-call path test.
ResumeSecretContextApprovedCallTestdrives the real resume loop with the real httpcall provider andApiCallExecutorresolution (HTTP client recorded): a pinned call usingBearer {context.userToken}runs with the real header when the token is re-supplied, is refused as before without it, and is still refused when the URI or a body value changed.
Files: RestAgentEngine.java, IRestAgentEngine.java, ConversationHitlService.java, hitl.md.
Design decisions
The endpoint is converted to
AsyncResponserather than blocking a worker: it is the same shape and timeout contract assay, and the no-flag path resumes the async response immediately.Presence of any
sayflag, not a particular value, is what asks for the reply, soreturnCurrentStepOnly=falsereturns the whole conversation as it does onsay.Follow-up fixes.
unverified:is now aReservedPrincipalsprefix (no token may carry it). The resumed reply runsrecordTurnOutcomelikesay, so an ERROR turn carrieserrorandRetry-After. A waiting client is always answered: a resume dropped before it ran (cancelled/ended, or refused by the coordinator) is delivered asonSkipped(410 for ENDED, else 409, one mapping shared withsay), and a resume that throws without rendering is delivered as the ERROR snapshot.A reply is a read. Resume admits approver-only callers (
eddi-approver, neither owner nor admin), but a reply returns the conversation, and withreturnCurrentStepOnly=falseorreturnDetailed=truethat can be its whole history. A request carrying any reply flag therefore also needs the owner-or-admin accesssayneeds; an approver-only caller asking for a reply gets403before the resume runs, so the pause is untouched. Raised by review as a Major authorization finding (CWE-863).The watchdog path too. A resume the runtime routes to its failure callback (the agent-timeout watchdog abandoned it, or a failure escaped the resume body) now answers a client waiting for the reply with the stored state (
EXECUTION_INTERRUPTEDorERROR, the latter with itserror), once, guarded by the same one-shot flag. Previously that client waited for its own408. On a watchdog abandonment the two usually coincide, since both run onagentTimeoutInSeconds; the answer matters for a failure that escapes the body early.
feat(hitl): secret context on resume (2026-10-20)
Repo: EDDI (feat/hitl-resume-secret-context)
What changed and why
A per-turn credential sent as secret context (secret: true) is replaced by a placeholder when a turn pauses, so every task after an approval that needed it (an approved HTTP tool call acting as the user) failed: a pinned call was refused as "the request changed after it was approved", an unpinned one failed at execution. POST /agents/{conversationId}/resume now accepts an optional context map in the same shape as a say request. Only entries marked secret: true whose key was a secret in the paused turn are accepted; anything else is a 400 before the pause is consumed. The values replace the placeholder for the resumed turn only and go through the same scrubbing as on say (shared registerSecretContext, scrubSecretContextValues, TurnAuditBuffer redaction), so the stored step holds the placeholder again afterwards.
Files: HitlDecision.java (write-only context), ConversationHitlService.java (pre-CAS validation), Conversation.java (injection and scrub), hitl.md.
Design decisions
Timeout, Slack, MCP and group resumes pass no context and are unchanged. MCP deliberately does not get it: tool arguments are logged and audited.
Approval binding is not weakened: headers are fingerprinted redacted, so an identical re-supplied token matches (as does a rotated one in a credential header such as
Authorization); a different value in the URI, query, body or an unrecognised header changes the fingerprint and the call is refused (fail closed). Documented inhitl.md.
Operator revision bump after #1112 (2026-10-20)
Repo: EDDI · Branch: fix/operator-revision-36
#1112 (classifier guardrail) was squash-merged at a head whose system-prompt.ts edits were in, but whose matching operator-revision.json bump was pushed a moment later and never reached main. operator-revision.test.ts therefore fails on main. This sets ui/manager/src/lib/operator/operator-revision.json to revision 36 with the fingerprint the test computes for the current prompt, allow-list and gate (d9679ddf62f6532a). No behaviour change.
feat(backup): declare a ZIP import or agent sync compatible (2026-10-19)
Repo: EDDI (feat/compatible-import-sync)
What changed and why
A conversation runs on the newest ready version of its compatibility generation, so a compatible save lets running conversations follow and a breaking one pins them. ZIP import (strategy=upgrade, and the update half of strategy=merge) and agent sync always wrote a breaking version, so promoting an agent from staging to production pinned every running production conversation to the pre-promotion version, and operators ended those conversations to get the fix out.
compatibleparameter (defaultfalse, the safe default is unchanged) onPOST /backup/import(merge and upgrade) andPOST /backup/import/sync, and a per-requestcompatiblefield onSyncRequestforPOST /backup/import/sync/batch. It is threaded to the agent write (RestImportService.createOrUpdateAgent,UpgradeExecutor.updateAgentConfig) and is ignored when a new agent is created or nothing is written. The old method forms remain asdefaultoverloads onIRestImportServiceandUpgradeExecutor.executeUpgrade, so existing callers are unchanged. No MCP tool exposes import or sync, so there is nothing to change there.Merge rollback. A failed merge writes the pre-import content back through the same agent write, so the restore carries the same declaration. Breaking import: aborted version G+1, restore G+2, so no later breaking save can share a generation with the aborted version (the original reasoning, still true). Compatible import: nothing bumped, aborted version and restore both keep G, so conversations that had already followed onto the aborted version follow on to the restored content, whereas a breaking restore would pin them to the aborted import's content. Generations never decrease along the version chain in either case. Both outcomes are tested.
Preview.
ImportPreview.conversationImpact(PromotionImpact) on the upgrade, merge and sync previews: the target's current version and generation, the generation each declaration would produce, the open conversations per compatibility generation and how many would follow if declared compatible. It answers for both declarations because the preview is read before the choice, so the Manager updates instantly without another round trip to the source. Counts only, by the conversations' own compatibility generation (a conversation follows the newest ready version of its generation whatever version it last ran on, so a count per deployed version missed idle conversations stored on undeployed versions): one grouped count,IConversationMemoryStore.getActiveConversationCountsByGeneration(Mongo$group, PostgresGROUP BY), never the active-conversation memory listing. Computed byRestAgentAdministration.previewNextVersionwith the same follow rule as the deployment impact and the generation rule ofAgentStore.nextCompatibilityGeneration(now public). Omitted when nothing would be written, there is no existing target, or the caller lacks EDIT on it.Result.
UpgradeResult(upgrade, sync, batch) gainscompatibleandcompatibilityGenerationof the written agent version; a merge import answers withX-Agent-CompatibleandX-Agent-Compatibility-Generation. Additive.Legacy edge. A target whose current version has no generation still starts generation 1 on a compatible save; the preview reports
startsNewChain: trueand the Manager shows the existingcompatibleLegacyNotetext.Manager.
PromotionCompatibilityPanel(reusingCompatibleVersionCheckbox, unticked by default) in the import dialog's preview step and in each agent's detail on the Sync page, with the impact sentence andagentVersioning.promotionImpact*keys in all 11 locales.Docs.
deployment-management-of-agents.md(when to tick compatible on a promotion, both outcomes),agent-sync-guide.md,import-export-an-agent.md.
Design decisions
Merge shares the update path with the rollback in question, so it takes
compatibleas well as upgrade.Preview parameters were rejected in favour of returning both answers.
Counting by deployed version was rejected: a conversation follows by its own generation, so idle conversations stored on undeployed versions were missed.
Tests
New: RestImportServiceCompatibleTest, RestAgentAdministrationPromotionImpactTest, additions to UpgradeExecutorSyncTest and RestImportServiceSyncCoverageTest, and promotion-compatibility.test.tsx. The key backend tests were mutation-checked.
feat(operator): the Platform Operator explains 408 Request Timeout and caller_timed_out (2026-10-19)
Repo: EDDI · Branch: feat/operator-turn-timeout-408
What changed and why
PR #1101 changed what a 408 means under load, and left telling the Platform Operator for later, because the "Turn capacity" prompt section of #1091 had not landed yet. Without this an admin asking "why do my users get 408?" or "what is eddi_turn_skipped_total?" got an answer from the old behaviour, or none. AGENTS.md §4.6 asks for this check whenever behaviour changes.
system-prompt.ts, "Turn capacity":A fourth
capacity_exceededcause: the database pool-wait timeout ("The database is busy: no connection was free in time"), now a503withRetry-Afterinstead of a500.How a
408differs from a503: the turn was accepted but its caller's time (systemRuntime.agentTimeoutInSeconds, counted from the request's arrival) ran out. The prompt gives the three cases and whether the turn ran in each: rejected before queueing (eddi_turn_rejected_total{reason="caller_timed_out"}), dropped unrun from the queue with its input unconsumed (eddi_turn_skipped_total{reason="caller_timed_out"},eddi.conversation.skip-turns-of-timed-out-callers; only then is a retry exactly-once, and with the setting off the queued turn still runs), or already started, whose outcome is unknown at the408because the execution watchdog times from the turn's submission to the executor (queue wait included), not the request's arrival.What a rising
caller_timed_outmeans: the node is overloaded. The fix is more nodes or a lowermax-in-flight-turns, which turns a 60 s wait into a fast503. Raising the timeout does not help. Flat counters do not prove health: a turn that queued until just before its deadline and then started is counted by neither, so compare wait-before-start with run time./q/metricsanswers on dedicated threads (eddi.metrics.dedicated-scrape-threads).The logs section: pool-wait refusals are WARN lines, and both
408paths log at DEBUG only, so the logs do not show them.
No allow-list change. The meters are at
/q/metrics, which is not in the OpenAPI spec and so cannot become a tool. The prompt already says the operator cannot read them.operator-revision.json: revision bump, so existing deployments are offered the upgrade.system-prompt.test.ts: pins the pool-wait message, the 408/503 distinction, both counters, the "did it run" sentence, the overload advice and the DEBUG-only logging note.
✨ feat(engine): move already-pinned conversations onto the current agent version (2026-10-19)
Repo: EDDI (feat/upgrade-conversation-generation)
What changed and why
A ZIP import and an agent sync write a breaking version unless declared compatible, a breaking save leaves the same result, and conversations that started before compatibility generations existed carry none, so after a promotion every running conversation stays pinned to the version it began on. Operators ended them, which is a bad experience for the user in the middle of a conversation. This adds an operator-declared, previewable repair: "this agent's conversations on an older generation (or none) are compatible with the current version, move them onto it."
Endpoint.
POST /administration/{environment}/upgradeconversations/{agentId}withdryRun(defaulttrue), repeatablefromVersion,limit(default 5000, so a call stays inside a proxy timeout) andafter(the cursor: a truncated report carriesnextAfter). Same path style, roles and EDIT access check asundeploy. The response has the same shape for dry and real runs: target version and generation, and per source versionmatched,eligible,upgradedandskippedby reason. MCP:upgrade_conversations, same dry-run default (86 tools now). The REST call is recorded by the existing administrative-action audit filter; deploy and undeploy over MCP write no audit record either, so the tool adds none.Target. The generation of the agent's latest version. A version of it must be
READYin the environment on the serving node, else409; an agent whose latest version has no generation also gets409. A generation is never lowered, and conversations already on the target are not touched.Only the generation is written. The existing per-turn machinery (
resolveConversationAgent,recordAgentVersionMove) then moves the conversation to the newestREADYversion of the generation and records the move, soagentVersion, steps and the descriptor are not rewritten here.States.
READY,ERRORandEXECUTION_INTERRUPTEDare moved.ERRORis included on purpose:sayrefuses only ended and paused conversations, so an errored conversation is live and the new version often repairs it.ENDED,AWAITING_HUMAN(a resume must finish on the version that paused it) and a persistedIN_PROGRESSare skipped and counted.Concurrency. A say turn never persists
IN_PROGRESS, so the store cannot see a running turn. Each write is therefore a task in the conversation's own coordinator queue (cluster-wide lease in cluster mode) and never overlaps a turn. The write is one conditional update and also moves_revand_histRev: a turn queued behind it is rebuilt over the new document by the existing stale-snapshot guard, and a writer holding an older load is refused (append: history revision; full write: revision) instead of putting the old generation back. Tasks that do not start withineddi.conversation-upgrade.turn-wait-ms(30 s) are withdrawn and reported asbusy.Scale. Candidates are read as a keyset-paged projection (id, state, version, generation), 100 per round, never loaded in full and never via the active-conversation listing. Implemented for MongoDB (pipeline update) and PostgreSQL (
jsonb_set).Observability.
eddi_conversation_generation_upgrade_count; one INFO line per run with the counts.
Tests
ConversationUpgradeServiceTest (selection, skips, target validation, never lower, dry run writes nothing, timeout withdrawal, real-coordinator ordering against a running turn), RestAgentAdministrationUpgradeConversationsTest, and a GenerationUpgrade group in both MongoConversationMemoryStoreTest and PostgresConversationMemoryStoreTest (Testcontainers), including the stale-append and stale-full-write interleavings.
Docs
docs/deployment-management-of-agents.md ("Moving running conversations onto the current version") and docs/mcp-server.md.
Design decisions
Order of preference: save or promote compatibly where possible; this action is for conversations that are already pinned.
Ended conversations are not scanned (they would stay candidates forever and crowd out the ones that can move); they are counted per version with one query. The cursor exists because conversations skipped without change (paused, in progress, busy) stay candidates.
🐛 fix(cluster): review follow-ups to #1089 — non-blocking heartbeat tick, drain/acquire race, one dead-letter budget (2026-10-19)
Repo: EDDI · Branch: fix/cluster-resilience-review-followup
What changed and why
#1089 merged before its last round of review fixes was pushed. This lands them on their own.
The lease scheduler never waits for a heartbeat pass (
KvLeaseManager). The single lease-scheduler thread also runs every lease waiter's retry and deadline timer.heartbeatAllwaits up to one interval for its renewals, so a stalled renewal delayed those timers by up to an interval. The tick (dispatchHeartbeat) now only starts the pass on the I/O executor; a tick that finds the previous pass still running skips.A leader lease granted while a drain began is handed back.
tryAcquireKeycheckeddrainingbefore its KV create; a drain whose sweep ran during that create could not see the new lease, so the drained node kept renewing a leader lease no other node could take. It re-checks after the grant.One budget for a dead-letter append (
JetStreamDeadLetterStore). The ~2 s retry budget started only after the first publish and the provisioning, each of which can take a full request timeout against a NATS that stopped answering. It now covers the whole append.Late on-connect hooks (registered after the connection is up) also run on the hook executor (
NatsConnectionManager), not on the shared scheduler.Cancellation in a mixed gated/allowed tool batch (
ToolLoopRunner): the allowed calls of a batch that also pauses for approval now check the turn's cancel flag before each tool, like the main loop.
Tests
KvLeaseManagerTest.leaderAcquiredDuringADrainIsReleased, heartbeatTickNeverBlocksTheScheduler, JetStreamDeadLetterStoreTest.aFirstPublishThatUsedUpTheBudgetSkipsProvisioningAndRetries — each fails with its fix reverted. The renewal-overlap test releases its gate in finally.
fix(engine): the turn timeout and /q/metrics hold under overload (2026-10-19)
Repo: EDDI · Branch: fix/turn-timeout-under-load
What changed and why
The collapse investigation of 2026-10-19 (PR #1098) found three overload behaviours in a 5,000-user burst against a node held to 2 CPUs: turns answered 200 after a median of 113 s although the REST timeout is 60 s, /q/metrics silent for about 110 s, and queued turns that still ran after their caller had been answered 408. A reproduction with per-request timing (results note) traced the first two to one queue. say and the Prometheus endpoint ran on the Quarkus worker pool (200 threads), and in the burst every one of those threads was busy with conversation starts waiting on MongoDB. A turn request waited up to 79 s for a thread before its 60 s timeout was even armed, a finished turn waited up to 37 s more for a thread to write its answer, and the scrape queued behind both. The timeout timer itself fired on time.
RequestArrivalStamp: the router's first route records when each request arrived.TurnDeadlineHeaderReaderputs it on the turn'sInputData.RestAgentEngine: the408fires atsystemRuntime.agentTimeoutInSecondsafter arrival. A request that has already used the whole budget is answered408at once and queues nothing (eddi_turn_rejected_total{reason="caller_timed_out"}).say,sayWithinContextandrerunare@RunOnVirtualThread, which also takes the response write off the worker pool. A database pool-wait timeout on a turn or a start is503 capacity_exceededwithRetry-After: 5instead of a500(ConnectionWaitTimeouts).ConversationServiceandConversationStepRunner: the turn carries when its caller gives up. A turn still queued then is dropped before any read, its input unconsumed (eddi.conversation.skip-turns-of-timed-out-callers, defaulttrue,eddi_turn_skipped_total{reason="caller_timed_out"}). The caller is told through the newConversationResponseHandler.onCallerGone(REST:408), and an idempotency key is released, so a retry runs the turn. A turn deadline (turnDeadlineMs,X-EDDI-Turn-Deadline-Ms) now counts from the request's arrival too.MetricsScrapeRoute:GET/HEAD /q/metricsis answered on two threads of its own, by a route at order −10: after the security filters (−200, −100), so the metrics permission still applies, and before the/qsub-router (eddi.metrics.dedicated-scrape-threads, defaulttrue).Docs:
conversations.md(when a turn is answered408and whether it ran),configuration-reference.md(both properties),metrics.md(thecaller_timed_outreasons),application.properties.
Measured
Interleaved on a contended laptop (host CPU 72–79 %; other sessions' builds ran throughout), two runs per arm, burst of 5,000 users, limit 1,500:
/q/metrics: 0 of 335 scrapes timed out, against 120 s blind in every baseline run.Slowest
200: 60.4 s, against 94–105 s. Every200arrived within the caller's 60 s.200s within 60 s (estimated from percentiles): 24.7 and 27.9 per second, against 21.9 and 17.4. Fewer200s in all (3,297–3,734 against about 4,700), because the late answers became408s.
Design decisions
Starts stay on the worker pool. Measured with starts on virtual threads too, the node collapsed: 0 turns, connections refused, event loops blocked for up to 60 s. Two carriers at 2 CPUs could not absorb thousands of CPU-heavy starts admitted at once. The worker pool is the start path's only concurrency limit.
AgentEngineVirtualThreadITpins both halves of this.A caller-gone skip, not a default turn deadline. A default
turnDeadlineMswould change how every agent's retries and fallbacks spend their time. The skip only stops work whose answer cannot reach anyone, and only for callers that stamped when they give up (RESTsay). Streams, schedules and group members carry no such time and are untouched.The scrape route replaces Quarkus' handler rather than moving it. A management interface would still use the same worker pool for its blocking route. A route of our own ahead of Quarkus' keeps the path, the content negotiation and the permission, and can be switched off.
Not done (follow-ups)
A request that cannot be dispatched within 60 s (up to 123 s on two saturated carriers) still gets its
408only when it runs. The remedy is earlier load shedding: an in-flight limit sized to CPU.Conversation starts have no concurrency bound of their own.
The Platform Operator learns about the
408/caller_timed_outbehaviour once the "Turn capacity" section of PR #1091 lands; changing the same prompt here would be a revision-bump conflict.
🛡️ feat(manager): LLM input/output guardrails editor and guardrail_triggered chat notice (2026-10-19)
Repo: EDDI (feat/manager-llm-guardrails, based on feat/llm-input-output-guardrails, PR #1064, because that PR had not merged when this was written)
The backend shipped input/output guardrails on LLM tasks with only a TypeScript type mirror in the Manager, so designers had to edit JSON. This adds the editor and surfaces the new SSE event.
What changed
Guardrails section on the LLM task editor (
task-guardrails-section.tsx): two ordered lists,inputGuardrailsandoutputGuardrails. Each row shows type and action, and can be reordered (order is run order), edited or removed. Each guardrail is edited in a side sheet (guardrail-sheet.tsx) so the task editor itself stays one flat list.The sheet edits type, action (with a one-line explanation per action and phase;
repromptis not offered on the input side, where the engine treats it asblock),maxRetries(only while the action isreprompt),blockMessage,failMode,repromptMessage, and the type's own parameters:prompt-injection(extra patterns, mode),pii-redaction(kinds, replacement),regex-filter(patterns, replacement),max-length(maxChars),json-object(none), andclassifier(provider picker reusingProviderSelect, base URL, model under the key the chosen provider reads, API key throughSecretKeyPickerso it is a${vault:…}reference, risk, prompt template, unsafe/safe label, label pattern, timeout, prices, retrieved-context toggle on the output side). Warnings for: classifier without a provider, classifierunsafeLabelother thanyeswithout asafeLabel(the deploy is refused),redacton a type with nothing to rewrite with,failMode: openon a blocking guardrail, a regex filter with no pattern, a type on the wrong side.Streaming caveat: an output guardrail whose action is
block,redact,reprompt(or absent, which isblock) makes the task buffer its answer; the section says so in amber while that is the case, and plainly otherwise.Chat:
guardrail_triggeredis handled inuse-chatand attached to the agent bubble of the turn;ChatMessageshows one quiet line per fired guardrail (phase, type, action). The payload carries no screened text. The standalone Chat UI (ui/chat) was left alone: it is an end-user widget whose block message already is the answer, and it surfaces no other internal pipeline events as notices.i18n: 109 keys (
llmEditor.gr*,chat.guardrail*) in all 11 locales.
Design decisions
Write only what the author sets. A new guardrail is
{ "type": … }with nothing else; blanking a field removes it, an emptiedparametersmap is dropped, an emptied list removesinputGuardrails/outputGuardrailsrather than writing[], and moving offrepromptdropsmaxRetries. An older server's strict parser refuses unknown fields (same rule astask-tool-call-limits.tsx).All
parametersstay plain strings, as the backend reads them; an unknowntypeand any unknown parameter are preserved untouched.The classifier model key follows
modelParamSpec(provider), and switching provider moves the model and credential to the new provider's keys.Edits apply live (no draft/apply step) because the list behind the sheet reflects them and the editor already has its own save/dirty handling.
Not done / next
The
classifiertype exists onfeat/llm-classifier-guardrail, not yet in a PR. Until that backend lands the editor does not offer it (it is left out ofGUARDRAIL_TYPES); a storedclassifierentry still shows as a custom type and keeps its settings panel. The classifier PR adds it back.The operator system prompt is unchanged: its guardrail text was already added with the backend PRs.
Live-turn notices only: a conversation reloaded from history does not show them (the audit ledger holds the record).
📊 feat(ci): Slack digests estimate real Docker pulls next to the raw count (2026-10-19)
Repo: EDDI (feat/metrics-sweep-filter)
What changed and why
The daily digest went from single-digit pull counts to +1,805 overnight. The arithmetic was right, but the source was not people. Since 2026-10-18 02:47 UTC, something has pulled all 198 tags of labsai/eddi at once, every ~2 hours. The workflow logs show pull_count rising in steps of exactly 198–200, and Docker Hub's tag_last_pulled puts every tag's last pull within the same millisecond. The Oct 7 jump of +3,947 has the same shape. Outside those sweeps the counter rises by a few pulls a day.
The digests keep the absolute count and now add two lines:
Likely real pulls: the pull_count increase minus bot sweeps and our own CI pulls, with the number of sweeps filtered out.
Versions pulled: the tags real pulls went to (e.g.
latest ×12, 6.5.0 ×3). The number is how many runs saw that tag pulled, not a pull count, because Docker Hub does not publish per-tag counts.
How it works, in docker-pull-notify.yml:
A new step, Fetch Docker Hub tags, reads every tag's
tag_last_pulledafter it reads pull_count, and records when it finished. Both Docker Hub reads now have a 30-second deadline, so a stalled connection can't hold the job, and through the concurrency group every later run, until GitHub's 6-hour limit.Persist metrics history appends one line per run to
data/runs.csvon themetricsbranch. Each line splits the increase since the previous line three ways. An interval in which ≥ 20 tags were pulled is a sweep, costing one pull per tag. A long gap holding several sweeps is estimated from what is left once any carried debt is paid, divided by the tag count. Otherwise each-b<N>build tag pulled counts as one CI pull, becauseci.yml's post-push check pulls every build it publishes. The rest is real, and the other tags pulled are recorded.bot_debt/debt_sincecover Docker Hub showing a sweep's timestamps before its pull_count catches up, possibly by more than one run. Debt that can't be subtracted yet is always applied to the next interval, which holds the late count however long it is. Anything still unpaid carries further only while it is younger than 2 hours. The two failure modes are lopsided: dropping debt too early books a whole sweep (~200) as real pulls, while holding it too long hides a few real ones. A malformed last line starts a new baseline instead of blocking the log.Plan digests sums the log over the same span as the raw delta beside it: every line after the first run of the
fromday, up to and including the first run of thetoday (the daily rows are first-run-of-the-day snapshots). Consecutive windows share no line and miss none, so an interval crossing midnight is counted exactly once. If the log has no line on thefromday, the window is empty rather than borrowing an interval from after it. A window that has to start after its first day (no line until later in a weekly window) is labelled partial from that line. A log younger than the window gives a figure labelled "counted since …". With no log, the line is left out and the digest is otherwise unchanged.
Design decisions
The run log lives on the
metricsbranch, not in the Actions cache. Each line's baseline is the previous line. The cache is evicted routinely, which is how the digest baselines broke before. One commit per run, about 70 a day, is acceptable on an orphan data branch.A failed fetch writes no line. The next interval just gets longer, and a failed push heals the same way.
Estimates, labelled as such. A tag pulled by a person and then swept in the same interval is lost, and a short burst of real pulls in a sweep interval is only roughly separated. Exact per-tag counts would need Docker Hub's publisher analytics, e.g. via the Docker-Sponsored Open Source program.
Verification
The changed step scripts were extracted from the workflow and run in ubuntu:24.04 with the runner's tools. They were tested against the live Docker Hub tag API (198 tags) and a synthetic sequence: quiet interval, CI build-tag pull, one sweep, a sweep whose count lags one run and then two, two sweeps in one gap, a late count in the same interval as a new sweep, debt kept while young and dropped after 2 hours, a refused duplicate timestamp, a failed fetch, and a malformed last line. Mutants restoring one-run carry, no expiry, and sweeps counted from the raw delta each fail the suite. Every Slack payload variant was parsed as JSON. actionlint reports only the four SC2129 style notes main already had.
fix(engine): price the conversation without converting every step on the current-step path (2026-10-19)
Repo: EDDI · Branch: fix/security-review-authz (carried by #1081 to repair main)
What changed and why
#1066 (group cost ledger) and #1093 (convert only the current step for a turn's response) merged within minutes of each other, each green on its own. Together they broke main: ConversationMemoryUtilities.conversationCost sums audit:cost over every step of the snapshot, and on the current-step path that list is the lazy view #1093 introduced, so pricing the conversation converted every step again. ConversationMemoryCurrentStepConversionTest.convertsOnlyCurrentStep failed, and the default turn response lost the saving #1093 was for.
LazyStepSnapshots.conversationCost()sums the live steps'audit:costentries with oneIConversationStepStack.getExactDataPerStepread. Nothing is converted. A step holds at most one value per key, which is exactly what the full conversion sums per step, with the same non-finite and negative filtering.conversationCost(List)uses it when it is handed the lazy view; every other caller is unchanged.New test: with costs on every step, the current-step path returns the same total as the full conversion and still reads only the newest step.
fix(runtime): refuse a conversation start at capacity before any read (2026-10-19)
Repo: EDDI · Branch: feat/turn-admission-hardening (PR #1085)
What changed and why
A profile of a 5,000-user burst against a node held to 2 CPUs (JFR, 2026-10-19) found that turns got only about 17 % of the CPU. Starting conversations took 19 %, and the HTTP event loop took 27 %. Most of those starts were refused for capacity, and each client came back after Retry-After. #1085 already moved the capacity check before any read for say, rerun and streaming. A start, though, still ran the agent access check, resolved the user, read the GDPR restriction from usermemories and looked up the agent before admitTurn refused it.
RestAgentEngine.startConversationWithContextnow callsrefuseIfAtCapacityfirst. A refused start answers the same 503capacity_exceededas before, now with no database read.admitTurnstays the authoritative check.RestAgentEngineCapacityPrecheckTestpins both cases: refused before the access guard and beforestartConversation, and going ahead when there is capacity. Removing the call fails both tests.docs/metrics.mdnames the start path among the pre-checked entry points.
Design decisions
The internal starts (group members, schedules, sub-agents, A2A) do not pass through this method and are unchanged. They reach
admitTurnas before.
perf(audit): the audit ledger signs through signIfKeyPresent; burst-collapse investigation (2026-10-19)
Repo: EDDI · Branch: perf/audit-signing-missing-key
What changed and why
An investigation of throughput collapses under a 5,000-user burst (scripts/loadtest/results/collapse-2026-10-19.md) found that every audit entry did a vault read that was certain to miss. AuditLedgerService.submit signs each entry with the agent's Ed25519 key, on the turn's own thread, and almost no agent has a key. This branch fixed that with a 60 s missing-key cache. Meanwhile #1055 landed an equivalent cache on main (AgentSigningService.missingKeyUntil, with a guard against a lookup racing a key generation), so the merge keeps main's implementation. What this branch still adds:
AgentSigningService.signIfKeyPresent, used by the audit ledger. While a "no key" answer is remembered it returnsnullwithout throwing. Throughsign, a remembered miss still builds three exceptions per entry (SecretNotFoundException,PrivateKeyLoadException,AgentSigningException), about 8,000 of each in one profiled burst.signkeeps its contract.The investigation's results file. Host contention triggers the collapses; on 2026-10-18 that is stated as a hypothesis, since no host telemetry covers the worst runs. On scarce CPU, EDDI spent most of it outside turns. Its follow-ups are the unfired 60 s turn timeout,
/q/metricsgoing unresponsive and turns that run after their caller has gone.docs/configuration-reference.mddescribededdi.audit.agent-signing-enabledas signing agent configurations. It signs audit entries, and the row now says so, including the 60 s re-check.
Design decisions
On the merge conflict with #1055,
main's cache won outright: it also guards the race in which a lookup that started beforegenerateKeyPairpublishes its miss afterwards. This branch's own cache, a Caffeine cache with a 10,000-key cap that came out of review, was dropped rather than merged in.Tests: three
signIfKeyPresentcases inAgentSigningServiceTest(null without a second vault read, a present key, a vault failure still thrown), andAuditLedgerServiceBranchTestcovering the unsigned-entry path.
fix(security): the four leftovers of the 2026-10-17 security review (2026-10-18)
Repo: EDDI · Branch: fix/security-review-leftovers
The 2026-10-17 review was remediated in PRs #1079–#1094. Four items were left on purpose and are closed here, one commit each.
1. Keycloak refuses the admin/admin fallback off loopback
docker-compose.auth.yml falls back to admin/admin for the Keycloak bootstrap admin so the loopback quick start needs no .env. That was safe only while KEYCLOAK_BIND stayed on loopback, and nothing enforced it. A new one-shot keycloak-guard service, the same pattern as docker-compose.yml's bind-guard, now exits 1 (and Keycloak, which waits for it with service_completed_successfully, never starts) when KEYCLOAK_BIND is not loopback while KC_BOOTSTRAP_ADMIN_PASSWORD is unset or admin. It reads both values from its own environment with the defaults the keycloak service uses. It runs on the Keycloak image the overlay pulls anyway, so it adds no image to either base stack (docker-compose.postgres-only.yml's own guard avoids the mongo image for the same reason). The installers and gcp/provision-vm.sh already generate a password, so their paths pass unchanged.
ComposeStackTestpins the wiring (dependency condition, same password expression, same bind variable as the published port) and runs the guard script itself throughshfor five bind/password combinations; that test is skipped only where no POSIXshis onPATH.adminPasswordsAreOverridablenow checks that each admin-password variable appears at least once, since the guard repeatsKC_BOOTSTRAP_ADMIN_PASSWORD.Verified by hand with
docker compose run keycloak-guardagainst loopback,0.0.0.0with no password, withadmin, with an empty one and with a real one.
3. The release signs SHA256SUMS, and the installers verify it
PR #1088 made the release publish a SHA256SUMS that install.sh / install.ps1 check every download against, but the list itself was unsigned, so whoever could replace one release asset could replace both. The release job in ci.yml now gets id-token: write, installs cosign with the same pinned installer as the image job, signs the list keyless (cosign sign-blob --yes --bundle SHA256SUMS.sigstore.json SHA256SUMS), verifies the bundle against the exact identity the installers demand, and attaches it to the release.
Both installers, when cosign is on PATH, fetch the bundle from the same release and run cosign verify-blob with --certificate-identity https://github.com/labsai/EDDI/.github/workflows/ci.yml@refs/tags/<tag> (exact, not a regexp: the certificate must name this release's own tag) and --certificate-oidc-issuer https://token.actions.githubusercontent.com, BEFORE any hash in the list is trusted. A list that fails stops the install. Without cosign they print one warning line, and a release from before the bundle existed is used unsigned with a warning. Releases cut before this change keep working.
Tests:
InstallerReleaseRefTest.checksumListIsSignedAndVerifiedchecks the release job and both installers as text, including that verification precedes trust.shellVerifiesTheChecksumSignatureruns install.sh's own functions with a stub curl and a stub cosign: one warning without cosign; the exact identity, issuer and bundle URL with it; refusal on a failed verification; the unsigned fallback when there is no bundle. It was mutation-checked by forcing verification to pass. The PowerShell function was run the same way by hand, with a stubcosign.cmd, in all four cases.Not verified end to end: keyless signing needs the GitHub OIDC token, so the first real signature appears on the next release tag. The job verifies it before publishing.
Docs:
docs/security.md, "Installer Downloads", with the manualcosign verify-blobcommand.
4. read_audit_trail no longer shows a USE-only owner the agent's prompt
Finding: yes, it did. LlmTask writes audit:compiled_prompt as the compiled system message, ---, and the processed prompt template; LifecycleManager.buildAuditEntry copies it into AuditEntry.llmDetail.compiledPrompt, and the MCP read_audit_trail tool returned entries as stored to any eddi-viewer who owned the conversation. Under enforced workspaces an agent shared with USE lets the recipient chat with it but not read its configuration, so the audit trail of their own conversation was a way around that. (/auditstore over REST and the GDPR export are eddi-admin only and unaffected.)
McpConversationTools now replaces compiledPrompt with a redaction marker unless ResourceAccessGuard.hasAccess(agentId, VIEW) holds. That answers OWN for an admin and whenever workspaces are not enforced, so nothing changes there. VIEW on the agent rather than on each LLM config: sharing materialises the agent's level onto its config graph (ConfigGraphResolver), so it is the same decision without a graph walk per entry. Model name, token usage, cost and the model's reply stay; the access lookup is made once per agent per call and skipped for entries with no prompt. Tests in McpConversationToolsOwnershipTest pin both halves (USE-only owner gets the marker and no prompt text; VIEW passes the entry through untouched), mutation-checked by reverting the call.
2. EDDI connects to MongoDB as its own user, not as root
Compose, Helm and the kustomize MongoDB overlay connected EDDI as the MongoDB root user with authSource=admin, so anything that could read EDDI's connection string held the whole server. EDDI now connects as eddi_app, defined in the eddi database with readWrite and dbAdmin there and nothing elsewhere (dbAdmin because MongoResourceStorage un-hides an index with collMod, which readWrite lacks).
Not an initdb script, deliberately. The mongo image runs
/docker-entrypoint-initdb.donly on an empty volume, so every existing deployment would have pointed EDDI at a user that does not exist. Instead a helper with the root credentials creates the user, or resets its password and roles, on every start: a one-shotmongodb-app-userservice thateddiwaits for indocker-compose.yml,docker-compose.openwebui.ymlanddocker-compose.cluster.yml, and anensure-mongodb-userinit container (restricted-PSS security context, bounded wait for MongoDB) in the Helm Deployment and ink8s/overlays/mongodb. Existing Compose and Helm installs migrate on the nextup/helm upgrade, and changing the app password rotates it.Defaults that do not break an existing install. Compose's
MONGO_APP_PASSWORDfalls back to the root password (documented as "set a distinct one"). Helm'smongodb.appPasswordfalls back tosha256("eddi-app:" + rootPassword): stable across renders withoutlookup, distinct from and not reversible to the root password. Kustomize's operator-created Secret gets two new keys in the documented command; for an old Secret theMONGO_APP_*references are optional and the init container does nothing, so EDDI keeps working as root until the documented patch is applied.The
mongodbhealthchecks no longer carry the root password (pingneeds no auth).Helm chart
2.9.0→2.10.0(new valuesmongodb.appUsername,mongodb.appPassword).Docs:
docs/upgrading-from-6.5.md(new "MongoDB least-privilege user" section, plus the Keycloak guard from item 1),docs/docker.md,docs/kubernetes.md,docs/troubleshooting.md,.env.example.Tests:
ComposeStackTest.eddiDoesNotConnectAsMongoRootandDeploymentManifestsTest.helmEddiDoesNotConnectAsMongoRoot/kustomizeEddiDoesNotConnectAsMongoRoot(both mutation-checked); the CI manifest-lint step now checks the app password is URL-encoded and that the root password never reaches EDDI's connection string.Verified in Docker with
labsai/eddi:6.5.0: a volume written by the old root-connected stack, restarted on the new compose file, keeps its data, EDDI writes aseddi_app, a secondupupdates rather than fails,eddi_appis refused onadmin, and a fresh volume works. The init container's script was run as uid 185 on a read-only root filesystem with all capabilities dropped, against a MongoDB still starting up.helm template/helm lint(default,existingSecret, PostgreSQL-only, special-character password) andkubectl kustomizeof every overlay and example render.Not changed:
scripts/loadtest/docker-compose.loadtest.yml(a load-test harness, still root) andk8s/quickstart.yaml(its MongoDB runs without authentication at all).
Review follow-ups (CodeRabbit on #1099)
Keycloak, an existing
admin/adminvolume.keycloak-guardsees only the configured password, and Keycloak reads it on first boot only, so a volume first started with the default kept that login whatever.envsaid. A new one-shotkeycloak-admin-rotateruns once Keycloak is healthy and before EDDI starts: when a non-default password is configured andadminstill logs in, it resets the account to the configured password throughkcadm, password on stdin. The window in which such a volume is published with the old login is now Keycloak's start-up, not indefinite. Verified live:adminaccepted, rotation,adminrefused, the new password (with a quote and a backslash) accepted, second run a no-op.ComposeStackTestpins the wiring.MongoDB helper: root password off the command line. All five copies (three compose files, Helm, kustomize) now authenticate with
db.auth(process.env…)inside--eval, so the root password is no longer in mongosh's argv (/proc/<pid>/cmdline).MongoDB helper: concurrent starts. Several replicas starting at once could race between
getUserandcreateUser; a51003(user already exists) now falls through toupdateUser. Verified with four init containers started at the same moment: all exit 0.Signed releases fail closed. A missing
SHA256SUMS.sigstore.jsonused to be taken for a release from before signing. From 6.6.0, the first signed release (pre-releases included), the installers refuse when cosign is installed and the bundle cannot be fetched; older tags keep the unsigned-with-warning path. Tested inInstallerReleaseRefTest(9.8.7 and 6.6.0-RC1 refused, 6.5.0 warned) and by hand forinstall.ps1.Redacted audit entries carry no signature. The copy
read_audit_trailreturns with the prompt redacted no longer keeps the originalhmacandagentSignature, which covered the unredacted payload and would have made an intact entry look tampered.Second review round.
keycloak-admin-rotatepasses-ntokcadm update … reset-password(that endpoint has no GET; re-verified live). From 6.6.0 a missingSHA256SUMSstops the install too, with or without cosign, since without it no download is checked; older tags keep the warning.mongodb-app-userindocker-compose.ymlwarns whenMONGO_APP_PASSWORDis unset or equals the root password. Failing in that case would break every existing install and the zero-config quick start. TLS between the compose services stays out of scope, as the review document records ("plaintext intra-service traffic").No start-up window for an old Keycloak volume.
keycloak-admin-rotatenow leaves a marker (.eddi-admin-verified) inkeycloak-dataonce it has seenadminrefused, andkeycloak-guard, which mounts the volume read-only, refuses a non-loopback bind for an existing volume (one with anh2directory) without it. The default login of an old volume is therefore never published, not even for the seconds before the rotation; such a volume is started once on loopback. Verified live: old volume refused off loopback, rotated on loopback, then accepted; a fresh volume accepted at once.ComposeStackTestruns the guard against a volume with and without the marker.
docs(loadtest): adaptive turn limit judged with Retry-After-honouring clients — dropped (2026-10-18)
Repo: EDDI · Branch: docs/adaptive-limit-retry-measurement (on top of feat/turn-admission-hardening)
What changed and why
The adaptive turn limit parked on 2026-10-17 lowers eddi.conversation.max-in-flight-turns while the mean MongoDB pool wait exceeds 100 ms. It had been judged with k6 clients that ignore Retry-After. It has now been measured again with the benchmark suite's --retry-503 10 clients (PR #1086): limiter off against on, down -v before every run, 2,500 conversations × 10 turns and a 5,000-user burst, 3 s mock LLM, three rounds. The results and the method are in scripts/loadtest/results/admission-2026-10-17.md. No code changes.
Not shipped. On a quiet machine the limiter gained 12–15 % goodput in the steady scenario, cut its p99 and left the p95 even. But it abandoned turns in every burst run (603 and 102) and in the contended steady run (1,464), against 0 with it off. That fails the ship criterion: the limiter must beat "off" without raising abandoned turns.
The pool-wait signal does not track database saturation. A per-second sampler put it next to mongod
opcounters,globalLockqueue and CPU. Pool wait correlated negatively with mongod ops/s in nine of ten runs. The wait was high while mongod ran at a fraction of its peak, with free pooled connections and an empty lock queue. It measures CPU contention in the EDDI JVM, which is why another stack's load test drove the limit down to 92.mongodb_driver_pool_waitqueuesizemoves with it, so it is no better.
Design decisions
No replacement signal was built. A signal that really measured MongoDB saturation would not have fired in these runs (mongod stayed far below its peak), which is the same as "off". The steady gain points at CPU instead: a static
max-in-flight-turnssized to CPU, rather than to heap, is the next thing to measure.
What's next
Delete the local branch
wip/adaptive-turn-limit(commit63659ba18) once the user agrees.Measure a CPU-sized static in-flight limit against
autowith the same retrying clients.
docs(loadtest): static, CPU-sized in-flight turn limit measured against auto — default unchanged (2026-10-18)
Repo: EDDI · Branch: docs/static-turn-limit-measurement (on top of feat/turn-admission-hardening)
What changed and why
The adaptive limiter measured earlier the same day gained steady goodput while it held in-flight turns at about 900–1,900. That suggested a static eddi.conversation.max-in-flight-turns, sized to CPU rather than heap, might keep the gain without a controller. This was measured against the default auto (2,602 at -Xmx6g) on 20 cores, with the benchmark suite's --retry-503 10 clients (PR #1086). Scenarios: 2,500 conversations × 10 turns, and a 5,000-user burst, both with a 3 s mock LLM. Each run started from down -v, configurations were interleaved, and there were 2–7 uncontended rounds per configuration (36 runs). The results are in a new section of scripts/loadtest/results/admission-2026-10-17.md. No code changes.
Steady: 2000 and 1500 tie with
auto(median 228–234 turns/s, p95 including backoff about 20–22 s). 1000 and 600 abandon turns (45 and 619) without gaining throughput, and 600 loses a third. No static limit reproduces the adaptive limiter's 12–15 % gain.Burst: 2000 has the higher unpaired median (333 against 275 turns/s) and a narrower range (281–355 against 185–427). Paired by round it is a tie: three wins each, median difference +2.5 turns/s. It also abandons turns (9 over six runs against 0 over seven) and has 3–4 s worse p95 and p99 totals. 1500 and below abandon 70–2,000 turns per burst.
Design decisions
No new default. No candidate beats
autowithout raising abandoned turns, the same criterion the adaptive limiter failed. With closed-loop clients that honourRetry-After, a lower limit moves the waiting from EDDI's queue into client backoff while throughput stays where the CPU puts it.About 2,000 is a deployment choice, not a default. It is documented as an option for operators who want a predictable burst floor more than the best case.
What's next
Nothing on admission control. A CPU-aware limit would need EDDI's own share of each turn's latency, which EDDI cannot measure without timing every LLM call.
⚡ perf(startup): derive the audit keys while the vault derives its KEK (2026-10-18)
Repo: EDDI (perf/startup-parallel-kdf)
What changed and why
Thread dumps of the main thread during boot showed it in PBKDF2 twice, one after the other: the audit ledger's HMAC key (AuditKeyring.initialize → AuditHmac.deriveHmacKey) and the vault KEK (EnvelopeCrypto.deriveKeyFromString from VaultSecretProvider.onStartup). Each is 600,000 iterations of HMAC-SHA256, a few hundred milliseconds, and they share no input.
AuditKeyring.deriveEarlyis a newStartupEventobserver atAPPLICATION - 100, ahead of the vault's atAPPLICATION. It startsinitialize()on a virtual thread and returns, so the audit keys are derived while the main thread loads the vault salt and derives the KEK.The join is the existing lock.
AuditKeyring.onStartup(APPLICATION + 100) and every key accessor callinitialize(), which waits on the keyring's monitor until the derivation is done. The volatileinitializedfast path and thesynchronizeddouble-check are unchanged, so the keys are complete before readiness and before the first entry is signed.initialize()is no longer a@PostConstruct. Arc instantiates the bean on the thread that first touches it — the observer's, the main one — so a@PostConstructderivation would have run inline again. Every method that reads a key already calledinitialize()first;fromMasterKeystill does.Failure is not swallowed. If the early derivation throws,
initializedstays false and the next caller derives again on its own thread and sees the exception, as before.
The KDF, salts, iteration count and therefore every key are unchanged: existing signatures and vault entries verify as before.
Tests
StartupKeyDerivationTest pins both derivations to known answers computed outside the JVM (Python hashlib.pbkdf2_hmac), checks that keys derived through deriveEarly equal those from an inline initialize(), and that deriveEarly returns without doing the work itself. Mutation-checked: 600,001 iterations in AuditHmac or in EnvelopeCrypto, and running the early derivation inline, each fail it.
Measured
Fast-jar boots of origin/main and this branch, built with -DskipUi=true, against a local MongoDB 7 with a vault master key set, 8 runs each in alternating order after one discarded warm-up (Windows 11, JDK 25.0.1, a host shared with other work):
started in median (min)
to /q/health/ready median (min)
before
4.03 s (3.51 s)
4.90 s (4.42 s)
after
3.52 s (3.17 s)
4.48 s (4.21 s)
About 0.4–0.5 s off a ~4 s boot. The spread between runs is of the same order, so read it as "one PBKDF2 derivation leaves the critical path", not as a precise figure. On a cold, contended container the derivations are slower, and so is the saving.
feat(loadtest): benchmark suite — streaming TTFT, cluster scaling, group discussions, DB-ops CI gate (2026-10-17)
Repo: EDDI · Branch: feat/loadtest-benchmark-suite
What changed and why
EDDI leads on concurrent stateful conversations per node, but nobody — EDDI included — publishes numbers for stateful multi-turn load, time to first token overhead, scaling efficiency or multi-agent throughput. This extends the load-test harness so those numbers can be published reproducibly and regressions caught. Nothing under src/main changed.
stream: time to first token over EDDI's SSE endpoint (POST /agents/{id}/stream) and overPOST /v1/chat/completionswithstream: true, against the same streamed request sent straight to the mock as calibration; overhead = EDDI's TTFT minus the mock's, per percentile. The WireMock stub streams equal-length SSE events withchunkedDribbleDelay, so each slice is exactly one event, with a configurable first-chunk delay, token count and spacing. Driver:drivers/stream_driver.py, asyncio on the standard library, in a pinnedpythonimage on the compose network.--retry-503 N(k6RETRY_503, off by default so earlier results stay comparable): a client that honours 503 +Retry-After(capped, jittered) and resends the same turn up to N attempts; reports latency including backoff, attempts per turn and abandoned turns. Requested by the admission-control work, whose shedding otherwise read as collapsed goodput.LOADTEST_COMPOSE_EXTRAadds compose overrides for EDDI settings under test (overrides/in-flight-100.yml). Measured live (laptop,results/retry-2026-10-18-report.md): 500 conversations against 100 in-flight turns, 1 s mock, fresh database each: the default client completed 339 of 2,500 turns (17.5 turns/s, 762 failed starts); the retrying client 2,404 (43.3 turns/s, 74 abandoned, 22 failed starts), with p95 including backoff of 18 s. The first live run showed refused starts were not retried, so starts now back off too.Overhead as a first-class metric: every turn run reports
turn_overhead(latency minus the mock's delay) at p50/p95/p99.Cluster scaling is
main's cluster mode (labsai/EDDI#1092,cluster-matrix), which landed while this branch was open. This branch first had its ownup --nodes N/scalingoverlay for the same purpose; mergingmainremoved it rather than keep two cluster paths (cluster-*is a full stack with a three-node NATS cluster and per-node metrics). The laptop sample's scaling section was measured with the removed path;reportno longer renders scaling,cluster-matrixwrites its ownresults/cluster-scaling-<date>.md.group: N-member group discussions (POST /groups/{id}/conversations, k6groups.js); member turns per second across members.gateand.github/workflows/loadtest-db-ops.yml(manual dispatch, nightly, PRs touching the harness): a fixed scenario on a GitHub runner fails when MongoDB operations per turn exceedthresholds/db-ops-mongo.json. Throughput and latency are artifacts, not gates.report: one Markdown benchmark page per label — hardware, image digests, build commit, JVM, method, every number, and the exact commands (with theirLOADTEST_*variables) to reproduce it. Sample:results/laptop-2026-10-17-report.md.up --db postgres: PostgreSQL withpg_stat_statements; database operations per turn are statement executions by verb.Sharing a machine: compose files are split (base,
mongo,postgres,app,cluster) andCOMPOSE_PROJECT_NAMEkeeps stacks apart. Before a measurement the driver waits while another stack's k6/SSE container runs, and a result measured while one appeared recordscontended_by(⚠ in the report).
Design decisions
A Python SSE driver, not k6 + xk6-sse. xk6-sse needs a custom k6 build (Go toolchain, xk6, a community extension, each to pin); one standard-library file in a pinned image has nothing to build or drift, and its definition of "first token" is readable in place.
What the gate gates. Document counts for insert/update/delete and the operations on the collections a turn touches itself (conversation memory, descriptors, vault, user memory) are identical run to run. Reads of agents, workflows, quotas and the audit ledger follow the clock (cache refresh, batched flushes) and grow on a slower runner. The audit ledger flushes from a queue every 3 s, which first moved the insert total by a batch either way on short runner runs (3.8 and 2.66 vs 3.2 per turn); every measurement now waits for that queue to drain plus one flush interval before each snapshot. The clock-driven reads are reported and covered only by a loose total-query ceiling (5 ops of headroom). Measured: 3 runs on this laptop agreed to 0.01 per turn on every per-collection counter, and the first GitHub-runner run matched them exactly.
Ceilings in git, not the Actions cache, which evicts entries at its size cap.
Measured (laptop, not publishable)
See the sample report. On 4b83ffb8b: about 22.5 MongoDB operations per turn (17 queries, 3.2 inserts, 2 updates); streamed tokens reach the client unbuffered on both paths (token spread equal to the mock's).
Next
Run the suite on dedicated hardware for publishable numbers.
When a round-trip cut (labsai/EDDI#1055 and its follow-up) lands, the gate reports "well below": lower the ceilings with
gate --recordin that PR.Not diagnosed: at 10–50 conversations with a 0–100 ms mock the laptop shows EDDI overhead p50 135–190 ms and p95/p99 stalls of 1.5–5 s; check on an idle machine before reading anything into it.
🩹 fix(manager): self-hosted provider hints on the operator activation screen (2026-10-17)
Repo: EDDI (feat/llm-openai-compatible-provider)
Browser-checked the self-hosted provider in the agent wizard and operator activation. The wizard explained the required model id and Base URL; the operator activation screen showed both fields bare. It now shows the same hints (reusing the wizard's strings) and links them to the inputs with aria-describedby. Files: operator-activation.tsx.
🩹 fix(manager): webhook channel — explain the options, label every field (2026-10-17)
Repo: EDDI (feat/channels-signed-webhook)
Browser-checked the webhook channel in the create dialog and on the detail page. Fixed: the signature scheme and conversation strategy were bare identifiers (now a one-line explanation of the chosen option); the generic-HMAC and event-type inputs had only placeholders and untranslated English aria-labels such as signatureHeader (now visible, translated labels); the last create step talked about trigger keywords, which a webhook does not have; those grids now stack on a narrow screen. A Billing Webhook entry was added to the mock channel store. Files: webhook-settings.tsx, create-channel-dialog.tsx.
Fewer MongoDB round trips per turn, part 2 (2026-10-17)
Repo: EDDI · Branch: perf/turn-db-roundtrips, stacked on perf/turn-mongo-roundtrips (#1055)
What #1055 left of Phase 1 of the throughput plan (WS1, WS3a, WS3f). Measured with scripts/loadtest against #1055 merged with main: MongoDB round trips per turn 9.4–10.6 → 6.3–6.8 (queries 7.1–8.2 → 4.2–4.5; 19.6 on main before #1055). conversationmemories reads per turn 4.1 → 2.1, audit_ledger up to 1.1 → 0.1, agents + workflows up to 0.3 → 0. Throughput and p95 improved in every run, but the laptop was shared with other load tests, so the latency numbers are indicative only. Details in scripts/loadtest/results/p1-roundtrips-2026-10-17.md.
What changed
Turn start reads state and revision once (
ConversationStepRunner.runConversationStep). The queued-say guard read the stored state and the stale-snapshot guard (reloadIfSuperseded) read the stored revision, two projection reads of the same document.IConversationMemoryStore.getStateAndRevisionanswers both in one read (MongoDB projection, PostgreSQLSELECT). Its default returnsnull, and then the caller asks the two old methods, so a store or a test double that predates it behaves exactly as before.No committed-state read for a turn that was not paused. The persist callback's
finallypassedcommittedStateOrError(...)toDeferredDelivery.deliver, a no-op unless a paused completion was deferred. Java evaluated the argument anyway: one state read per turn for nothing. It now reads only when a delivery is pending.The audit collision check is one query per flush (
AuditLedgerService.detectForeignSequenceAllocation). It askedmaxSequenceonce per conversation in every flushed batch, about one read per turn under load, on connections the turns wait for.IAuditStore.maxSequencesanswers the whole batch: MongoDB$sorton the(conversationId, sequence)index plus$group/$first, PostgreSQL one indexedMAXper id overunnest. The default loopsmaxSequence, as before. The seed itself was already once per conversation on both paths: the single-node counter table, and the NATS KV counter in cluster mode. The detector does not run in cluster mode, where positions come from the shared counter.WS1:
WorkflowTraversalno longer expires after 2 s. Turns of one conversation are rarely 2 s apart, so practically every LLM turn re-read the agent, its workflows and their extension configs. Agent, workflow and extension versions are immutable, so the traversal cache is now a size-bounded Caffeine cache (1,000 entries) with no TTL. Entries for an agent are dropped by the sameAgentFactorydeploy/undeploy hook that clears #1055'sAgentConfigurationCache. Only complete traversals are cached, as before. The callers only read the cached configs (checked:LlmTask,HttpCallToolsProvider,McpToolsProvider,RagContextProvider,TurnBudgetValidator); the 2 s cache already shared them between concurrent conversations.
Looked at, not changed
Inserts (3.1 per turn in
opcounters) are already batched. The counter counts documents: about 3 audit entries per turn, written as oneinsertManyper flush (the profiler showed 300 entries in one command). The only other inserts are one conversation document and one descriptor per new conversation.GdprComplianceService.isProcessingRestrictedis the remaining usermemories read on every turn (about 1 per turn). Caching it needs a product and security decision about cluster invalidation, so it stays uncached by design. The existing opt-in TTL (eddi.gdpr.restriction-cache-ttl-seconds) is unchanged.
Tests: ConversationServiceTurnStoreReadsTest (a whole say turn through the real BaseRuntime, counting conversation-store calls, plus the fallback path and the superseded-turn reload), AuditLedgerServiceTest.theCollisionCheckIsOneReadPerFlush, maxSequences against real MongoDB and PostgreSQL, and WorkflowTraversalCacheTest (no expiry with time, per-agent invalidation, a degraded traversal is not cached). All were mutation-checked.
chore(deploy): production-sized runtime defaults for the image, Helm and Kustomize (2026-10-17)
Repo: EDDI · Branch: chore/enterprise-runtime-defaults
What changed and why
The defaults fitted a laptop demo, not the load profile the throughput work measured. EDDI waits on LLMs far more than it computes, so memory, not CPU, decides how many conversation turns a node runs at once. Each in-flight turn holds its conversation (about 1 MB for short conversations in the load-test harness). The old defaults were a 1 GiB limit at the image's 50 % heap ratio, i.e. a 512 MB heap, and ParallelGC, which stops every thread on a full collection.
Image (
Dockerfile):JAVA_MAX_MEM_RATIO=75.GC_CONTAINER_OPTIONS=-XX:+UseG1GC, replacing run-java's ParallelGC.-XX:+ExitOnOutOfMemoryErroronJDK_JAVA_OPTIONS, so the flag survives an operator'sJAVA_OPTS. A JVM out of heap exits and is restarted, instead of holding its turns and leases.
Helm
eddi.resourcesand the Kustomize base: request 1 CPU / 3 GiB, limit 4 CPU / 3 GiB.Memory request = limit, for Guaranteed QoS.
A CPU limit is kept because the JVM sizes its GC, carrier and Jlama threads from it.
Production overlay: request 2 CPU / 4 GiB, limit 4 CPU / 4 GiB.
Quickstart: 1 GiB request, 2 GiB limit (was 384 Mi / 1 Gi).
docker-compose.yml:
ulimits.nofile65536.Docs: a "Sizing a node" section in
docs/kubernetes.md, and the Jlama memory note indocs/langchain.md. In-process Jlama weights are memory-mapped outside the heap, so lower the ratio and add the model size to the limit.
Design decisions
G1, not ZGC, as the default. G1 is the JDK's own server default and fits heaps of a few GB. ZGC is documented as the override for heaps of 8 GB and more.
Keep a CPU limit. Removing it avoids CFS throttling, but the JVM would then size its threads for every core of a large node. The limit stays, set generously (4) with a request of 1.
No bump to the dependency charts (MongoDB, PostgreSQL, Keycloak). Size them per installation.
Not yet verified
The image's JVM command line (heap ratio and GC through run-java) was not checked against a real container. Docker was unavailable when this was committed.
G1 vs ParallelGC under load (p99 and the longest pause at 1000 conversations) is still to be measured with
scripts/loadtest.
📦 chore(deps): dependency refresh before the 6.6.0 release (2026-10-17)
Repo: EDDI (chore/release-6.6.0-deps)
What changed and why
A last pass over every pinned dependency before tagging 6.6.0. pom.xml already says 6.6.0 (the 6.5.0 post-release PR set it), so this changes no project version, only libraries and the Node toolchain.
Maven. Every version literal in
pom.xmlwas checked against Maven Central. Dependabot had already brought Quarkus (3.40.1), langchain4j (1.22.0 / 1.22.0-beta32), the Jackson overrides and the plugins to their latest releases. The only patch or minor still open was classgraph 4.8.196 → 4.8.199.Node 24.21.0 → 24.22.0 (latest 24 LTS patch), moved in all the places
BuildQualityGatesTestkeeps equal:pom.xmlnode.version,ci.ymlNODE_VERSIONwithNODE_SHA256_LINUX_X64(the linux-x64.tar.gzline of the release'sSHASUMS256.txt), andmise.toml. Both UI READMEs name the pinned version and were updated to match.Manager and Chat UI.
npm update --saveinside the existing semver ranges, run with Node 24.22.0 / npm 11.19.1. This includes React 19.3.1, Vite 8.3.4, Vitest 5.0.5 (covers the open Dependabot vitest-group PRs), eslint 10.13, typescript-eslint 8.71.2, Playwright 1.64.1, Radix UI minors, TanStack Query, i18next / react-i18next, lucide-react 1.59 (Manager), zustand and the fontsource packages. The Manager lockfile also deduplicates about 30 nested entries. The earlier advisory overrides still apply: the Chat UI ships a singlekatex0.19.0 and the Manager resolvespostcss-selector-parser7.1.6.
Deliberately not updated (majors that need their own migration)
com.networknt:json-schema-validator
1.5.9 → 3.0.8
Rewritten API; the shared-artifact validators need porting
de.undercouch:bson4jackson
2.18.0 → 3.x
Built on Jackson 3, which the ban-jackson3 enforcer rule blocks
com.github.victools:jsonschema-*
4.38.0 → 5.0.0
Also built on Jackson 3 (tools.jackson), so the same enforcer rule blocks it
io.github.classgraph:classgraph
→ 5.x / 6.x
Major release; patch line taken instead
io.projectreactor.netty:reactor-netty-http
1.2.18 → 1.3.x
Needs Netty 4.2; Quarkus still manages 4.1 (see the pom comment)
typescript
5.9 → 7.0
Native compiler port; its own PR
msw (Manager)
2.15 → 3.x
Major release; the mock layer needs migrating
lucide-react (Chat UI)
0.577 → 1.x
Major release with renamed icons
@types/node
24 → 26
The runtime is Node 24; the types follow it
Verification
./mvnw clean compile; Chat UI lint, typecheck, all tests and build; Manager typecheck, lint, i18n:check, build and the full vitest run (592 files, 8551 tests); BuildQualityGatesTest and the repo-wide guard tests (243 tests, three failures in DeploymentManifestsTest's PowerShell create-secrets.ps1 stub tests, which fail the same way on an untouched origin/main checkout on the Windows machine used, so they are environmental). The full backend unit suite, the integration tests and the E2E jobs were left to CI.
Files: pom.xml, .github/workflows/ci.yml, mise.toml, ui/manager/package.json, ui/chat/package.json, both package-lock.json files, both UI READMEs.
docs(planning): conversation storage layout design, steps as records (2026-10-17)
Repo: EDDI · Branch: docs/conversation-storage-design
What changed and why
planning/memory-architecture-plan.md gains §11, Conversation Storage Layout (Phase G). This is the long-term design the throughput plan's WS6/WS7 asked for. Today one conversation is one document (MongoDB) or one JSONB value (PostgreSQL), loaded in full twice per turn and, on PostgreSQL, rewritten in full on every append.
Load tests on the WS2 build measured the cost over 200-turn conversations:
turns slow down 1.6–1.9× on MongoDB and 2.2–2.5× on PostgreSQL;
PostgreSQL runs at 61–83 % of MongoDB's throughput;
62 % of PostgreSQL's database time goes to the append;
PostgreSQL stores 256 kB of live data in 28 MB.
The design:
Layout: a small header (CAS-updated every turn, with new
stepCountandlastInteractionfields) and one record per step (MongoDBconversationsteps, keyed{c, i}; PostgreSQLconversation_stepswith primary key(conversation_id, step_index)).Reads: a turn loads the header and a window derived from the agent's existing history/summary settings; older steps are fetched lazily by page, so every consumer keeps its semantics and absolute indexes.
Writes: an append writes only new records, in one transaction on PostgreSQL and through a unique-key claim on MongoDB (no transactions needed). Undo, redo, rerun and HITL commits become narrow updates instead of full rewrites.
Data and rollout: full history stays stored and readable through every surface (AGENTS.md §4.7). Migration is online behind
eddi.conversation.storage.layout, with conversion on first write, a background sweep and its reverse for downgrades. Header digests later replace the commonest all-history scans.
Also:
Phase G is added to §7 and its targets to §10.
§3.4.1 now says that compaction changes what the LLM is given, not what is stored. It used to say the summary "replaces the raw history in
IConversationMemory", which contradicted §4.7.
Next
G1 (header counters) is small and independent. The rest waits for WS3a (one full load per turn).
Manager UI for agent test suites ("golden conversations") (2026-10-17)
Repo: EDDI (ui/manager) · Branch: feat/manager-agent-tests, based on feat/agent-test-harness (labsai/EDDI#1065) — merge after it.
The regression harness from #1065 had no Manager UI; suites and runs were reachable only over REST and MCP. This adds it (WS6 phase 6.2, UI part).
What changed
Test suites are a resource type (
testsuite, store/testsuitestore/testsuites) inRESOURCE_TYPES, so list, create, edit, version history and delete come from the existing Resources pages. The form editor (components/editors/test-suite-editor.tsx, registered inEDITOR_MAP) covers defaults, tool mocks, cases, turns and every expectation field; the JSON tab stays available. Expectation fields are folded away per turn (progressive disclosure). Half-typed JSON never overwrites the last valid value.Agent detail → "Golden conversations" (
components/agent-tests/agent-tests-section.tsx), collapsed by default and outside the draft fieldset: pick a suite, Run (POST /agenttests/runs, runs the saved agent version against the suite's current version), run history fromGET /agenttests/runs?agentId=. The list polls while any run isRUNNING.Run result side sheet (
run-result-sheet.tsx): per case → repetition → turn pass/fail, each failed expectation with expected and actual side by side, cost and duration, and tool calls that had no mock highlighted.ABORTED,ERRORand a cost-ceiling stop each get a notice saying the agent was not judged (or why the run stopped) and what to do.i18n: 129 keys in all 11 locales.
Mocks:
test/mocks/agent-test-fixtures.ts+agentTestHandlers(passing, failing, aborted, error and ceiling runs; a started run turnsPASSEDafter 4 s). The OpenAPI contract test stays green with no new exemptions.
Decisions
ResourceTypeConfiggainsduplicable: falseandjsonSchema: false: the suite store has noPOST /{id}duplicate and noGET /jsonSchema, so the Manager does not offer or request them rather than shipping a 404 (the snippet/parser drift in the contract test's exemption list is the precedent we avoided repeating).api-clientkeeps a 202 body when it parses. It used to returnundefinedfor every 202, which dropped the run idPOST /agenttests/runsanswers with. 202s with an empty or non-JSON body behave as before.ClusterDrawergained an optionalwidthClassso the run sheet can be wider; no other caller changes.Operator prompt and allow-list now include agent test suite and run access, so
operator-revision.jsonis bumped past main's revision with the new provisioning fingerprint.en.jsonand the other locales lose one duplicated block ofdecisionSummary*keys (the file already defined them twice; JSON keeps the last one) as a side effect of re-serialising — no value changes.
Verified: npm run typecheck, lint, i18n:check, and the unit suites for resources, editors, lib, hooks, i18n, mock contract and the new components; plus a headless-Chrome walkthrough in MSW mock mode (passing run, failing turn, aborted, error, run-in-progress → passed, suite editor, suite list). Screenshots are in the session notes folder.
Not done / next: generate-a-suite-from-a-conversation, an LLM-judge expectation and a deployment gate (all listed as follow-ups in docs/agent-testing.md); a Playwright e2e spec for the new screens.
💰 feat(manager): cost controls — per-conversation ceiling and a legible tenant budget (2026-10-17)
Repo: EDDI (feat/manager-cost-controls) — Manager UI for the backend in the tenancy cost-metering PR (feat/tenancy-cost-metering)
What changed and why
Two cost settings shipped on the backend without a screen, and the tenant budget was still presented as a plain number.
Agent detail → new "Limits" section (
agent-config-sections.tsx) withmaxCostPerConversationUsd. Empty means unlimited and removes the field from the document (nevernullor-1);0is kept as a real ceiling meaning no priced spend at all; a negative or half-typed value is flagged and not written. The section says that only priced models count. Parsing lives incost-ceiling.ts.Tenant quotas page. The monthly-cost field now says what it counts (priced spend only), and the usage card gains a Monthly cost budget status that names which of four states the tenant is in: no budget, budget set but enforcement off, budget reached (models are serving fallback answers, tool calls refused), or spend versus remaining. It lists what is not metered and points at the
eddi.llm.spend.refusedmetric — there is no REST endpoint for recent refusals, so none is shown.All 14 new strings are in all 11 locales.
Design decisions
A new section rather than a field inside an existing one: the ceiling bounds the whole agent whatever its memory, session or approval settings are.
The budget block states the situation instead of leaving it to be inferred from a progress bar that turns red at 90%.
Not done: recent spend refusals on the quotas page need a backend endpoint; today they are only a metric and a per-step marker (llm:spend_refused:<taskId>).
Platform Operator explains 503 capacity_exceeded and node sizing (2026-10-17)
Repo: EDDI · Branch: feat/operator-capacity-limits
The 2026-10-17 throughput work made eddi.conversation.max-in-flight-turns (heap-derived with auto) the node's turn ceiling, but the Platform Operator knew nothing about it: asked why a turn came back 503 capacity_exceeded, or how big a node should be, it had no text and no tool to answer from.
What changed
ui/manager/src/lib/operator/system-prompt.ts— a new "Turn capacity" section in the default body, in both scopes. It tells the three backend sources ofcapacity_exceededapart by theirmessage(the in-flight limit,eddi.coordinator.max-active-conversationsfor a new conversation, a node shutting down) and keeps an administrator drain apart, since that answers 409 withRetry-After, not 503. It states that the refusal is retryable backpressure withRetry-After, gives theautoformula asInFlightTurnLimitcomputes it ((max heap − 256 MB) ÷in-flight-turn-memory-mb, floor 32), the 10–20 % headroom advice from the configuration reference, the meters and alert (eddi_conversation_max_in_flight_turns,eddi_turn_rejected_total{reason="in_flight_limit"},EddiTurnCapacityReached), and the remedies in order: turn latency, replicas (clustering), heap, with the database pool kept in step.Two lines are added only when their tool is granted: what the coordinator status read shows (
activeConversations,queueDepths, not the in-flight limit) and what the log read shows: a refused say/rerun is a WARNTurn rejected for conversation …carrying the refusal message, a refused new conversation under the coordinator cap is a WARN, and only a conversation start refused by the in-flight limit stays at DEBUG.operator-revision.jsonbumped to 20 (main took 18 for the model-catalogue refresh and 19 for #1079), so existing operators are offered the upgrade.Tests in
system-prompt.test.ts.
Decisions
No allow-list change. The numbers live at
/q/metrics, which is not in EDDI's OpenAPI spec, so it cannot become a generated tool; the prompt says the operator cannot read them and names what the admin should look at. Exposing the limit and the in-flight count onGET /administration/coordinator/statuswould be the way to let the operator see them — a backend change, left as a follow-up.The per-conversation queue cap, the bounded MongoDB pool wait and the pool-wait meters (
feat/turn-admission-hardening, PR #1085) are not described: that branch has not merged. They need a follow-up revision bump once it lands.Docs named in the prompt are top-level pages only: the image copies
docs/*.md, so the monitoring guide is not served to the operator.
perf(runtime): overload hardening — capacity check before any read, per-conversation queue cap, bounded MongoDB pool wait (2026-10-17)
Repo: EDDI · Branch: feat/turn-admission-hardening
What changed and why
A load test and JProfiler session on 2026-10-17 (1,000 to 5,000 concurrent conversations, 3 s mock LLM) found that once turns run on virtual threads (#1045), the MongoDB connection pool is where a turn spends its time under load. Indexed single-document reads averaged 2.2–3.3 s inside the driver, while mongod's own profiler logged them at 15–20 ms.
Capacity check before any read.
IConversationService.refuseIfAtCapacity(a no-op default;ConversationServiceimplements it againsteddi.conversation.max-in-flight-turns).RestAgentEngine(say,rerun) andRestAgentEngineStreamingcall it before the ownership check. Until now, a turn refused at the limit first read its descriptor and loaded its conversation. Admission inadmitTurnstays the authoritative, atomic check.eddi.conversation.max-queued-turns-per-conversation(default 20). Turns of one conversation run one at a time, so a client that keeps sending without waiting for answers (a retry storm, a bot loop) only built a queue of turns, each holding a permit and a loaded conversation. One more than 20 waiting is now refused inAbstractQueuedConversationCoordinatorwith the existing 503capacity_exceeded, counted aseddi_turn_rejected_total{reason="conversation_queue"}. The cap applies in both coordinators.eddi.mongodb.max-wait-time-ms(default 10000). The driver waited up to 120 s for a pooled connection, twice the turn timeout, so a saturated pool held turns long after their callers had given up. AwaitQueueTimeoutMSin the connection string still wins.eddi.datastore.pool.waittimer andeddi.datastore.pool.wait.timeoutscounter (MongoDB,PoolWaitListener). Micrometer's pool listener showed how many operations were waiting, never for how long. Both are on the Full Metrics dashboard's connection-pool panel. PostgreSQL already exportsagroal_blocking_time_*.
Measured
scripts/loadtest, 3 s mock LLM, 6 GB heap, everything on one Windows laptop (Docker Desktop), with its own compose project and ports. "Legacy" is this build with eddi.mongodb.max-wait-time-ms=0, i.e. the driver's 120 s.
2,500 conversations × 10 turns
69 turns/s · p50 26.9 s · p95 65.7 s · 668 × 408
191 turns/s · p50 7.5 s · p95 21.9 s · 73 × 408, 7 × 5xx, 1 × 503
Burst: ramp to 5,000 users in 30 s, hold 60 s
75 turns/s · p50 48.2 s · p95 73.7 s
240 turns/s · p50 13.3 s · p95 20.1 s · 727 × 503 at the in-flight limit
The bounded wait accounts for this difference: it is the only setting that differs between the two columns, and each run started on a fresh database. With the driver's 120 s, the p95 (66 s) ran past the 60 s turn timeout. Turns whose callers had already given up kept queueing for connections, and that abandoned work crowded out live turns. Each figure comes from a single run on a laptop, so read the ratio, not the absolute numbers. Details are in scripts/loadtest/results/admission-2026-10-17.md.
Design decisions
No adaptive limit, yet. A limiter that lowered the in-flight limit while the mean pool wait exceeded a target was built, tested and measured, then left out of this change. Under the harness, which drives clients that ignore
Retry-After, it cut goodput (2,500 conversations: 191 → 27 turns/s; 5,000-user burst: 240 → 20 turns/s). In the burst, the pool-wait signal stayed around 470 ms while MongoDB served only about 500 operations/s. It is parked on a local branch,wip/adaptive-turn-limit. Judging it needs load-test clients that honourRetry-After; the benchmark-suite work adds them.Queue cap default 20, not 5 (the throughput plan's WS4b proposal). Coordinator tests that queue 20 turns on one conversation are legitimate FIFO tests, and a chat channel can deliver several messages from a fast typist. 20 is beyond any human pace and still stops a loop.
What's next
The Platform Operator's prompt does not explain
capacity_exceeded, nor any of the turn limits. A follow-up should add it, together with an operator revision bump.WS4a deadline gaps (skipping turns whose deadline expired while queued) touch
ConversationStepRunner, which the per-turn round-trip follow-up to #1055 is changing; take them after that lands.
🐛 fix(cluster): leases that survive a busy node, turns that stop when they lose them, one turn per idempotency key across nodes (2026-10-17)
Repo: EDDI · Branch: fix/cluster-resilience
What changed and why
An assessment of cluster mode (NATS leases with fencing, event bus, degraded mode) found the design sound and its failure scenarios tested. It also found a handful of places where a node under strain, or a NATS that hangs instead of refusing, does worse than the clustering page promises. Per-turn database work is #1055's and node sizing is #1053's; neither is touched here.
Lease heartbeats get a thread of their own (
NatsConnectionManager,KvLeaseManager). They shared a 2-thread scheduler with presence, the console's pollers, the HITL recovery sweep (a database scan) and every on-connect hook (up to 10,000 synchronous outbox publishes, bucket provisioning, the stale-lease sweep). Right after NATS came back, exactly when it is slowest, those hooks could hold both threads past the 20 s lease TTL and a live node lost every lease at once. Now the leases run onleaseScheduler()(one thread, nothing else on it) and the on-connect hooks on two threads of their own. A heartbeat pass also renews the held leases side by side on the virtual-thread I/O executor instead of one after another, so a NATS that answers in 2 s per call no longer stretches a pass over hundreds of leases past the TTL. The pass waits at most one heartbeat interval, so a stalled call never delays the next tick; a lease whose renewal is still in flight is skipped, never renewed twice at once.A drained node hands its leader lease over (
KvLeaseManager.setDraining). It stopped running the leader's work (tryAcquireKeyanswers empty while draining) but kept theleader.hitl-recoverylease alive through its heartbeat, so no node ran HITL crash recovery for as long as the drain lasted — contrary to the method's own Javadoc.Shutdown releases leases side by side, within a bound (
releaseAll): up to three NATS calls per lease, sequentially, could outlast the termination grace against a slow NATS. A lease it misses still expires by TTL.A cancelled turn stops its tool loop (
ToolLoopRunner). Lease loss,/cancel, a GDPR stop and the watchdog all raise the turn's cancel flag, but the loop only checked the thread's interrupt flag, so an agent loop ran all its remaining rounds — more model calls and side-effectful tools — for a turn whose result is discarded. It now checks the flag before every model call and every tool. The call already in flight finishes; interrupting it would also interrupt the persistence and dead-lettering that follow on the same thread.Bounded NATS waits on the turn's thread. A failed turn's dead letter retried its publish ten times; against a NATS that keeps the connection and answers nothing, each attempt ran into the 2 s request timeout — about 24 s on the failing turn's thread. The retry (
JetStreamDeadLetterStore) is now bounded by about 2 s and skipped when the client is disconnected or the stream answered with a refusal other than "not found" (a full stream is not re-provisioned on every refused publish); the entry stays in the node-local ring and is forwarded later. Audit position allocation (AuditClusterSupport) stops asking NATS for one request timeout after a failure, so a turn's audit entries cost one timeout, not one each (they are recorded unsequenced meanwhile, as they already were on failure).Dead-letter stream size cap: new
eddi.coordinator.dead-letter.max-bytes(1 GiB). The stream was bounded by age only, on the NATS volume the leases share. When full it refuses new entries (DiscardPolicy.New) rather than dropping the oldest an operator may still replay.Event bus (
JetStreamEventBus): the outbox is also flushed every 2 s while connected (an event whose async publish failed without a disconnect waited for a reconnect that might never come), at most one flush at a time; and resyncs coalesce — requests that arrive while one is queued join it, so N nodes asking for a resync after a long outage flush each node once more, not N times. Each flush is a wave of cache misses against the shared database.Idempotency-Keyholds across nodes (ConversationService,TurnIdempotencyService). A duplicate that reached another node while the first request ran there missed that node's in-flight registry, became an owner, queued for the lease and, once it held it, ran the turn a second time over the newer document. The turn builder now re-checks the key when it rebuilds over a superseded document: under the lease, the check and the run are one step cluster-wide. The duplicate is answered as skipped (409 +Retry-After) and its retry is served the stored answer.Autoscaling (Helm chart 2.8.0 → 2.9.0):
autoscaling.extraMetricsandautoscaling.behaviorare rendered as given, and each resource target may benull. A node waiting on LLMs runs hundreds of turns at little CPU, so a CPU-only HPA may never scale up; the docs show how to scale on in-flight turns (eddi_runtime_executor_active{pool="turn"}) through a custom-metrics adapter. The chart refuses an HPA with no metric at all, which CI's chart-guard step now asserts.Docs: Clustering gains database-connection sizing (a stock PostgreSQL's
max_connections=100is exhausted by a third replica at the default pool of 50; PgBouncer only in session mode, because EDDI takes session-level advisory locks), an Autoscaling section, a "NATS hangs" failure mode, and the behaviour above; Kubernetes and the configuration reference list the new values. WS5 ofplanning/throughput-optimization-plan.mdis marked superseded by cluster mode. The Platform Operator's prompt learns the dead-letter cap and that a drain hands over leadership (operator revision bump).
Tests
KvLeaseManagerTest: renewals side by side (6 leases at 300 ms each in well under the sequential 1.8 s), a lease with a renewal in flight is skipped,releaseAllside by side, a drain releases the leader lease but keeps conversation leases and the heartbeat does not take it back.JetStreamDeadLetterStoreTest: a hanging NATS holds the turn about 2 s, not 7+; a disconnected node does not retry or provision; the stream config carries the size cap andDiscardPolicy.New.AuditClusterSupportTest: after an outage, five more entries cost no NATS call; allocation resumes after the pause.JetStreamEventBusTest: five resync requests during a flush cause exactly one more flush; an outbox entry is flushed by the sampler without a reconnect.ConversationServiceIdempotencyTest: a duplicate queued on "another node" does not run again once the document holds its key; a queued turn with a different key still runs.ToolLoopRunnerToolPolicyTest: a turn cancelled during a tool runs neither the rest of the batch nor another model call.DeploymentManifestsTest: the HPA template's extra metrics, behavior, optional targets and no-metric refusal; chart version 2.9.0.
Not done here
Distributing one group discussion's member turns across nodes (today the whole discussion runs on the node that started it) — a design change, not a fix.
A multi-node throughput benchmark — in progress separately (
scripts/loadtest, 1→8 nodes).
fix(test): two unit-test classes that failed on every Windows checkout (2026-10-17)
Repo: EDDI · Branch: fix/flaky-local-unit-tests
Both failures reproduced on a clean origin/main and on no CI run: each is a test that built its fixture in a form only Linux accepts. Neither is a product bug; in both cases the product code under test behaved correctly and the fixture never reached it.
What changed and why
McpApiToolBuilderExternalRefTest.oversizedJsonSpecWithEscapedKeyIsStillScanned.specReferencingspliced a@TempDirpath into a JSON string unescaped. On Windows that path isC:\Users\…, and\Uis not a legal JSON escape, so the spec was not JSON at all. The cases the raw-text pass catches still passed; this one rests on the decoded-tree pass alone (its$refkey is Unicode-escaped), which could not build a tree and refused the spec as "could not be parsed" instead of reporting the external reference.rejectUnsafeInlineRefsfailing closed there is correct. The helper now JSON-escapes backslashes, so every case reaches the reference it is about.DeploymentManifestsTest— "secret generator — fail-closed classification" (three PowerShell cases). The Windowskubectl.cmdstand-in recognised the existence probe with a barefind. A Maven started from Git Bash hands its PATH down, with Git's Unixfindahead ofSystem32\find.exe; that one rejects the argument, the stub'serrorlevel 1branch took the error for "not the probe", and every probe exited 0. Every stub mode therefore read as "a Secret already exists", so the NotFound path refused to install and the unreachable/forbidden paths aborted with the wrong message.create-secrets.ps1classified each answer it was given correctly (checked by hand against the stub with a PowerShell-launched PATH). The stub now calls%SystemRoot%\System32\find.exeby full path. CI's ubuntu runner never takes this branch, which is why it stayed green.
Design decisions
Fix the fixtures, not the code: the guard and the generator were right, and loosening either to accommodate a malformed fixture would have weakened a security check.
fix(groups): count every turn of a group member toward the group's cost ceiling (2026-10-17)
Repo: EDDI · Branch: fix/group-cost-ledger-accumulation
What was wrong
GroupCostLedger.accumulateMemberCost fed a group's totalCost, which the maxCostPerDiscussion ceiling (I1) is checked against, through two faults:
It read the wrong value. It took
audit:costfrom the last step of the member turn's snapshot and recorded it by replacement, on the assumption that the value was the conversation's running total. It is not:LlmTaskaccumulatesaudit:coston the current step, and every new step starts without one. A member that spoke in several turns had only its latest turn counted. The comment inMemberTurnExecutorand the ledger's own Javadoc repeated the wrong assumption, and the tests stubbed the same wrong model (a growing "cumulative"audit:cost), so they passed.Since 2026-09-26 it read nothing at all. Member turns call
saywithreturnDetailed=true, and the redaction of that projection (f94036125) withholds everyaudit:*key from the step data. From then on the ledger found no cost, so member spend counted $0 toward the ceiling. Only the discussion's own system costs (summarizer, stance summaries) still counted. Every unit test mockedsaywith a hand-built snapshot, so none of them went through the redaction.
What changed
SimpleConversationMemorySnapshotgainsconversationCost, the sum ofaudit:costover every step of the conversation, including the stepsreturnCurrentStepOnlyleaves out. It is@JsonIgnoreand in-process only, so it does not widen what any REST, MCP or SSE caller receives. The redaction is unchanged.ConversationMemoryUtilities.convertSimpleConversationMemoryfills it, skipping NaN, infinite and negative values. It isnullwhen no step carried a cost.GroupCostLedger.accumulateMemberCostrecords that total. It no longer reads step data. Replacement is now correct, because the value really is the conversation's running total. That holds in every case:harvesting the same turn twice;
a skipped turn, whose snapshot shows the previous turn;
a HITL pause, whose resumed spend arrives with the member's next turn.
GroupCostLedger.retireConversation: whenMemberTurnExecutorswaps a member's ended private conversation for a fresh one under the same key, it first moves the ended conversation's entry tokey:endedConversationId. That is thekey:childshape nested groups already use, and the Manager's per-member digest already sums it. Before, the fresh conversation's first total overwrote the member's whole earlier spend.Late callbacks from a retired conversation. A turn that timed out on the ended conversation can still finish, and its callback arrives under the same key. The ledger compares the snapshot's conversation id with the member's active one and routes a mismatch to
key:<thatConversationId>. That entry keeps the larger value, so the callback and the retirement can run in either order without double-counting or overwriting the replacement's total.No window between retirement and replacement. Retirement always leaves a retired entry, $0 if nothing was spent yet. A callback decides where its cost goes by whether that entry exists, and it reads and writes under the same monitor retirement holds. A late callback therefore lands correctly even before the replacement's id is published, while the member's conversation map still names the ended conversation.
Design decisions
Not widening the redaction. Letting
audit:costthrough, the wayaudit:token_usageis, would also expose the operator's configured pricing to any chatting user who setsreturnDetailed=true. An in-process field gives the group engine what it needs and exposes nothing.A conversation total, not per-turn deltas. The snapshot carries no step index, so adding per-turn deltas could not tell a repeated harvest or a skipped turn's stale step apart from new spend. A total recorded by replacement is idempotent by construction.
Tests
GroupCostLedgerTestbuilds its snapshots through the real projection, with the flags a member turn uses. It checks that a two-turn member is counted in full ($0.05 + $0.07 = $0.12), and that two $0.06 turns trip a $0.10 ceiling that neither turn trips alone.ConversationMemoryUtilitiesTest: the sum covers steps outsidereturnCurrentStepOnly, poisoned values are skipped, and the field never reaches JSON.MemberTurnExecutorTest: an ended conversation's spend survives its replacement.Mutation-checked. Each of these reverts fails the new tests:
restoring the last-step read;
summing only the projected steps;
dropping the
retireConversationcall;removing the late-callback routing;
recording a retired entry by plain replacement instead of the larger value;
routing by the conversation map alone;
skipping the $0 retired entry.
📱 fix(manager): every screen size, RTL, and state handling (2026-10-17)
Repo: EDDI (fix/manager-layout-a11y)
Half of a review of both UIs for click latency, every screen size and every state. This PR holds the Manager's layout, RTL, state-handling and accessibility fixes; the click-latency fixes and the Chat UI are in the companion PR on fix/ui-click-responsiveness. The two share no file and build independently.
Every screen size and RTL (Manager)
The chat drawer was a fixed 420px column, wider than a phone screen, and its Close button was unreachable. It is now a full-screen overlay below
md, and Escape closes it. The operator panel no longer runs off the start edge on phones.Hover-only card and row actions (the kebab menus, deletes) did not exist on touch screens. The new
reveal-on-touchutility inindex.cssshows them under(hover: none)and on keyboard focus, with 32px targets.Agent Studio rendered the mobile tabs and the desktop chat panel together at 768–1023px, mounting two chat panels. Both now switch at
lg.The top-bar breadcrumb truncates instead of pushing the controls off screen. List tables scroll horizontally and hide their secondary columns below
md. App shells useh-dvh, custom modals cap at100dvh-2rem, the main gutter isp-4 md:p-6, page headers wrap, and labelled three-column grids stack on phones.RTL: switch thumbs no longer slide out of their track, directional arrows and chevrons are mirrored, the toaster sits at the inline end, and the onboarding badge is centred.
State handling and accessibility (Manager)
The API-call header/query/body editor could silently overwrite a value: after a delete, Add reused an existing key name, and renaming on every keystroke merged rows. It now uses
nextFreeKeyandRenamableKeyInput, as the connection and rules editors already did.Escape inside the agent picker or a secret picker no longer closes and wipes the schedule form or the create-channel wizard (
defaultPreventedis honoured). Neither form now discards edits on a backdrop click or Escape; the property-setter long-value modal does the same.Inline group-config edits are covered by the unsaved-changes guard. The version diff dialog uses
AccessibleDialog.An Enter that confirms an IME composition (Chinese, Japanese, Korean) no longer commits half-typed text in the chip and tag inputs.
The dashboard shows an error with a retry instead of "nothing here" when a load fails. Resource type counts no longer read "0" while loading. The A2A copy buttons report a clipboard failure.
About 40 icon-only buttons gained accessible names. A count-plus-word concatenation was replaced with plural keys in all 11 locales (including
_manyand the Arabic categories).
🩹 fix(manager): long tool names wrap in a group member's "using …" line (2026-10-17)
Repo: EDDI (feat/groups-member-tool-call-events)
Browser-checked the member card during a streamed discussion. A long MCP tool name could not wrap and pushed the line out of the card, so it now breaks. The mock discussion stream emits a member_tool_call frame and holds it long enough to see. Files: agent-response-card.tsx.
🔒 fix(security): authorization gaps from the 2026-10-17 review — directory, workflow references, group USE checks, platform.* variables, strict group ownership, reserved principals, per-turn USE (2026-10-17)
Repo: EDDI (fix/security-review-authz)
Findings M2, M3, M5, L2, L3 and L4 of the 2026-10-17 security review. The authorization changes (M2, M3, M5, L2, L4) are no-ops for an administrator, and the workspace ones (M3, L4) are no-ops unless eddi.workspaces.enabled=true with authorization on. L3 is not an authorization check: a token whose principal is in a reserved namespace is refused whatever roles it carries.
M2 — the user directory could be harvested by any editor
GET /workspaces/directory answered a one-character prefix with every matching person's name, username and e-mail, whether or not workspaces were enforced. Now:
eddi.workspaces.directory.enabledhas no default: unset, it follows workspace enforcement (UserDirectoryreads it asOptional<Boolean>, falling back toWorkspaceSettings.isEnforcing()).application.propertiesno longer sets it. A deployment without enforced workspaces records no one and suggests no one; shares are taken as typed, which is what an inactive directory always did.People are searched from three characters (
MIN_USER_QUERY1 → 3). Shorter queries return only the caller's own teams, not a 400, so the Manager's share box (which queries from the first keystroke) keeps working unchanged.A non-administrator is offered only their own teams and the people who share one of them. The restriction runs in the store — new
IUserDirectoryStore.searchWithinTeamson MongoDB (teams $in) and PostgreSQL (teams && ?) — so a page is never filled with outsiders and then emptied.eddi-adminkeeps the full search, known teams included.The e-mail (
detail) is returned only to an administrator or to somebody who shares a team with the person — in suggestions and in a resource's grant list (ResourceSharingService, viaUserDirectory.detailFor(user, caller, isAdmin)). Anyone else gets the username.Typing an exact username, verified e-mail or
team:<name>still resolves (resolveSubjectunchanged): only suggestion is narrowed.
Docs: workspaces.md, configuration-reference.md.
M3.1 — a workflow could reference another space's private configuration
RestWorkflowStore now checks every eddi:// reference a workflow names — each step's config.uri and each extension element's config.uri (parser dictionaries) — through ResourceAccessGuard on create, update (and so updateResourceUri and AgentCascadeService, which reach it over the loopback REST client with the caller's identity) and duplicate (deep or not). Configuration needs VIEW; an ai.labs.agent/ai.labs.group reference needs USE. An update need not re-justify a resource id the stored version already referenced — keeping (or re-versioning) a reference somebody with access made grants nothing new — but a new id must pass, including the prefix trick updateResourceUri allowed (a target id that is a prefix of the stored one replaces it with a different resource). References are keyed by type and id: USE grants nothing about a configuration, so an agent URI naming a configuration's id must not stand in for the configuration and get it the weaker check.
M3.2 — moderator, facilitator, RECRUIT and duplicate skipped the USE check
RestAgentGroupStore.requireUseOnMembersalso checksmoderatorAgentIdandfacilitator.agentId, skipsHUMANmembers (their id is a principal, not an agent), andduplicateGroupnow runs it. MCPcreate_group,update_groupandcreate_group_from_template, andRestGroupTemplates, all save through this store, so they are covered too.FacilitatorEnginetakes the same(agentId, principal) -> booleanuse checkRecruitAgentToolhas (M-A1) and asks it for the discussion owner before the deployment check, so a refusal does not reveal whether a private agent is deployed.GroupConversationServicesupplies it from a field-injectedResourceAccessGuardand the owner's own captured identity (CallerIdentity.isAdminActingAs).
M5 — platform.* global variables were editor-writable
RestGlobalVariableStore refuses a non-admin PUT or DELETE of any key starting with platform. (case-insensitive, any tenant) with a JSON 403 — {"error": …, "reservedPrefix": "platform."} — and a [SECURITY] WARN. platform.operator is what the Manager trusts for which agent is the Platform Operator and which prompt an Upgrade re-provisions. Reads are unchanged. No MCP tool writes variables. Every write and delete, refused or not, is already on the audit ledger through AdminActionAuditFilter (pinned by a test). Docs: global-variables.md.
L2 — non-strict owner check on group-conversation reads and MCP group tools
McpGroupTools.requireConversationOwner (follow-up, continue, close, delete) and read_group_conversation, and RestGroupConversation.readGroupConversation, now use requireOwnerOrAdminStrict: a record with no owner is an administrator's alone. The lenient branch of RestGroupConversation.validateGroupConversationOwnership had no caller left (every call passed hitlOperation=true) and was removed with its parameter.
L3 — reserved principal namespaces
New ReservedPrincipals is the one list of principal prefixes EDDI makes up for itself — openwebui:, slack:, webhook:, agent-test:, group:, system:, a2a:, mcp:, anonymous-, gdpr-erased:, and the whole name anonymous — built from the existing constants where they exist. NamelessPrincipalAugmentor rejects an authenticated identity whose principal carries one (case-insensitively) with 401 and a throttled [SECURITY] WARN naming the prefix and issuer. ReservedPrincipalsTest scans src/main/java for "<word>:" + concatenations and *PREFIX* = "<word>:" constants and fails on any that is neither reserved nor listed in the test as not a principal. webhook: and agent-test: come from open PRs #1059 and #1065 and are reserved ahead of them. Docs: security.md.
L4 — USE was checked only when a conversation started
New ConversationAccessGuard.requireConversationTurnAccess: the owner-or-admin check requireConversationOwner makes, plus — under enforced workspaces, for a non-admin — requireAgentUseAccess on the agent the conversation runs on (from the descriptor's agentResource, else the memory's agentId; a conversation that names neither is refused). Used by RestAgentEngine.say/sayWithinContext/rerunLastConversationStep, RestAgentEngineStreaming.sayStreaming, and MCP talk_to_agent and chat_with_agent (existing conversation). Nothing is cached across requests, so revoking a share stops the next turn. The service-level owner check inside ConversationService.say is unchanged — it also serves internal callers (Slack, schedules), which must not be USE-gated.
Design decisions
Short directory queries return less, not 400. The Manager searches from the first keystroke; an error there would surface as a failed request per keystroke.
Workflow updates check only newly referenced ids. Checking every reference would lock a collaborator with
EDITout of a workflow whose owner referenced something only the owner may read; it would protect nothing, since the reference already exists.L4 lives in
ConversationAccessGuard, next to the owner check it extends, so REST, streaming and MCP cannot drift apart; the workspace guard is reached through a lazyInstance<ResourceAccessGuard>.Not done here: the Manager is unchanged (it needs no change for M2; a hint to type three characters would help). The Platform Operator's prompt does not describe
platform.*being admin-only; its writes run with the administrator's token, so nothing it does is refused.
Tests: UserDirectoryTest (new Harvest group), UserDirectoryStoreContract.searchWithinTeams (run against real MongoDB and PostgreSQL), RestWorkspacesTest, RestWorkflowStoreReferenceAccessTest, RestAgentGroupStoreUseCheckTest, FacilitatorEngineTest (two RECRUIT cases), RestGlobalVariableStoreTest (M5 cases), AdminActionAuditFilterTest, McpGroupToolsTest and RestGroupConversationTest (unowned records), NamelessPrincipalAugmentorTest, ReservedPrincipalsTest, ConversationAccessGuardTest (new requireConversationTurnAccess group), RestAgentEngineTest; RestAgentEngineStreamingTest updated for the new guard method.
🔒 fix(security): group-discussion attachments get an owner, quotas and a delete path (2026-10-17)
Repo: EDDI (fix/security-review-data-lifecycle) — security review 2026-10-17, finding M4 and its REST edge.
What changed and why
A group discussion's inline attachments were stored with the five-argument IAttachmentStore.store(...), which records no user. So no per-user quota counted them (one eddi-user could store 100 MB per discussion, without bound), deleting the discussion left the blobs behind with nothing pointing at them, and nothing keyed on the user could find them.
Owner.
GroupAttachmentBinderstores with the discussion'suserId, soeddi.attachments.max-per-userandmax-total-bytes-per-usercount group uploads. A quota refusal no longer silently drops the file: the blobs the request had already stored are removed, the just-created discussion is failed, and the caller gets400(GroupAttachmentRejectedException; agroup_errorevent on/stream). A blob the rollback could not remove is logged at ERROR and stays owned by the failed discussion, where its delete and the user's erasure still reach it.REST edge.
RestGroupConversationre-checks the inline attachments againsteddi.attachments.max-size-bytesper file andmax-per-conversation/max-total-bytes-per-conversationfor the discussion before anything is decoded or stored (GroupAttachmentLimits, computed from the base64 lengths), as it already re-checks its other request ceilings. The body itself stays bounded byRequestBodyLimitGuardbefore it is read. Human input (submitHumanInput) carries no attachments, so there was nothing to bound there.Delete.
GroupLifecycleOps.deleteGroupConversationdeletes the discussion's blobs before the document. A failure keeps the document (500, retryable) rather than orphaning the blobs.storageRefguard.materializeAttachmentsused to pass astorageRef-only attachment straight tograntAccessfor every member. It now accepts one only from a trusted source conversation that can read the blob — the parent discussion, for a nestedGROUPmember, whichMemberTurnExecutorpasses through a newdiscuss(...)overload — and grants the child discussion access so the next level can repeat the check. A reference with no trusted source (anything a client could send) is refused. Unreachable from REST today; the guard keeps it that way.
Files
GroupAttachmentBinder.java, GroupAttachmentLimits.java, GroupLifecycleOps.java, GroupConversationService.java, MemberTurnExecutor.java, RestGroupConversation.java, IGroupConversationService.java; docs attachments-guide.md, group-conversations.md.
Not done here
Blobs stored by earlier releases still have no owner recorded, so they do not count towards a per-user quota. Deleting their discussion, or erasing its owner, now removes them.
closestill keeps the blobs (it keeps the transcript readable); onlydeleteand erasure remove them.McpGroupTools'delete_group_conversationdescription anddocs/mcp-server.mdstill name only artifacts and ephemeral agents (left to the workstream that owns the MCP group tools).
🔒 fix(gdpr): erasure and export reach group discussions; keyed database-log pseudonym (2026-10-17)
Repo: EDDI (fix/security-review-data-lifecycle) — security review 2026-10-17, findings M4 (erasure half) and L9.
What changed and why
Erasure reaches group blobs (M4).
GdprComplianceService.deleteUserDataresolved attachment owners fromgetConversationIdsByUserId, which returns 1:1 conversations only, so a discussion's shared files — stored under the group conversation's id — survived an Art. 17 erasure that reported success. The cascade now lists the user's group conversations (GroupConversationStore.listAllForUser, paged, exact-match re-check) before step 5c deletes them, and deletes the blobs of each discussion and of every member conversation it created. A failed lookup is reported as the stepgroupConversationAttachments. If that lookup fails, or a blob delete under a discussion or member id fails, step 5c keeps the discussion documents (reported asgroupConversations, kept for a re-run) — they are the only record of the ids the blobs are stored under, the way step 4c keeps the snapshots on an incomplete vault sweep (review follow-up).Export completeness (L9b). The Art. 15/20 bundle now carries
groupConversations(question, transcript, state, dates) andsharedArtifacts(content and revision history, via the newISharedArtifactStore.listAllForUser), each capped at 1,000 withgroupConversationsTruncated/sharedArtifactsTruncated, plusfailedCategoriesfor a store that failed. The group listing pages at the cap plus one row, not the storage maximum, since the store reads every row of a page in full. All three count againstcomplete(). The attachment inventory covers the discussions' blobs and their member conversations'.omittedCategoriesshrinks toschedulesandjournalEntries, so the endpoint still answers 207 until those land. MCPexport_user_datareports the same fields.Keyed pseudonym (L9a). The database-log pseudonym (and the pseudonym in GDPR log lines and compliance records) was
AuditHmac.pseudonymFor, an unsalted SHA-256 any list of candidate e-mail addresses reverses. NewGdprPseudonymizer: the audit ledger's keyed pseudonym (gdpr-erased:k1:…) when the ledger signs; otherwisegdpr-erased:s1:…, an HMAC under a random per-deployment salt kept withISecretPersistence.setMetaValueIfAbsent("gdpr-pseudonym-salt", …)— the metadata store and insert-if-absent patternVaultSaltManageruses for the KEK salt, present whether or not the vault is on; the unsalted form only if that store fails (WARN).
Design decisions
No migration of old pseudonyms. Rows erased earlier keep
gdpr-erased:<sha256>: the raw id is gone from them, so they cannot be re-keyed, and a re-run erasure matches on the raw id only.Audit-ledger step 7b keeps the unsalted token. Its blanket update reaches only v1–v4 and unsigned rows (the store already gives v5 rows the keyed pseudonym of their signing key), and a v3/v4 row signs exactly the unsalted token; anything else would break its signature. In the default
redactmode step 7a has already moved every reachable row to the keyed pseudonym.
Files
GdprComplianceService.java, GdprPseudonymizer.java, UserDataExport.java, AuditHmac.java, GroupConversationStore.java, ISharedArtifactStore.java, SharedArtifactStore.java, McpGdprTools.java, IRestGdprAdmin.java; docs gdpr-compliance.md, troubleshooting.md.
Not done here
MongoUserMemoryStore/PostgresUserMemoryStorestill log the unsalted pseudonym in their erasure log lines (server log only, not stored data).The Manager's GDPR export view does not render the new sections yet.
🔒 fix(vault): a secret create says where the secret may go; discover-endpoints pinned as never resolving (2026-10-17)
Repo: EDDI (fix/security-review-2026-10-17-h1-leftovers, built on fix/security-review-2026-10-17-high). Covers the two H1 leftovers from the 2026-10-17 security review.
What changed and why
1. POST /apicallstore/apicalls/discover-endpoints: checked, no fix needed. The question was whether it resolves a ${vault:…} or ${vars:…} value from the request and sends it to a URL the caller picked, the way discover-tools did. It does not. authHeaderRef must already be a reference (a literal is a 400), and McpApiToolBuilder.parseAndBuild copies it verbatim into the generated calls' Authorization header. The spec fetch (OpenApiSpecFetcher) sends only Accept and User-Agent. The reference is resolved later, when an agent makes the call, and the secret's grant and allowedHosts are checked at that point. A new test in RestApiCallsStoreBranchTest pins this: discovery from an inline spec whose server is https://attacker.example returns both references exactly as written.
2. A secret create needs allowedHosts under enforce. This is a breaking change. allowedAgents limits which agents may reference a secret, but any editor can write a config that sends a referenced secret to a URL they choose. So a secret created without allowedHosts went wherever the next config edit pointed it. Under eddi.vault.grant-enforcement=enforce (the default), a create through PUT /secretstore/secrets/{tenantId}/{keyName} or PUT /spacestore/secrets/{key} now gets a 400 when allowedHosts is omitted or []. ["*"] (alone, never as a pattern) is the explicit opt-out and is stored as the empty list. warn and off keep the old behaviour, and a rotation may still omit the list. The user agreed to the break before it was made.
VaultGrantRequests.requireHostsOnCreateis the host-side twin ofrequireGrantOnCreate, shared by both endpoints.VaultHostAllowlistgainsANY_HOST,isExplicitlyUnrestrictedandrequestedHosts(which maps["*"]to[], and otherwise works likevalidatedHosts).SetupSecretHostsnow delegates to it rather than keeping its own copy. The grant endpoint also accepts["*"]and treats it like[], which clears the restriction.Space secrets could not carry
allowedHostsat all.SecretWritegains the field, and a 3-argument constructor is kept.SpaceSecretnow returns the field.Manager: there is a shared
AllowedHostsFieldwith two choices, Only these hosts or Any host. It is used in Add Secret, in the secret picker's inline create, and on the Workspaces page, and the submit button stays disabled until one is chosen. The picker fills in the host from the config's URL for the MCP server URL, the A2A agent URL and the LLMbaseUrl/provider default. The Workspaces page create now also sendsallowedAgents: ["*"]: it sent no grant at all, so it already failed underenforce. Re-saving an existing space key sends no grant and no hosts, so the stored lists are kept. The MSW handlers model theenforcerules. The Operator prompt tells an admin a new secret needs its hosts. The operator revision is bumped.seed-demo-agent.shsent neither list and failed underenforce. It now sends both, with the host taken fromEDDI_DEMO_LLM_TYPE, or fromEDDI_DEMO_LLM_ALLOWED_HOSTwhen that is set (wired throughdocker-compose.openwebui.ymland.env.example). The cluster demo andAuditAndSecurityITnow send both lists too.Docs:
secrets-vault.md(new Required on a create section),workspaces.md,troubleshooting.md,upgrading-from-6.4.md§7.1.
Verification
./mvnw teston*Secret*Test,*Vault*Test,*Space*Test,AgentSetup*Test,SetupSecretHosts*Test,McpSetupToolsTest,ComposeStackTest,RestApiCallsStore*Test: 6114 run, and one fails:RestApiCallsStoreBranchTest.arbitraryPasswordInTheSpecUrlIsNotEchoed. That test resolves a.testhost over the network and fails locally withUncheckedIOException. This change does not touch it.Mutation check: with
requireHostsOnCreateremoved from both endpoints,createWithoutHostsRefused,createWithEmptyHostsRefusedandSpaceResourcesTest.createNeedsAllowedHostsfail.Manager:
npm run typecheck,lintandi18n:checkpass, and so do the targeted vitest files (secrets, picker, workspaces, use-secrets, MSW handlers, i18n, operator-revision). The full vitest suite and the Playwright run are left to CI.
Decisions
Folded in when this branch was synced with main (2026-10-19)
#1079 merged as a squash while this branch still carried its earlier commits, and main had moved on, so the sync merge resolves the overlap (operator revision 23 after later syncs past #1091, #1078 and #1056, main's dialog sizing, nameSeg encoding in space-resources.ts) and carries the fixes below:
mainwas red (#1066 against #1093: the response's cost sum converted every step that #1093 had made lazy). This branch fixed it first, but #1081 merged the same fix (conversationCostreads a lazy step list's total from the live steps), so the second sync takesmain's version and drops the duplicate./setup-apiapiAuth was locked to the LLM host by an explicitallowedHosts(#1079): the request's list names where the LLM key may go, so it no longer applies toapiAuth, which keeps the generated calls' target hosts; only an explicit["*"]carries over (AgentSetupService.apiAuthRequestedHosts).Timing limits in
ModelOutputParserFenceTestandConversationRecallToolTestrose from 100 ms to 1 s: the cubic case they guard against takes seconds, and 100 ms was a flake on a loaded CI runner.Workspaces → space secret Save stays disabled until the secret list has loaded: while it was loading or had failed, a save went out as a create with an open agent grant and could widen a key someone had narrowed.
The #1079 fragment now says its decision about REST creates is superseded here, and that its operator revision landed as 19.
🔒 fix(vault): wizard-vaulted keys carry a destination list; discovery probes resolve no vault reference (2026-10-17)
Repo: EDDI (fix/security-review-2026-10-17-high) — security review 2026-10-17, finding H1
What changed and why
Every key the setup wizard vaulted was stored with allowedAgents ["*"] and no allowedHosts. An eddi-editor can read the LLM configuration holding the ${vault:…} reference, so they could copy it, set baseUrl to their own host, deploy, send one message, and receive the key (reproduced live). The MCP discover-tools probe was a second path needing no agent: it resolved a ${vault:…} reference from the X-Mcp-Authorization header and sent the plaintext to the URL in the request body.
AgentSetupServicestores every secret it creates (the LLMapiKey; theapiAuthon/setup-api) withallowedHosts: the host of the base URL the request names, else the provider's own endpoint (newSetupSecretHosts— OpenAI, Anthropic, Gemini, Mistral, Hugging Face, jlama's model download, and the catalog of named OpenAI-compatible providers). ForapiAuthit is the host of each generated httpcall'stargetServerUrl.New
allowedHostsfield onSetupAgentRequestandCreateApiAgentRequest(appended last, positional constructors kept): an explicit list overrides the derived one,["*"]stores the secret open. Undereddi.vault.grant-enforcement=enforcean open secret is never created silently — when nothing can be derived and the request does not say["*"], setup returns a 400 before writing anything.warn/offstore it open with a[SECURITY]warning. Not exposed on the MCP setup tools.Checksum reuse now reuses an entry only when it is restricted to the same hosts, so a key an earlier release vaulted open is not handed to new agents.
ISecretProvider.storeIfAbsentgained anallowedHostsoverload, written in the same atomic insert byVaultSecretProvider(the default refuses a list rather than store the secret open).RestMcpCallsStore.discoverToolsrefuses a${vault:…}/${eddivault:…}or${vars:…}value inX-Mcp-Authorizationwith a 400 instead of resolving it.Platform Operator prompt: never set
allowedHosts; ask for the endpoint when a setup is refused for an unknown destination. Revision 17 → 18 on this branch;mainhad moved to 18 in parallel, so the merge landed it as 19.Docs:
docs/secrets-vault.md("Where a wizard key may be sent"),docs/mcp-client.md.
Design decisions
Derive, don't ask. The wizard knows where the key is going. A required field would break every existing caller; a derived list closes the hole for all of them. The list only constrains a configuration that names an endpoint; one without uses the provider's built-in endpoint and is not checked (
ChatModelRegistry.ENDPOINT_KEYS), so a slightly incomplete default list cannot break an agent.Existing entries are not migrated. A
vaultKeyNameor${vault:…}reference the admin names is used as it is. Keys already vaulted open stay open until an admin narrows them viaPUT …/grant.allowedHosts ["*"]is wizard-request syntax only. The secrets REST API still rejects*inallowedHosts, and still accepts a create without the field. Refusing that under enforce too would be a breaking change for the Manager's Secrets page, so it is left as a follow-up. Superseded by2026-10-17-fix-security-review-h1-leftovers.md: a REST create under enforce now requiresallowedHosts, with["*"]as the explicit opt-out.
Tests
AgentSetupAllowedHostsTest (new, 11): derived and requested lists, enforce refusal, explicit wildcard, warn mode, reuse of open versus restricted entries, the named-key insert. RestMcpCallsStoreTest: a reference in the header is refused before the manager is called, and a literal still probes. VaultSecretProviderAllowedHostsTest: storeIfAbsent persists the list. McpSetupToolsTest now asserts the end-to-end ["api.openai.com"]. Reverting the store argument or the probe check fails these tests (mutation-checked).
Not done here
POST /apicallstore/apicalls/discover-endpointswas not checked for the same probe pattern.The review's defence-in-depth items: requiring
eddi-adminto save a non-defaultbaseUrlnext to a vault reference the caller did not create, and a Manager warning badge for "unrestricted destination".
🔒 fix(ssrf): the metadata guard refuses a host java.net.URI cannot read (2026-10-17)
Repo: EDDI (fix/security-review-2026-10-17-high) — security review 2026-10-17, finding H2
What changed and why
UrlValidationUtils.rejectCloudMetadataTarget is the only check on the httpCalls path while eddi.security.ssrf-protection.enabled=false (the default). It read the host with java.net.URI and returned quietly when that host was null. URI gives a null host for any registry-style authority: an underscore (x_y.attacker.com), a percent-encoded host, or an IP literal with a trailing dot. The Vert.x client (HttpClientWrapper) parses the same string with java.net.URL, gets a host, resolves it and connects. An editor-written targetServerUrl naming such a host, with an A record of 169.254.169.254, therefore reached the cloud metadata service.
rejectCloudMetadataTargetnow throws for an unparseable URL, and for anhttp(s)URL whoseURIhost is null or blank. Whenjava.net.URLreads a different host, that host is checked as well. A URL with another scheme is still left to the caller.HttpClientModule.requireNotMetadataHoprefuses a redirect hop with no host instead of following it. A hop with an unreadable host is refused through the same check.Docs:
docs/security.md.
Behaviour change
An httpCall, MCP server or A2A peer whose host contains an underscore (for example a Docker service name such as my_api) is now refused even with SSRF protection off. Give it a hyphenated alias. The JDK HttpClient used by every other path already refused such URLs.
Tests
UrlValidationUtilsTest.unreadableHostIsRefused covers x_y.example, 169.254.169.254., 169%2e254%2e169%2e254, a single-slash http:/ and an unparseable URL. Its resolver answers "public" for everything, so only the new rule can refuse them. HttpClientModuleTest covers the same hosts as redirect hops, plus a hop with no host. The old assertion that an unparseable URL "is left to the caller" was inverted. Reverting the null-host throw fails both classes (mutation-checked).
🔒 fix(llm): linear JSON fence stripping; cap the recall tool's query (2026-10-17)
Repo: EDDI (fix/security-review-2026-10-17-high) — security review 2026-10-17, finding H3
What changed and why
ModelOutputParser.stripFence ran every reply of a convertToObject LLM task (and every FormatRetryRunner retry) through a regex with three quantifiers competing for one whitespace run. A reply of three backticks, N spaces and a letter cost O(N³): 462 ms at 1,000 spaces, 3.7 s at 2,000, about an hour at 16,000. That CPU is spent on the turn thread, and any chat user can trigger it by prompt injection, as can a hostile model endpoint.
stripFenceis nowstartsWith/endsWith/substring, plus an ASCII case-insensitive check for thejsontag. It returns the same result as the old regex for every input: the regex's leading[ \t]*\r?\n?and trailing\s*only moved whitespace that thetrim()removed anyway.ConversationRecallToolreads only the first 500 characters of the model-writtenquery(MAX_QUERY_LENGTH). Its range pattern was quadratic over a long digit run (10.9 s at 40,000 characters). A null query now means "the last summarized turns" instead of aNullPointerException.
Tests
ModelOutputParserFenceTest (new, 24) keeps the old regex as an oracle and compares it with the new code on 23 fixtures, including non-ASCII look-alikes of json and a vertical tab. It also runs the 50,000-space input through stripFence and through parse(), each within 100 ms. ConversationRecallToolTest adds a 40,000-digit query (100 ms budget), a turn range followed by a 40,000-char tail, and a null query. Removing the cap fails the budget test at 10.4 s. The fence budget was not mutation-run: the old regex needs hours at 50,000 spaces.
Not done here
The L14 alternation-loop regexes from the same review are untouched.
🔒 fix(security): outbound requests, parsers and templates from the 2026-10-17 review (2026-10-17)
Repo: EDDI (fix/security-review-outbound-parsers)
What changed and why
One commit per finding of the 2026-10-17 security review (M8–M11, L13–L16). PR #1079 (UrlValidationUtils, requireNotMetadataHop, ModelOutputParser, ConversationRecallTool) is not redone here.
M9.1 — group artifact JSON schemas could
$refthe network or the disk.ArtifactValidatorsnow builds its networknt factory with anAllowSchemaLoaderin front that admits only the bundled meta-schemas (classpath:draft/…,classpath:draft-0…); anhttp(s):,file:or other$refthrows before anything connects or is read. Refs are resolved eagerly at save time, so the save fails with an actionable message, and a ref first reached at write time refuses the write.ArtifactValidators.java, group-conversations.mdM9.2 — pgvector host injection. pgjdbc splices server names into its JDBC URL unencoded, so
host = "db/eddi?sslfactory=…&x="injected driver properties anda.com,10.0.0.5dialled a host the metadata guard never saw.EmbeddingStoreFactory.requirePlainHostaccepts one hostname (RFC 1123 labels,_allowed for Docker service names) or IP literal, nothing else, for pgvector and Qdrant.EmbeddingStoreFactory.java, rag.mdM9.3 — httpCall redirects with SSRF protection off. A new redirect-handler guard (
HttpClientModule.refusingPrivateHops) classifies each hop as public, private or loopback and follows a non-public hop only when the request that redirected (its connected address, else its resolved host) was in the same class, or the host is oneddi.security.ssrf-protection.allowed-hosts. A host-lessLocationis refused. Comparing with the previous hop is stricter than comparing with the first target. The DNS lookup of the hop and the client's own lookup are separate (JVM address cache); not pinned.HttpClientModule.java, httpcalls.mdM9.4 — credential header detection.
ApiCallExecutorflagged a header as carrying a vault secret only when the resolved set grew, so a${vault:k}already resolved in the body did not disable redirects for a custom header reusing it. It now checks the header's own text for a reference.ApiCallExecutor.javaM10 — templates. (a)
str:fmt/str:formatand theString.fmt/formatinstance forms are served by newBoundedFormatresolvers registered ahead of the generated ones: an upper bound for the output is computed from the format specifiers and refused againsteddi.templating.max-output-charsbeforeString.formatallocates (pre-check, not removal — formatting numbers is common in prompts). (b)quarkus.qute.timeoutis now effective: the render's deadline is a template-instance attribute checked on every value resolution (the bounded resolvers) and every loop iteration. (c)processTemplatereports aStackOverflowErroras a template error;validateTemplatetoo. Section nesting is not capped at parse time — Qute's parser is not recursive, the render is, and catching the overflow covers it.BoundedFormat.java,RuntimeTemplateEngineFactory.java,TemplatingEngine.java, security.mdM11 — PDF budgets on the attachment and tool paths.
AttachmentTextExtractorruns every PDF operation under the ingestion path'sPdfStreamBudgetpre-scan andPdfDecodeBudget(64 MB per stream, 128 MB per document), now public for that reuse, and the(startPage, endPage)variant reads at mosteddi.attachments.extraction.max-pagespages.AttachmentTextExtractor.javaL14 — regex stack overflow on long JSON strings. The
"((?:[^"\\]|\\.)*)"alternation loop inConfidenceEvaluatorandLifecycleManager.PROVIDER_ERROR_MESSAGErecursed once per character; both now useJsonStringField, a linear scan.summarizeExceptionandreportFailureToCallerno longer let aStackOverflowErrorescape the failure handler.JsonStringField.javaM8 — export scrubbing and sync rebinding.
SecretScrubberjudges structured strings part by part — a relativerequest.pathquery string, a form-encoded body, a JSON document inside a string (request.body,serviceAccountJson) — treatsCookie/Set-Cookieheaders as credentials, and runs the fullSecretRedactionFilter.redact(template expressions masked) over request material only —path,body, URLs/endpoints, header and query-parameter maps, embedded documents. Every other string (prompts, descriptions, outputs, rule values) gets only a credential-shape pass (SecretRedactionFilter.redactCredentialShapesplus export-side shapes:AIza…,gh*_/github_pat_,xox?-,AKIA/ASIA,gsk_,xai-, JWTs, the password ofmongodb(+srv)://user:pass@), so prose such as "never echo the password: policy" round-trips byte-identical. Vault references and template expressions stay legible. For/backup/import/sync*, the facade cannot pin an address, so every request to the source now carriesSourceUrlValidator.connectPolicy:STRICTwhen private targets are refused,METADATA_ONLYwhen they are allowed or the origin is allow-listed — re-checked by the facade right before each send.SecretScrubber.java,SourceUrlValidator.java, agent-sync-guide.mdL15 —
SharedKvCache.decode. The value class named in a NATS KV entry is matched against the exact classes the shared caches store (Boolean,String,A2ATaskRecord,PrincipalIndex,PaginatedResponse,ChannelTarget) instead of package prefixes; anything else is refused and logged at ERROR.SharedKvCache.javaL16 — templated JSON bodies. Documented that a runtime value in a JSON body must go through
{json:serialize(...)}without quotes of its own, and deployment now WARNs per httpCall whose JSON body has a{…}expression inside a string literal.ApiCallsTask.java, httpcalls.mdL13 (partial) — LLM provider response size. The OpenAI, Anthropic, Gemini, Mistral and Ollama builders use
BoundedJdkHttpClient: the langchain4jJdkHttpClientbuilt from anHttpClient.Builderwhose client wraps every body subscriber with a byte cap (eddi.llm.max-response-bytes, 32 MB; over the whole stream for streaming). Not capped: MCP responses (StreamableHttpMcpTransportbuilds its ownHttpClientand exposes no hook), Azure OpenAI and other SDK-based providers, and Jlama's Hugging Face download.BoundedJdkHttpClient.java
Review fixes (PR #1083)
SecretRedactionFilter's twosk-shape rules now start at a word boundary ((?<![A-Za-z0-9_]), the conventionEXPORT_CREDENTIAL_SHAPESalready used). Unanchored,redactCredentialShapes— which M8 made run over every exported prose string — turnedrisk-assessment-workflow-handlerintorisk-<REDACTED>; log redaction keeps its coverage since real keys start at a boundary.SecretScrubber.scrubStructuredTextreturns the original string, whitespace included, when an embedded JSON document comes back unchanged; it returned the trimmed text, so a body template ending in a newline exported trimmed andcontainsCredentialreported it.LifecycleManager'sStackOverflowErrorfallback digest carriestaskTypeanderrorType: stack_overflowlike the regular digest, soTurnError.fromTaskErrorkeeps the task metadata.LifecycleManagerFailureReportFallbackTestdrives it with an exception whosegetResponse()overflows insideLlmFailureClassifier.classify.The scrubber test fixture uses AWS's documented example key
AKIAIOSFODNN7EXAMPLE(gitleaks allowlists it) instead of a made-upAKIA…that Secret Scanning flagged.
Not done / open
M9.3 and M8 re-check rather than pin: the facade and the Vert.x client resolve names themselves, so a window remains between the guard's lookup and the client's (normally served by the same JVM address cache).
L13: MCP tool results, Azure OpenAI and Jlama downloads remain uncapped; an httpCall whose
future.get(timeout)expires is still not cancelled on the Vert.x side.M8 provider-key coverage in free text is whatever
SecretRedactionFiltermatches;AIza…-style keys in a query parameter namedkeyare caught once those patterns land there.
✨ feat(channels): signed inbound webhook channel — CloudEvents over HTTP (2026-10-15)
Repo: EDDI (feat/channels-signed-webhook)
What changed and why
Agents could react to chat turns and schedules, not to events. A new channel type, channelType: "webhook", lets an external system (GitHub, a payment provider, a monitoring stack) start an agent turn or a group discussion by POSTing a signed event to POST /integrations/webhook/{integrationId}. It reuses the channel machinery rather than adding a trigger system: ChannelIntegrationConfiguration, its targets table and ChannelTargetRouter (Pillar 3).
Authentication is the HMAC signature, verified over the raw body bytes against the addressed integration's one secret, fail-closed. Schemes:
eddi-v1(default;X-Eddi-Signature: t=…,v1=…, 5-minute window, severalv1for rotation),github(X-Hub-Signature-256),generic-hmac(header, hex/base64, prefix configurable). The HMAC/constant-time/freshness primitives moved into the sharedHmacSignatures;SlackSignatureVerifiernow uses them (behaviour unchanged).Formats: CloudEvents 1.0 structured and binary mode, and plain JSON (type from a header or JSON pointer, else
webhook). All three yield the sameeventmap, which reaches the conversation as the context valueevent— data, never a template. The input text is the author'sinputTemplate, rendered by the restricted runtime Qute engine, defaultevent:<type>.Routing by event type against
targets[].triggers(exact orprefix*, most specific wins), else the default target; agents and groups.Review fixes: a repeat delivery that arrives while the first is still being processed answers a retryable
409(Retry-After: 5), not200 duplicate— the first may still be refused, and a 200 would have lost the event; only a recorded202makes a repeat a duplicate.HmacSignatures.isFreshis overflow-safe (subtractExact/absExact; a timestamp ofLong.MIN_VALUE + nowused to read as fresh — also used by Slack). Events without an id are deduplicated on the signature value for every scheme, not onlyeddi-v1: forgithubandgeneric-hmac, which sign no timestamp, that window is the only replay protection, as the docs now say.PR review (#1059): deduplication is keyed by the event id AND by a canonical replay key the verifier derives from the MAC it computed (never from the sender's header — an extra
v1=candidate or upper-case hex no longer yields a fresh key), so a captured request replayed under a new, unsigned delivery id is a duplicate. Trade-off, documented: byte-identical signed deliveries within the window count as one. Docs separateeddi-v1'st + "." + bodyMAC input from the body-only schemes; the Manager labels the create-dialog secret field, namesX-Signatureas the generic-HMAC default, and promises stale-request refusal only foreddi-v1. A secondt=entry inX-Eddi-Signatureis refused as malformed (it let the verified timestamp and the replay key diverge), andeddi.webhook.eventsalso counts refusals answered before dispatch.Conversations:
newper event, orcorrelate— one conversation per value atcorrelationKeyPath, mapped throughIUserConversationStorelike Slack threads.Identity: turns run as
webhook:<integrationId>.Delivery: 202 with the conversation id; repeated event id → 200 duplicate (10-minute Caffeine cache, released when an event is refused so retries work); 413 above 256 KB (
eddi.webhook.max-body-bytes); 429 +Retry-Afteron tenant quota; 503 when the agent is not deployed.Validation: a webhook integration must have
platformConfig.signingSecret, and it must be a${vault:…}reference (400 otherwise); unknown schemes, non-pointer paths,correlatewithout a key path andobserveModetargets are refused.HTTP policy
quarkus.http.auth.permission.webhook(POST, permit) plus@PermitAllon the resource, as for Slack.Manager:
webhookin the channel type list, a create-dialog step and detail-page section for its settings, the endpoint URL and the signing format (11 locales). MCPcreate_channel_integrationdocuments the type and returnswebhookEndpoint. Platform Operator prompt knows the type (revision bump).Docs: new
webhook-triggers.md.
Design decisions
Quota-consuming steps run before the response.
startConversationandsayare called on the request thread:sayonly admits the turn and queues it on the conversation coordinator, so the agent's work is still asynchronous, but the 202 can carry the conversation id and a quota refusal can still be a 429. A separate executor (Slack's pattern) would have made the 429 unreportable. Cost: a new conversation'sCONVERSATION_STARTturn runs inline — documented.Body as bytes, not
String. The MAC covers what the sender signed; a charset round trip can alter invalid UTF-8. The body is read with a hard cap before any verification; nothing is parsed before the signature passes.Webhook integrations are keyed by their resource id in the router (no
channelId), so the URL needs no extra configuration and cannot collide.Signing secret must be a vault reference — the endpoint is public, and a plaintext secret is returned by
GET /channelstore/channels/{id}and exported. Slack only warns, for back-compat; the new type has none to keep.Not reused:
TurnIdempotencyServiceis per-conversation and the event has no conversation yet; deduplication uses the cache factory, like Slack.
Not done / next
Deduplication is per node; a NATS cluster could run a replayed event once per node.
A new integration is reachable only after the router's 60-second refresh.
Files: RestWebhookChannel.java, WebhookEventHandler.java, WebhookEventParser.java, WebhookSignatureVerifier.java, HmacSignatures.java, WebhookChannelSettings.java, ChannelTargetRouter, RestChannelIntegrationStore, SlackSignatureVerifier, McpAdminTools, application.properties, Manager channel pages + webhook-settings.tsx, operator prompt.
✨ feat(llm): classifier guardrail type — a safety-classifier model as configuration (2026-10-15)
Repo: EDDI (feat/llm-classifier-guardrail, stacked on feat/llm-input-output-guardrails) — WS4 Phase 4b.
What changed and why
The 4a guardrails are deterministic heuristics. Phase 4b adds one generic model-backed type, classifier (input and output), that asks a safety-classifier model for a verdict, so Granite Guardian, ShieldGemma, a hosted moderation model or a TrustyAI-served detector are configuration values, not code. EDDI ships and endorses no model.
ClassifierGuardrail(modules/llm/guardrails/impl) — aContentGuardrailbean, picked up byGuardrailService's type index like every other. Parameters:provider(an EDDI provider type) plus that provider's own model parameters in a task's vocabulary (baseUrl,apiKey— a${vault:…}reference, resolved and grant-checked as for a task —modelName/model,customParameters,maxTokens, …), and its own keyspromptTemplate,risk,unsafeLabel(defaultyes),safeLabel,labelPattern,timeoutMs(default 3000, cap 60000),includeRetrievedContext(output),inputPricePer1M/outputPricePer1M, and the genericfailMode.Transport is
ChatModelRegistry.getOrCreate(made public), notSafeHttpClient: classifier endpoints are in-cluster private addresses, the same trust class as a task's modelbaseUrl; the registry also brings vault/global-variable resolution, the model cache and LLM telemetry.timeoutMsbecomes the providertimeout(a stable cache key), and the call itself runs on a virtual thread bounded bymin(timeoutMs, turn deadline − reserve)(#996); a turn already out of time does not call the classifier.Prompt: without
promptTemplatethe text goes as the model's native conversation (input: the user message; output: question + answer as an assistant message), which is what Granite Guardian on vLLM and ShieldGemma on Ollama expect — their chat templates build the classification prompt. WithpromptTemplate, the template is rendered by the restricted Qute engine with the screened text as data only ({input},{output},{risk},{context}) — never as template source.Verdict: label = first capture group of the last
labelPatternmatch (Granite's<score> yes </score>, after an optional<think>trace), else the first word with punctuation trimmed; compared case-insensitively withunsafeLabel/safeLabel.Could not decide → new
GuardrailUndecidedException(reason, costUsd):GuardrailService.evaluatenow returns an internalEvaluationand the three failure sites (input, history, output) record the exception's reason (classifier_unavailable,classifier_unparseable) instead ofguardrail_error, and add its cost. Everything else about failMode is 4a's single code path (closed by default forblock/reprompt).Cost: priced with
TokenPricingfrom the classifier's token usage intoGuardrailVerdict.costUsd, which 4a'saccumulateCostfolds intoaudit:cost(WS2's tenant metering reads that key) — including the cost of an unparseable answer.Context:
GuardrailContextgainsretrievedContext(this turn's vector-store +httpCallRagcontext, output phase) anddeadline; the old six-argument constructor stays.LlmTaskcollects the retrieved context it already appends to the system message and passes both. The HITL resume path has no retrieved context (null).Metric: timer
eddi.guardrail.classifier.duration{provider, outcome}(provider tagged only after the registry accepted it, so bounded; outcomesafe|unsafe|unparseable|unavailable|timeout);eddi.guardrail.triggeredunchanged. Both now have panels on the Full Metrics dashboard — 4a's counter had none, whichMetricsDashboardCoverageTestflagged.Docs: langchain.md (parameters, template safety, could-not-decide, cost/latency, worked examples for Granite Guardian 3.3 on vLLM and ShieldGemma on Ollama), security.md (the failMode availability trade-off, transport trust), metrics.md, audit-ledger.md. Operator prompt explains configuring a classifier (it never writes the vault reference itself); revision stays 17 (main is at 16), fingerprint updated. Manager
GuardrailConfigdoc comment lists the type.
Design decisions
screensHistory()is false: a model call per earlier history message on every turn would multiply the cost by the window size; each message was classified on its own turn.promptTemplateoptional (the plan had it required): the two documented models expect the raw conversation and build their own prompt; a wrapper prompt would be classified as content.labelPatternadded (not in the plan): Granite Guardian answers inside a<score>tag, which first-token matching cannot read. It is author config, compiled through 4a's boundedPatternCache.Safe is a positive match, never a default (review follow-up). An answer is safe only when it matches
safeLabel; a refusal, an HTML error body,maybeor a truncated reply is undecided and followsfailMode(closed by default).safeLabeldefaults tonowhenunsafeLabelis left atyes; a customunsafeLabelwithoutsafeLabelfails the deploy —LlmTask.configurenow asks each guardrail type to validate its parameters (ContentGuardrail.validate, default: nothing to check; unknown types still only WARN at run time). A missingprovideris refused the same way.labelPatternruns over the last 4 KB of the answer (the first word over the first 4 KB), so an author regex never scans an unexpectedly huge reply.Llama Guard: not given a worked example. Meta's Llama 3.2/3.3/4 acceptable-use policies withhold the licence rights for their multimodal models from EU-domiciled companies, which covers Llama Guard 4 and Llama Guard 3 Vision; the text-only Llama Guard 3 is mentioned with that caveat, and ShieldGemma is the Ollama example. EDDI takes no position on any model's licence.
Provider error messages are never logged or propagated (they can echo the screened text); only the exception class.
Manager
The guardrails editor from the merged Manager PR offers
classifieragain on both sides (GUARDRAIL_TYPES, phases, no-rewrite set and type text inguardrails.ts); its settings panel and warnings were already in place. The editor test that asserted it was not offered now asserts it is.operator-revision.jsonis bumped for the operator prompt change.
Not done
The Granite Guardian
chat_template_kwargsexample is per the model card and vLLM's request extension; it was not run against a live vLLM here.
feat(llm): generic openai-compatible provider type for self-hosted servers (2026-10-15)
Repo: EDDI (feat/llm-openai-compatible-provider; backend, Manager, docs, Platform Operator)
What changed and why
Production on-prem inference runs on vLLM, llama-server, TGI, KServe or LiteLLM. EDDI could reach them only as type: openai + baseUrl, and so judged them as OpenAI: JSON mode was sent alongside tools (a 400 on servers that do not support the combination), vision was decided by OpenAI model names (a self-hosted Qwen-VL was text-only), and telemetry reported the traffic as OPEN_AI. The named-provider catalog cannot describe these servers by design: it requires a fixed https:// endpoint and a fixed default model.
New LLM type
openai-compatible(OpenAiCompatibleEndpoint,SelfHostedOpenAiLanguageModelBuilder, registered inLlmModuleand reserved inBUILT_IN_TYPESso no catalog row can take the id). It runs on the OpenAI builder.baseUrlandmodelNameare required;http://is accepted and the cloud-metadata block stays.apiKeyis optional: verified against langchain4j 1.22.0'sDefaultOpenAiClient, a null key adds noAuthorizationheader, and a blank key is now removed before it could becomeBearer.Per-endpoint capability flags, in the catalog's own vocabulary (
OpenAiCompatibleProvider.Capabilities):jsonMode,jsonModeWithTools,vision, all off by default.JsonResponseFormatPolicygained anendpointcomponent, filled by a newof(..., parameters)overload at all three call sites:LlmTasklive,LlmTaskHITL resume, andCascadingModelExecutor, which passes the step's merged parameters.ModelCapabilityService.visionOverrideplaces the endpoint'svision=truebelow the per-taskmultimodal.visionoverride and above the deployment override; the built-in default for the type is off.Strict literal flags, lenient templated ones. A literal flag that is neither
truenorfalsefails the deploy (OpenAiCompatibleConfigValidator, run fromLlmTask.configurefor the task, each cascade step and the judge) with a message naming the parameter; so does a missingbaseUrl/modelName. LLM parameters are rendered by Qute before the request is built, but${vars:...}is otherwise only resolved insideChatModelRegistry, so the call sites resolve global variables in the three flags first (OpenAiCompatibleEndpoint.withResolvedFlags). A templated flag that still is not a boolean counts asfalsewith one WARN per distinct value (bounded): it never fails the build or the turn.customParametersmust parse to a JSON object for this type (the OpenAI builder only warns and drops it).Telemetry.
serverName(defaultopenai-compatible) is reported asgen_ai.provider.nameand theprovidermeter tag in place of langchain4j'sOPEN_AI, through a provider-name override onLlmTelemetryListener.forModelTypeand the observable model wrappers. It is bounded: lower-cased, 1-32 characters of[a-z0-9._-], else the default.Model cache. The three capability flags are left out of
ChatModelRegistry's cache key for this type (they shape requests, not the model instance);serverNamestays in, because the telemetry wrapper bakes it in.Parameter catalog.
model-parameters.jsonhas anopenai-compatiblerow that inherits OpenAI's parameters without their model rules and addsserverNameand the three flags; the Manager mirror anddocs/llm-parameters.mdare regenerated. Its inheritedresponseFormatis overridden with a "do not use" note pointing atconvertToObject/jsonResponseFormatandjsonMode, since the OpenAI builder bakes it into the cached model.Setup.
AgentSetupServicetreats the type as keyless and requiresmodelandbaseUrl/llmBaseUrlup front instead of injecting the SaaS default model; the MCPsetup_agent/create_api_agentdescriptions name it.Manager. "Self-hosted (OpenAI-compatible)" in the local group of the provider picker (agent wizard, operator activation, LLM editor, cascade steps, summary provider): required model and base URL with examples, an optional API key, and a note that the capability flags are switched on under Model settings, where they render from the catalog with a one-line explanation each. Pickers with no base URL field do not offer it: the workforce team builder, the group wizard's members and moderator, the cascade judge and a group's summarizer. The rolling-summary provider offers it only when the task itself is
openai-compatible, because the summarizer then inherits the task'sbaseUrland key. 7 i18n keys in all 11 locales.Docs and Operator. A "Self-hosted OpenAI-compatible servers" section with a migration note in
docs/langchain.md, the provider matrix row, and notes indocs/metrics.mdanddocs/model-cascade.md. The Platform Operator prompt describes the type;operator-revision.jsonis bumped to 24 (one above main).
Design decisions
customParametersis the extra-body mechanism, not a newextraBodykey: it already is a JSON object merged into the request body with the user winning, the Manager already renders it, and a second key with the same meaning would need a precedence rule. It is made strict for this type only, sotype: openaibehaviour does not change.No
jsonSchemaflag yet. Nativejson_schemasupport differs between servers and versions, and the plan ties it to the structured-output work (D5); schemaless JSON is sent whenjsonModeallows it.vision=falsedefers rather than vetoes: absent orfalseboth fall through to the deployment override and then to the off default, so an operator'seddi.multimodal.openai-compatible.vision=onstill applies to endpoints that did not set it.type: openaiis untouched, pinned by a regression test of its JSON-policy rows, its native schema, its vision decisions and an oldtype: openai+baseUrlconfig.
Not done
Model discovery via
GET /v1/modelsand the deployment-level provider allow-list (C3) are out of scope.CreateSubAgentToolhas no base URL parameter, so it refuses this type up front with a message telling the model to pick another provider or have an administrator create the agent.
🔒 fix(deploy): runtime and deployment findings of the 2026-10-17 security review (2026-10-17)
Repo: EDDI (fix/security-review-runtime)
What changed and why
The runtime and deployment workstream of the 2026-10-17 security review — M6, M7, L7, L8 and the small L12/L13 items. One commit per finding.
M6 — the authenticated PostgreSQL install could not start, and two stacks had no bind-guard.
docker-compose.auth.ymloverridesbind-guard, which onlydocker-compose.ymldeclared, so-f docker-compose.postgres-only.yml -f docker-compose.auth.yml— exactly whatinstall.sh --db=postgres --with-authandinstall.ps1compose — failed with "service bind-guard has neither an image nor a build context". Separatelydocker-compose.postgres-only.ymlanddocker-compose.cluster.ymlpublish on${EDDI_BIND:-127.0.0.1}with the three*_ALLOW_UNAUTHENTICATEDdefaultstrueand no guard, soEDDI_BIND=0.0.0.0published an open EDDI, MCP server and vault there. Both stacks now carry the same guard (on the database image each already pulls; in the cluster the load balancer waits for it). Design: the guard stays in every base rather than moving to an overlay — a base used on its own must still refuse — andComposeStackTestmakes the duplication safe: the copies must be byte-identical in script and inputs, every stack that publishes onEDDI_BINDmust have one, every combination the installers can assemble (base ×--local×--with-auth×--with-monitoring, read back out of both installers) and every multi-file command README/docs/print is checked structurally (every service anddepends_ontarget resolves) and, where a Docker CLI exists, rendered withdocker compose config. That sweep also founddocs/mcp-server.mdtelling users to rundocker compose -f docker-compose.auth.yml down -von its own, which compose refuses; fixed. Files:docker-compose.postgres-only.yml,docker-compose.cluster.yml,docker-compose.auth.yml,ComposeStackTest.java,docker.md,mcp-server.mdM7 — the unauthenticated quick start had no
Host/Origincheck. Loopback binding stops the network, not the browser: a DNS-rebinding page (Host: evil.exampleresolved to127.0.0.1) was same-origin with the whole API, MCP and/secretstore, and without rebinding a page could still send blind CORS "simple"POSTs. The newUnauthenticatedRequestGuard(a Vert.x route filter registered likeHttpMethodGuard, and only whileauthorization.enabled=false) answers 421 to aHostthat is notlocalhost/*.localhost, an IP literal or an entry of the neweddi.security.unauthenticated.allowed-hosts, and 403 to aPOST/PUT/PATCH/DELETEwhoseOriginis neither the request's own nor inquarkus.http.cors.origins(nullincluded) or, without anOrigin, whoseSec-Fetch-Siteiscross-site/same-site./q/healthis exempt; one[SECURITY]WARN at boot states the policy. Design decision, deviating from the review's "loopback only": IP literals are always answered. Rebinding needs a DNS name the attacker controls, so an address cannot be its product, and kubelet probes, Prometheus scrapes (pod IPs) andeddi.self.base-url(http://127.0.0.1:…or a pod IP) address EDDI that way; the cross-site check still covers a page that posts to an address. The rawHostheader is read, never a forwarded one — a rebound page is same-origin and may setX-Forwarded-Host. The compose stacks default the allow-list toeddi(Prometheus and Open WebUI reach EDDI by service name), the kustomize base and quickstart to the Service's in-cluster names, and the Helm chart (when OIDC is off) to the Service names plus any acknowledged ingress host. Chart2.8.0→2.9.0. Files:UnauthenticatedRequestGuard.java,UnauthenticatedRequestGuardTest.java,security.md,configuration-reference.mdL7 — runtime defaults. Done:
HSTS. The GCP provisioner's nginx sends
Strict-Transport-Security: max-age=31536000on both https servers (noincludeSubDomains— sslip.io names are not ours), and EDDI gains an opt-inHstsHeaderFilter(eddi.security.hsts.enabled, defaultfalse;eddi.security.hsts.max-age). The Helm chart sets it wheningress.enabledandingress.tlsare both set./q/healthdetail. The cluster readiness check reports its details (mode, NATS state, node id, member count, drain state,degradedSince) only with the neweddi.health.verbose=true; by default the public endpoint carries the status alone.GET /administration/cluster/overviewstill has everything, authenticated. (Gated inClusterHealthCheckitself, so the readiness data is gone, not merely moved behind a path.)agentsInErrorCountstays — it is a count, documented as deliberately public.Keycloak realm (all three copies, kept in step):
passwordPolicy(length(12) and maxLength(128) and notUsername and notEmail and passwordHistory(3)— the installers' generated one-time passwords are 32 characters), login and admin events on (30 days, admin event bodies off),eddi-mcpwithconsentRequired: trueandfullScopeAllowed: falseplus ascopeMappingsentry for exactly theeddi-*roles, seeded usersemailVerified: false. Verified by importing the realm intoquay.io/keycloak/keycloak:26.8.0and generating an exampleeddi-mcpaccess token (roles andaudstill present). Realm import is one-shot: existing realms keep their old settings (documented in security.md).GCP nginx returns 404 for
/realms/master/(the provisioner reaches it on localhost:8180, not through nginx).Kubernetes. The production NetworkPolicy's ingress-controller rule is pinned to the
ingress-nginxnamespace bykubernetes.io/metadata.nameinstead of admitting a controller-labelled pod from any namespace. MongoDB, PostgreSQL and Keycloak pods (Helm, kustomize overlays, quickstart) run as their image's own uid from the start (Mongo 999, Postgres alpine 70 — Helmpostgres.runAsUser— Keycloak 1000) withallowPrivilegeEscalation: false,capabilities.drop: [ALL]and the RuntimeDefault seccomp profile; both databases were started that way in Docker (--user … --cap-drop ALL --security-opt no-new-privileges) to confirm their entrypoints still initialise.quarkus.swagger-ui.oauth2-redirect-urlis no longer pinned tohttp://localhost:7070; Swagger UI derives it from the page's origin.docker-compose.yml's MongoDB healthcheck no longer carries the root password on its command line (docker inspect, host process list):pingneeds no authentication.
Deliberately not done here: Keycloak
start-devand theadmin/admincompose fallback (the installers and the GCP provisioner already generate one; a production Keycloak mode needs a database and hostname design of its own), EDDI connecting to MongoDB as root, plaintext service-to-service traffic, NATS without auth and the unauthenticated MongoDB in the kustomize quickstart, andquarkus.log.console.level=DEBUG(the handler level only; categories stay at INFO). Files:HstsHeaderFilter.java,ClusterHealthCheck.java,eddi-realm.json,provision-vm.sh,network-policy.yamlL8 — installer integrity (the minimal version). The release job in
ci.ymlnow checks out the tag, hashes every file the installers download (docker-compose*.yml, the realm, the login theme,docs/monitoring/) intoSHA256SUMSand attaches it to the GitHub release.install.shandinstall.ps1fetch that asset whenEDDI_BRANCHis a release tag and refuse a downloaded file whose hash differs (the file is deleted); with no asset —main, a branch, every release before this one — they warn that only TLS vouches for the files and carry on, so existing installs do not break. Exercised with stubbed downloads for both scripts (accept, unlisted → warn, mismatch → refuse and delete, non-release ref → warn).gcp/provision-vm.shdefaults--eddi-branchto the--eddi-versiontag or the newest stable release (GitHub API), falling back tomainwith a warning.postgres:16-alpineis pinned topostgres:16.15-alpinein the compose stack (database and bind-guard), the kustomize overlay and the Helm values. Not done: the installers cannot verify themselves (curl | bashfrommainstays TLS-only), the CLI'seddi updaterefresh path does not verify, there is no cosign signature on the asset, compose still defaults tolabsai/eddi:latest, andmcp-sidecar/Dockerfile's unpinnednodejs npmis untouched. Files:install.sh,install.ps1,ci.yml,security.mdL12/L13 — small items.
quarkus.http.cors.exposed-headersnow exposesMcp-Session-IdandRetry-Afternext toLocation, so a browser-based MCP client on an allowed origin can read its session id and a 429/503's back-off. The7443mapping the compose stacks publish is documented rather than removed: it is Quarkus' HTTPS port, opened only once a certificate is configured, and removing it would have touched every installer's port resolution for no security gain (nothing listens). Dependabot #716 was not stale, contrary to the review: it bumps theeclipse-temurin:25-jredigest insrc/main/docker/Dockerfile.demo(the Open WebUI demo image), which still uses that base — nothing changed here. Files:application.properties,docker-compose.yml,docker.mdM7 follow-up (live dev-mode test).
host.docker.internal,gateway.docker.internalandhost.containers.internalare now answered built in — that is how a container reaches an EDDI on the host, the container runtime's resolver answers them, and.internalis a reserved TLD public DNS never delegates. Three unexpected400s from the live test (Host: eddi.localhost:7070,Host: localhost., and/q/health/livewithHost: evil.example) were traced to Quarkus 3.40's ownHostValidationFilter, not this guard: it is switched on in dev and test mode because the server bindslocalhost, accepts onlylocalhost/127.0.0.1/[::1]and ends anything else with an empty400(confirmed from its bytecode, and by the guard answeringevil.examplewith its own421on a non-exempt path of the same instance). The released 6.5.0 image (binds0.0.0.0, filter off) answers all three with200. The guard's own decisions for the three are pinned inUnauthenticatedRequestGuardTest, anddocs/security.mdexplains the dev-mode400.
Design decisions
bind-guardis duplicated into every base stack rather than moved to an overlay, and a test pins the copies together — moving it out would have leftdocker compose upon a base alone unguarded.The M7 guard answers any IP-literal
Host(see above) and reads only the rawHostheader;*in the allow-list switches the Host check off, logged at boot./q/healthdetail is gated in the health check (eddi.health.verbose) instead of narrowing the public permit, because the sensitive data is in/q/health/readyitself.Installer checksum verification is warn-only when no
SHA256SUMSexists, so every release before this one keeps installing.
What's next
The Platform Operator (
ui/manager/src/lib/operator/system-prompt.ts, WS-F's area) does not yet know abouteddi.security.unauthenticated.allowed-hosts,eddi.health.verboseoreddi.security.hsts.enabled; an admin asking "why 421?" will not get an answer from it.L7 and L8 items listed as not done above.
The review itself is now in the repository.
planning/security-review-2026-10-17.mdis the report everysecurity review 2026-10-17, <id>reference in code and fragments points to, with a status line, the live-probe results, what was verified clean and the remediation table;docs/security-review.mdgains an entry for the October reviews.
🔒 fix(security): editors no longer read plaintext credentials in any config store (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
What changed and why
M1 of the 2026-10-17 security review. The 2026-10-15 fix (L12) redacted plaintext keys for non-admins in tasks[].parameters of LLM configurations only; editors still read them verbatim in a2aAgents[].apiKey, modelCascade step and judge parameters, the MCP-calls apiKey, a Slack integration's botToken/signingSecret (enough to forge /integrations/slack/* events), RAG embeddingParameters/storeParameters, and literal Authorization headers and keys in an httpcall's request.path and request.body — current and old (?version=) versions alike.
One shared read-redactor,
ConfigSecretRedactor(secrets.sanitize), walks the serialized document: credential-named fields are replaced whole, header and query-parameter maps are judged by header/parameter name, URLs lose their userinfo password and credential-named query values, andbodyfields go throughSecretRedactionFilter. References (${vault:},${vars:},${connection:},${caller:}) and templates pass unchanged, also beside a scheme word (Bearer ${vault:k}).tokenmatches only singular, somaxTokensandthinkingBudgetTokensare untouched;httpCalls[].parameters(tool parameter descriptions) andtasks[].toolCacheScopes(keyed by tool name) are skipped.RestLlmStore,RestMcpCallsStore,RestChannelIntegrationStore,RestRagStoreandRestApiCallsStoreapply it for every caller who is noteddi-admin. MCPread_resource/read_channel_integrationreach the same REST stores through the loopback client, which forwards the caller, so they are covered too.RestLlmStore's write-time warning now uses the same detection, so it warns about exactly what an editor cannot read back.RestRagIngestionreads the knowledge base through the newRestRagStore.readUnredacted(same access check, no redaction): ingestion builds the embedding model from that document and must not send the marker.
Design decision: no merge-back of the stored literal when an editor saves a redacted document — the marker is saved and fails at the provider. Merging it back would let an editor move the marker next to a host of their choosing (H1 with extra steps).
Upgrade and sync read their targets unredacted, and the previews an editor sees are redacted at the REST boundary — see the last entry below.
Files: ConfigSecretRedactor.java, RestLlmStore.java, RestMcpCallsStore.java, RestChannelIntegrationStore.java, RestRagStore.java, RestRagIngestion.java, RestApiCallsStore.java, security.md, secrets-vault.md
Tests: ConfigSecretRedactorTest (rules, idempotence, a linear-time check on adversarial braces), one *ReadRedactionTest per store; each store test was mutation-checked by removing the redaction and watching it fail.
🔒 fix(security): resetting a tenant's vault requires confirm=true (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
L11 of the 2026-10-17 security review. POST /secretstore/secrets/{tenantId}/reset deletes every secret and DEK of a tenant and had no confirmation, unlike adopt-master-key. It now requires ?confirm=true; without it the answer is a 400 with {"error": "confirm=true is required", "action": …} and nothing is deleted. The Manager's reset dialog (which already makes the admin type the tenant id) sends the flag, and the adopt-master-key response names it.
Files: IRestSecretStore.java, RestSecretStore.java, secrets.ts, secrets-vault.md
🔒 fix(security): name the vault secrets that may still be sent anywhere (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
The residual of H1 in the 2026-10-17 security review: PR #1079 makes the setup wizard set allowedHosts on every key it vaults from now on, but every secret vaulted before it keeps an open destination, so an editor can still exfiltrate it by pointing a copy of the LLM configuration at their own host.
New
UnrestrictedSecretsCheck(next toVaultStartupBanner): when the vault is enabled it scans, on a virtual thread after boot, the current version of every LLM, MCP-calls, RAG, httpcalls and channel configuration for${vault:…}references, reads each referenced secret's metadata, and logs one[SECURITY]WARN naming every secret withoutallowedHosts(tenant/key), the configurations that reference it, and thePUT /secretstore/secrets/{tenantId}/{keyName}/grantcall that narrows it.GET /secretstore/secrets/{tenantId}(admin-only) now returnsSecretListingentries: the same metadata fields as before plusunrestrictedDestination(live:allowedHostsempty) andreferencedBy(from the last complete scan; absent before one).The scan says when it could not read every configuration: one
[SECURITY]WARN, andreferencedBystays absent rather than claiming that nothing references a secret the unread configuration may use.
Design decision: no automatic migration. Only the admin knows which host a key belongs to; a wrong guess would break a working agent. AgentSetupService and VaultSecretProvider are untouched (PR #1079 changes them).
Not covered: references reached only through ${vars:…} or ${connection:…}, and old configuration versions that are still deployed. No Manager warning state yet (UI).
Files: UnrestrictedSecretsCheck.java, SecretListing.java, RestSecretStore.java, secrets-vault.md
🔒 fix(security): the free-text redaction filter knows more provider key shapes (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
L6 of the 2026-10-17 security review. SecretRedactionFilter — which backs logs, dead letters, the audit scrub, HITL approval cards and now the config read-redaction — recognised only sk-, sk-ant-, Bearer and named fields. Patterns added (no existing rule changed): Google AIza…, xAI xai-…, Groq gsk_…, GitHub gh[pousr]_… and github_pat_…, Slack xox[baprse]-…, AWS AKIA…/ASIA… (exactly 16, not inside a longer run), bare JWTs, the credential after Authorization: Basic|Token|Digest, …Subscription-Key: headers, and the userinfo password of mongodb(+srv), postgres(ql), mysql, redis(s) and amqp(s) connection strings. (api-key:/x-api-key: were already matched by the API-key name rule.)
Every pattern is a literal prefix plus one possessive or bounded character class that admits no quote, backslash or brace, so a match cannot cross a JSON string or eat a ${vault:…} reference. The JWT rule is the one that can fail after consuming a long run, so a lookbehind admits a start only where a token run begins — without it eyJ repeated 60,000 times is quadratic (the mutation check timed out at 30 s).
The connection-string rule had a 256-character ceiling on the user and on the password, and stopped at the first @, so a longer password — or a malformed one carrying a raw @ (u:abc@tail:pw@host) — went through in part. The password is now walked by hand to the last @ of the authority, in one pass. The labelled scheme rule lost its six-character floor (Authorization: Basic YTpi is a:b), and a quote escaped inside a JSON-carried Digest value no longer ends that credential early. Two gaps found in review: a Digest header lost only username= — the scheme rule took one unquoted token and left response=, the credential proper, legible — and now loses its whole directive list, walked by hand rather than by a pattern, since a quantified group recurses once per directive; and a bare Basic <base64> with no header name in front is redacted when the token decodes to user:password, so Basic configuration stays prose.
Files: SecretRedactionFilter.java, SecretRedactionFilterProviderShapesTest.java, secrets-vault.md
🔒 fix(security): legacy no-AAD vault rows are re-sealed bound on first read (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
L10 of the 2026-10-17 security review. VaultSecretProvider.decryptSecretWithFallback kept a permanent no-AAD fallback for rows written before row binding, so with database write access the ciphertexts of two such rows could be swapped and each still decrypted. Only a DEK rotation retired the fallback, and a deployment that never rotates kept it forever.
resolve()now notices when a row opened only through the legacy path and re-seals it bound (tenantId|keyName|dekIdAAD) under the same DEK generation, through the newISecretPersistence.resealSecretInPlace(Mongo and Postgres). It rewrites only the ciphertext and IV — notdekId, notlastRotatedAt— and is guarded on the IV the row was read with: a dekId guard cannot see a concurrentstoreunder the same generation and would write the old value back over the new one. A lost guard, a failure or an implementation without the method (the interface default writes nothing) leaves the row legacy and readable; the read never fails because of it — the write-back catches everyRuntimeException, so a driver or pool error a store did not wrap cannot fail it either. Logged once per key per node.openSealedData(OAuth grants and other participant-owned sealed data) cannot write back — the provider does not own those rows — so it logs once per tenant thatPOST /secretstore/secrets/{tenantId}/rotate-dekre-seals them bound.
Files: VaultSecretProvider.java, ISecretPersistence.java, MongoSecretPersistence.java, PostgresSecretPersistence.java, secrets-vault.md
Tests: VaultLegacySealingRetirementTest (re-seal on read, swap refused afterwards, a store racing the write-back wins, a failing write-back does not fail the read) and guard tests in the Mongo and Postgres persistence unit tests; mutation-checked.
🔒 fix(security): the read-redaction marker is never stored; upgrade and sync read targets unredacted (2026-10-17)
Repo: EDDI (fix/security-review-secrets-redaction)
Follow-up to the M1 read-redaction above, so it can never turn into stored corruption.
Writes refuse the marker. New
RedactionMarkerGuard(configs/rest): every create, update, JSON Patch and duplicate of the LLM, MCP-calls, channel, RAG and httpcalls stores,RestImportService.createResourceDirectandUpgradeExecutor.createExtensionanswer400 {"error": "bad_request", "message": …, "fields": […]}when any string in the document contains<redacted:, for administrators too. The import and upgrade paths create every resource type through one method, so there the check is scoped to those five document types (requireNoneIfRedactedType): a workflow or output set that merely mentions the marker text is content and imports. Before this, an editor who opened a configuration in the Manager and saved it replaced the stored key with the marker, and the agent broke at its next deploy.One recognisable marker. The in-string marker
ConfigSecretRedactorwrites into URLs, headers and bodies is now<redacted: credential>instead of the filter's generic<REDACTED>, which a prompt or output template may legitimately contain. Both markers share the<redacted:prefix the guard looks for.Unredacted internal reads.
RestLlmStore,RestMcpCallsStore,RestApiCallsStoreandRestRagStoreexposereadUnredacted(same access check;readRagForIngestionbecamereadUnredacted).StructuralMatcherreads upgrade/sync targets through it instead of the loopback REST client, so an editor-run upgrade neither diffs against the marker nor writes it: the export's${vault:REDACTED}placeholder is replaced by the target's own key.A sync source read from a peer through a non-admin credential carries the peer's marker; such resources are now refused rather than stored.
Previews are redacted for editors. The matcher's unredacted target content is also what the upgrade and sync previews return, and those endpoints admit
eddi-editor, soRestImportServiceredactssourceContentandtargetContentfor every caller who is noteddi-admin(PreviewRedaction, with the stores' redactor and skipped paths) before a preview leaves the server. The upgrade itself still writes from the unredacted read. (Review finding on the PR.)
Tests: a *RedactionMarkerWriteTest per store, a marker case in RestImportServiceCallerTokenTest, EditorUpgradeKeepsTargetCredentialTest (an editor-run upgrade of an agent whose LLM config holds a plaintext key keeps it and is not refused), PreviewRedactionTest and RestImportServicePreviewRedactionTest; each mutation-checked.
Files: RedactionMarkerGuard.java, ConfigSecretRedactor.java, PreviewRedaction.java, StructuralMatcher.java, UpgradeExecutor.java, RestImportService.java, security.md
🔒 fix(manager,chat): UI findings from the 2026-10-17 security review (2026-10-17)
Repo: EDDI (fix/security-review-ui)
What changed and why
The UI half of the 2026-10-17 review (L1, L5, and the Manager side of M5). The backend halves are separate branches.
L1, Chat
?apiServer=.http.tsbuilds request URLs by concatenating the base and the path, and the allow-list let?and#through, so?apiServer=%2Fadministration%2Fcluster%2Fcaches%2Fresync%3Fmade the widget's start call a state-changing request to another same-origin path, carrying the page's credentials.sanitizeApiServernow parses the value against the page origin and accepts it only when the origin is unchanged,searchandhashare empty, the pathname is exactly the input (so..and.segments are refused), and it has no%. Documented inchat-ui-embedding.md.L5a, opt-in agent HTML.
sanitizeAgentHtmlnow forbidsclass(Tailwind utilities could paint a full-viewport fake prompt) and thesvg,math,image,feImageanduseelements (render-time fetches), and forcestarget="_blank" rel="noopener noreferrer"on every anchor through a hook registered only for the call.L5b, ids in request paths. New
lib/api/path-segment.ts:seg()encodes an id and refuses/,\,.., whitespace, control characters and empty values;nameSeg()encodes a free-form name (connection name, tenant, secret key) and refuses only.,..and empty. Every id interpolated into a path underlib/api/now goes through one of them (about 160 call sites in 32 files). The chat panel drops an unsafe?agentId=/?conversationId=before issuingGET /agents/<id>.L5c,
navigateAway. The OAuth link flow navigates only to anhttps:URL, orhttp:for localhost, 127.0.0.1 and [::1], without embedded credentials (lib/authorization-url.ts). Anything else is a failed start with the existing "Could not start linking." toast.L5d, pinned Workforce responses. The
localStoragekey now names the signed-in principal (workforce-pins-<principal>:<board>), and sign-out removes everyworkforce-pins-*key.M5, Platform Operator trust.
platform.operatoris writable byeddi-editor. The Manager now opens the operator chat, history and conversation restore only when the agent's descriptor carries[eddi-platform-operator]and the approval gate verifies on every version (useOperatorTrust,lib/operator/operator-trust.ts). Otherwise the drawer and the operator page show an "operator could not be verified" panel with Check again, and fail closed when a check cannot be completed. Before an Upgrade that keeps the stored instructions, or a Reconfigure that carries them over, the admin sees a line diff against the default (and the full stored text) and must tick a confirmation. The Manager also does nothing to an agent it could not verify (review follow-up on PR #1082): the marker is read at the agent's current version from the store, never atconfig.version(that number sits in the same editor-writable variable as the id, so its author chose which descriptor would be inspected); an unverified agent gets no Check connection, Deactivate or upgrade notice, and a paused one no Turn back on; Reconfigure provisions the replacement withretirePredecessor: false, which leaves the old agent exactly as it was and reports that in the superseded banner; and Delete operator becomes Unregister operator (useUnregisterOperator), which dropsplatform.operatorand touches no agent. 21 new strings in all eleven locales.
Design decisions
The marker is writable by anyone who can edit the descriptor, so the check is a tripwire, not a signature. The real fix is reserving
platform.*foreddi-adminon the backend (other branch). It is stated in the docs.An unverified agent is left alone rather than retired on Reconfigure or deleted on Delete, even though the admin asked:
platform.operatorcan name any agent, so a retire-and-replace flow would be the one-click way for an editor to have an admin permanently delete someone else's agent and its resources. The admin gets the Agents screen instead, where the agent is shown for what it is.seg()throws rather than sending a mangled request. Free-form names get the lighternameSeg()because existing tests (and real tenants and secret keys) contain spaces and slashes thatencodeURIComponentalready makes inert.No change to
system-prompt.tsortool-scopes.ts, sooperator-revision.jsonis not bumped.
Not done / follow-up
The Stryker scope includes
src/lib/operator/**; the mutation run was not repeated for the two new files there (operator-trust.ts,prompt-diff.ts).
Files: ChatWidget.tsx, markdown-safe.tsx, path-segment.ts, authorization-url.ts, workforce-pins.ts, operator-trust.ts, operator-untrusted.tsx
⚡ fix(ui): clicks that never wait on I/O, and a Chat UI that holds up on phones (2026-10-17)
Repo: EDDI (fix/ui-click-responsiveness)
Half of a review of both UIs for click latency, every screen size and every state. Four read-only reviews (click responsiveness, layout/RTL, Manager state handling, Chat UI) produced about 100 verified findings. This PR holds the Manager's click-latency fixes and the whole Chat UI; the Manager's layout, RTL and state fixes are in the companion PR on fix/manager-layout-a11y. The two share no file and build independently. Agent cards here carry the reveal-on-touch class, which that PR defines; until it lands the class is inert.
Clicks no longer wait on I/O (Manager)
Optimistic updates. New
lib/optimistic.ts(patchQueries/restoreQueries). The schedule enable toggle flips its row at once and rolls back on failure; only the clicked row is disabled, not every toggle on the page. Notification mark-read/dismiss update the badge and the list immediately, and busy state is per item.Mutations no longer hold their pending state through a refetch.
onSuccess/onSettledarrows that returnedinvalidateQueries(...)made TanStack wait for the refetch before call-site callbacks ran (closing a dialog, navigating). Fixed inuse-cluster,use-group-templates,use-group-workspaceanduse-user-conversations. The share dialog no longer awaits five invalidations one by one before re-enabling its controls.Deploy no longer refetches every agent card. Deploy and undeploy invalidated all of
agentKeys.all, so every card's status query refired.agentDeploymentQueries(agentIds)inquery-keys.tsmatches only the deployed agent's entries and the environment listings, and refreshes any sub-key it does not recognise.Filters stop blanking the list. Search on agents and workflows, the cluster leases and dead-letter filters, and the logs instance filter are debounced (250–300 ms) and use
placeholderData: keepPreviousData.Fewer sequential round trips. The "where is this used" scan after a resource save fetches workflows and agents with bounded concurrency (8), and fetches each agent once rather than once per matching workflow. Grant dry runs run in parallel, and so do the agent editor sheet's post-save invalidations.
Chat UI
Layout: a long code line or a wide table widened the bubble and scrolled the whole transcript sideways (
min-width: 0, plus a table scroller). Inputs are 16px so iOS does not zoom on focus. The viewport meta addsviewport-fit=coverandinteractive-widget=resizes-content, and the root height is100dvh, so the composer clears both the home indicator and the keyboard. Very wide screens cap line length. Lists, blockquotes and tables use logical properties, and messages carrydir="auto".Scrolling: pressing Scroll to bottom during a reply turned following off again as soon as the smooth scroll began, because its own scroll events read as "left the bottom". Now only the reader moving up ends following. The view also re-pins for content that grows without a new message (the throttled trailing render, images, KaTeX, a shrinking viewport), and the button scrolls the transcript rather than the host page.
Indicators: no more dots under a reply that is already streaming. Undo, redo, retry and cancel no longer show the typing dots or a Stop button. Pressing Stop then would have cancelled the conversation and raised a false "interrupted" banner.
Focus and input: focus moves to the composer after a quick reply or Stop, and back to the New-conversation button when its confirmation is cancelled. Quick replies render disabled while a click would be dropped. On touch screens Enter inserts a newline. A refused draft regrows to its height. An agent-requested field no longer steals focus on page load.
Undo and redo rebuild messages with position-derived ids, so unchanged bubbles keep their keys and are not re-animated and re-parsed. The status strings "Thinking…", "Using {tool}…" and the scroll button label are translated.
Team setup, HITL and background polling
Group and Workforce wizards set their members up in parallel.
runDeployManyWithGrantsdeploysDEPLOY_MANY_CONCURRENCY(3) targets at a time instead of one after another, and both wizards create new agents three at a time. The grant dialog still asks one question at a time: a new request used to cancel the open one, which is why the loop was sequential, so the per-agent second-chance dialogs now go throughserializeGrantDecisions. Every agent that was created is recorded before a failure is reported, because provisioning is not idempotent. The Workforce wizard raises one toast for the batch, and each failed row shows its own error.HITL human-input submit is optimistic. The cached group conversation leaves
AWAITING_HUMAN_INPUTat once and is put back if the submit fails. It used to await two refetches, which kept the button pending for an extra round trip.The Chat UI no longer polls approval status from a hidden tab. The next read is parked and taken at once when the tab is visible again.
Review fixes
Optimistic rollbacks are scoped to their own operation. A failed schedule toggle undoes only its row, and a failed notification dismiss undoes only its items and its share of the badge, instead of restoring a whole snapshot over a later change. Every schedule row with a toggle in flight stays disabled (
useMutationState), not just the latest one.The share dialog refreshes the agent's detail and descriptor queries as well as the lists. Those keys have their own roots,
agentandagent-descriptor, notagents.Dead-letter paging is disabled while a page is still placeholder data, so a second click cannot push the same cursor twice.
The logs instance box follows back/forward navigation.
Schedule edits made through the trigger tabs, cron presets and the agent picker count as edits, so Escape or a backdrop click no longer discards them.
The Chat composer takes a pending focus request only once the turn has finished, so the phone keyboard does not cover a reply as it arrives.
Not done (follow-ups)
A client-side idle watchdog for a stalled chat stream was considered and rejected. The conversation stream sends no keep-alives (only the log stream does), so a single slow tool or model call is legitimately silent for minutes, and a watchdog would cut real turns off as "connection lost". It needs a server-side heartbeat first.
Workforce analytics and the skill registry still fire one request per group or skill; both need batch endpoints on the backend.
Tests
New: responsiveness-review.test.tsx and a Scroll-to-bottom regression in ChatWidget.ux.test.tsx (Chat), and optimistic-mutations.test.tsx (Manager), plus deploy-many-concurrency.test.ts and a hidden-tab case in useHitlPolling.test.ts. Mutation-checked: restoring the old scroll handler, dropping the dialog queue (in the serializer or in its use), dropping the HITL cache patch and ignoring visibility each fail a test.
feat(manager): model picker that always shows the whole catalog, and a refreshed model list (2026-10-17)
Repo: EDDI (feat/manager-model-picker)
What changed and why
The model field no longer hides the catalog. The agent wizard, the LLM editor and the operator activation form used a native <datalist>, which filters its options by whatever the input holds. The field is pre-filled with the provider's default, so clicking it showed one option, the default, and read as "this provider has one model". The new ModelCombobox (ui/manager/src/components/shared/model-combobox.tsx) replaces all three:
A click, the chevron or ArrowDown opens the whole list with the current value ticked and scrolled into view. The provider default carries a
defaultbadge.Typing puts matches under a "Matching …" heading and keeps every other suggestion below a divider under "Other models". Matching ignores case and separators, so
opus 5.5findsclaude-opus-5-5.When nothing matches, a note says the typed id is used as typed. A footer repeats that any id the provider supports can be typed. The suggestions are help, not a whitelist.
It follows the ARIA combobox pattern (
aria-activedescendant, grouped listbox). Escape closes only the list, not the dialog around it. A read-only field gets no list.
The grouping lives in groupModelSuggestions in lib/model-suggestions.ts. The 7 new modelCombobox.* strings are translated into all 11 locales.
Catalog refresh. Every id was checked against the provider's model and deprecation pages on 2026-10-17.
Added:
claude-haiku-5-5(Anthropic, Vertex, Bedrock)gemini-4-argon(Gemini, Vertex, OpenRouter)The GPT-6 family on Azure and Bedrock
mistral-large-4grok-build-0.1Grok, Gemini and Llama 4 Scout on OCI
Gemma 4, Qwen 3.5/3.6, Ministral 3 and gpt-oss on Ollama
Popular OpenRouter slugs
Removed:
OpenAI:
o3-mini(shut down 2026-10-23),gpt-5.4-nano, thegpt-5family, andgpt-5.4-thinking, which was never an API idGemini:
gemini-3.7-flashandgemini-3.5-flash, both deprecated on AI StudioVertex:
gemini-2.5-*, retiring 2026-10-20MiniMax: the M2.7 pair (retiring 2026-11-18). M3.1-Flash-Preview stays, because the parameter catalog has rules for it, though MiniMax currently offers it only on its subscription plans
Bedrock: models now Legacy or past end of life (Llama 3.x/4, MiniMax M2)
Azure: deprecated gpt-4o and gpt-4.1
Fixed ids that never existed:
Hugging Face:
deepseek-ai/DeepSeek-V4,google/gemma-4-assistantandQwen/Qwen3.5-7BBedrock:
anthropic.claude-sonnet-4-6-v1:0OCI: the
openai/gpt-oss-*ids, which take a dot after the vendor, not a slashVertex:
claude-haiku-4-5@20251001
Bedrock now suggests
global.inference-profile ids. Most current models have no in-Region endpoint onbedrock-runtime.Defaults:
Gemini and Vertex:
gemini-3.5-flash→gemini-3.8-flashHugging Face:
Qwen/Qwen3.5-7B, which does not exist →Qwen/Qwen3.8-27B
The named-compatible changes (xAI, MiniMax, OpenRouter) are made in both
openai-compatible-providers.jsonand its Manager mirror.The operator's system prompt lists these suggestions, so the operator revision is bumped.
Not done
ModelCombobox is not added to the design-sync mirror (.design-sync/).
⚡ perf(engine): convert only the current step for a turn's response, drop per-turn INFO logging (2026-10-17)
Repo: EDDI (perf/hotpath-and-startup)
What changed and why
Part of the throughput work (planning/throughput-optimization-plan.md, WS3b and WS8.5). A JProfiler run at 1,000 concurrent conversations put 9% of running time in Jackson and about 2% in per-turn Logger.info calls and String.format.
Current-step-only conversion (WS3b). The memory overload of
ConversationMemoryUtilities.convertSimpleConversationMemorySnapshotconverted every step of the conversation and then returned only the last one, which is the default turn response (returnCurrentStepOnly=true) and the HITL replies. WithreturnCurrentStepOnlyit now builds the snapshot throughconvertConversationMemoryForCurrentStep: same header, outputs, properties and redo cache, and a step list of the same size whose entries are converted only when read. The projection reads the last step and the list's size, so a turn converts one step instead of all of them. Redaction, secret-turn masking, the error field and the undo/redo flags are unchanged: they run inconvertSimpleConversationMemory, which still does the work. A reader that walks every step still gets correct values, because each step converts on first access; it just gets no saving. Callers inConversationServiceneeded no change.A quadratic loop in
convertConversationMemory.IConversationMemory.getAllSteps()copies the whole step list on every call, and the conversion called it twice per step. It is now called once. The persistence path uses this conversion too.Per-turn INFO logs are now DEBUG. Every turn logged four INFO lines, even for an agent with no tools: "Discovering httpcall tools…", "Discovered 0 httpcall tools…" and the two
mcpcallsequivalents. Lines that fire on every turn when their feature is configured moved to DEBUG as well: built-in tool counts and lazy-tool loading (AgentOrchestrator,ToolLoopRunner), the contextual memory/recall/attachment tools, RAG and rolling-summary injection (LlmTask,RagContextProvider), the httpcall tool result line, and the cascade step lines. The string-concatenating ones now usedebugf, so nothing is built while DEBUG is off.No more
new ObjectMapper()per discover_tools result (WS8.5).ToolLoopRunner.activateDiscoveredToolsbuilt a mapper for every result; it now uses a shared one.Bound Jackson readers and writers. The Mongo
JacksonCodecbinds anObjectReaderfor its type and anObjectWriteronce, instead of resolving them through the mapper for every document.JsonSerializationdoes the same for its writer and untyped reader.
Measurements
Conversion, single thread, best of five (memory with ten properties and twelve data per step):
10
8.0 → 6.6 µs
≥ 8 → 1.0 µs
50
57.8 → 30.4 µs
≥ 58 → 2.6 µs
200
376 → 113 µs
≥ 376 → 2.5 µs
"Turn response before" is at least the old full conversion, which the projection ran first. End to end (scripts/loadtest, origin/main against this branch, alternating A/B/A/B on Docker Desktop on a shared machine, so treat the numbers as indicative): steady 50 conversations with a 0 ms mock LLM, 81.9 → 102.9 turns/s on average (the rounds overlap: 88.7 and 75.1 against 120.1 and 85.7); long-conversation (5 × 200 turns), p50 87 → 80 ms at the same throughput, since MongoDB dominates there. INFO lines per run: 16,043 → 43.
Tests
ConversationMemoryCurrentStepConversionTest: 168 golden-equivalence cases compare the new path with the full conversion plus trim across six memories (plain, secret last turn, secret earlier turn, error, redo, single step) × returnDetailed × returnCurrentStepOnly × seven returningFields shapes. One test checks that the path still redacts credentials, drops audit:* and masks a secret turn. One guard checks that only the newest step is read. Mutation-checked: reading the steps in the wrong order fails 51 cases, converting eagerly fails the guard, and dropping the redo cache fails 14 cases.
Not done here
PR #1066 adds a conversationCost sum over all steps to convertSimpleConversationMemory. It stays correct on this path, because the lazy list converts every step it is asked for, but it gives up most of the saving for the default response. Once both land, the cost sum should read audit:cost from the live steps (or from a running total) rather than from converted snapshots.
Files: ConversationMemoryUtilities.java, JacksonCodec.java, JsonSerialization.java, ToolLoopRunner.java, HttpCallToolsProvider.java, McpToolsProvider.java, AgentOrchestrator, ContextualToolsProvider, LlmTask, RagContextProvider, CascadingModelExecutor.
test(loadtest): cluster mode for the turn load test, N replicas behind nginx (2026-10-17)
Repo: EDDI · Branch: test/loadtest-cluster-scaling
What changed and why
Cluster mode (NATS leases with fencing, the cluster event bus, degraded mode) is well tested for correctness, but nothing measured multi-node throughput: the single-node WS2 report was the only data, and the sizing claims in clustering.md, including "the database is the shared bottleneck", were unverified.
scripts/loadtest/docker-compose.cluster.yml(new): the topology of the repository'sdocker-compose.cluster.ymlandscripts/cluster-demo(N EDDI replicas witheddi.messaging.type=nats, three NATS nodes at R3, one MongoDB, nginx round-robin), plus the WireMock LLM and k6. It has its own ports (75xx), so it runs next to the single-node stack.scripts/loadtest/nginx-cluster.conf(new): the cluster balancer's rules, sized for thousands of connections. It addsX-Loadtest-Upstreamto every response, and only a refused connection moves on to the next replica, so 409s and 503s reach k6 and get counted.k6/turns.js: withNODE_ADDRSset, every turn metric is tagged with the replica that answered, and one no-op threshold per node makes k6 write the per-node submetrics into its summary.loadtest.py: new commandscluster-up --nodes N,cluster-run,cluster-down,cluster-matrix --nodes 1,2,4,8 [--baseline]andcluster-report. Every point starts from a fresh stack and gets a warm-up run that is thrown away. Each run collects, per node: turns/s, p50/p95/p99, 409/503,eddi_cluster_lease_acquire_secondsby outcome,eddi_cluster_fence_rejected_total, peak in-flight turns and leases held. Across the cluster it collects MongoDB ops per turn and per second, NATS messages per turn, and the CPU of every container (other stacks' too) plus the host's.--baselineadds one single node witheddi.messaging.type=in-memory, so the overhead of cluster mode at N=1 shows up.
Design decisions
Comparability is explicit. In-flight turns per node (
--max-in-flight, 400), the MongoDBmaxPoolSize(100), heap, memory and CPUs per node are passed on every point. None of them is left tomax-in-flight-turns=auto, which depends on the heap.Host CPU is measured, not assumed. On Docker Desktop, the replicas, MongoDB, NATS, nginx and k6 share one VM with everything else on the machine. The report gives the host's CPU (typeperf on Windows) and other stacks' container CPU next to the efficiency column, because on one machine a falling efficiency can come from the host as easily as from the database.
Agent setup goes to a node directly. Right after start, the balancer can still hold an address it resolved before the replica was up, and it answers the setup POST with a 502.
MongoDB gets
restart: on-failure. On a busy host the image's two-step first start can fail with exit 48 (address in use).
Results
scripts/loadtest/results/cluster-scaling-2026-10-18.md. The setup was 100 conversations per node, a 3 s mock LLM and 2 CPUs per node. The host was saturated (85–99 % CPU, shared with other sessions' work), so the report measures overhead and shape, not true horizontal scaling.
Errors: none across 18k turns — no 409, no 503, no fence rejection.
Overhead at N=1: cluster mode ran 16.1 turns/s against 21.3 in memory (−24 %, +1.4 s p50). Every turn paid an uncontended lease acquire of ~151 ms.
Lease contention: round-robin without affinity makes 13–32 % of acquires contended (0.5–2.6 s extra) even with one sequential client per conversation. A turn holds its lease until persisted, which is after the reply.
Efficiency: 1.11 at N=2 (a quiet re-run; the first N=2 run read 0.28), 0.65 at N=4, 0.40 at N=8.
Where it saturated: node CPU at N=4, then host CPU at N=8. MongoDB peaked at 1.2k ops/s (23 ops/turn, flat in N, 2.25 of 4 CPUs) and NATS at 0.5 CPU per node, so neither was the limit. The expected database knee is untested here.
NATS cost: about 14–22 ms of NATS CPU per turn across R3. That puts a 1-vCPU NATS node nearer 150–200 turns/s than the docs' "thousands", and needs a re-check on a quiet machine.
Follow-ups
Profile the uncontended lease acquire. Decide between releasing the lease before post-reply persistence and routing by conversation in the reference nginx config. Re-measure NATS CPU and the database knee on separate machines.
perf(engine): fewer MongoDB round trips per conversation turn (2026-10-16)
Repo: EDDI (perf/turn-mongo-roundtrips)
A JProfiler profile of the virtual-thread build (labsai/EDDI#1045) counted about 17 MongoDB reads per turn, each with a named caller, and found the driver's connection pool to be the ceiling once turns run on virtual threads (418 operations queued for a connection at 500 in-flight turns). This branch removes the redundant ones, one commit each, in the order the profile suggested.
What changed and why
One conversation-descriptor read per request. A REST turn read the same descriptor three times before it started:
RestAgentEngine's ownership check, the same check again inConversationService.say, and the soft-delete check right after it. NewConversationDescriptorMemo(@RequestScoped) remembers the resolved descriptor (live, archived or none) for the rest of the request;ConversationAccessGuardandConversationService.isSoftDeletedboth resolve through it. Only the descriptor is shared, never a decision: each check still compares the owner against its own identity. Store failures are not remembered, every write throughConversationDescriptorStoreforgets the conversation, and outside a request (worker threads, schedules) every lookup reads the store as before. Saves 2 reads per turn on the request thread, where the profile saw most of the pool waits.updateTimeStampis one update (WS3c). It wasgetCurrentResourceId+readDescriptor+ModifiableHistorizedResourceStore.set(which reads again) + a version-checked full replace: 3 reads and a write on every turn's completion path. New storage SPI methodIResourceStorage.setNumberField(id, field, long): MongoDBupdateOnewith$set, PostgreSQLUPDATE … SET data = jsonb_set(…, to_jsonb(?::bigint)), both on the live row only (a soft-deleted or unknown id writes nothing).DescriptorStore.touchLastModifieduses it;ConversationDescriptorStore.updateTimeStampfalls back to the old rewrite only for a backend without it. The value is stored as a number, exactly as the persistence mapper writes dates (epoch millis), so retention (RestConversationStorecomparesgetLastModifiedOn()) and the listings' server-side sort see no difference —DescriptorTouchParityTestchecks the read-back date, the stored type (BSON int64 / jsonb number), the sort position among fully written descriptors and that no other field or version changes, on a real MongoDB and PostgreSQL. A side benefit: the replace could overwrite a concurrent edit of any other descriptor field with the copy it had read; a single-field update cannot. A failure is now logged and swallowed instead of thrown into the completion callback, where it would have broken the response of a turn that was already stored.Signing negative cache (WS8.1).
AgentSigningService.loadPrivateKeycached only keys it found, so with an active vault every audit entry of a keyless agent (three per turn) asked the vault — asecretvault_secretsread — only to hear "not found" again. A "not found" is now remembered for 60 s per key (MISSING_KEY_TTL_NANOS, bounded at 10 000 entries). A vault failure is never remembered. Generating or rotating a key on this node evicts the entry, so the new key signs at once — including when a lookup that started before the key was stored answers "not found" after the eviction: every eviction is counted, and a miss whose lookup saw the count move is withdrawn instead of remembered; a key created on another node is picked up within the TTL, and entries written meanwhile carry no signature, as they would have a moment earlier. This is also step 7 of PQ-5a in the PQC plan — implemented once, here.Pinned agent configuration from memory.
ConversationHitlService.lookupAgentConfigPinnedread the agent document at the conversation's pinned version on every turn, only to learn its tool-approval policy. NewAgentConfigurationCache(@ApplicationScoped, Caffeine, 1 000 entries, 30 min after last access) keeps(agentId, version)configurations: a stored version never changes (edits write a new version; the only in-place writers are the descriptor stores and the startup migrations). Absence and store failures are not cached, so the HITL gate still fails closed on a read error and still falls back to the latest version when the pinned one is gone.AgentFactorydrops an agent's entries on every deploy and undeploy.WorkflowTraversal's own short-lived traversal cache is left as it is; WS1 should hang its invalidation off the same deployment hooks.One full conversation load per turn (WS3a). The conversation-id entry points (
say/sayStreamingwithout an environment — REST, SSE, MCP, Slack,/v1) load the snapshot to find the agent and run the pre-turn checks, then called the environment-qualified overload, whose admission (admitTurn) loaded the same document again. That load is now handed down (preloaded) and converted instead of re-read. The idempotency admission (admitOrServe) still runs between the load and the turn, as before; a deferred duplicate re-enters the whole entry point and loads afresh. The environment-qualified overloads (A2A, group members, tests) still load on their own. Staleness is unchanged: the second load used to happen a moment after the first, and the step runner'sreloadIfSupersededrevision check still guards the turn either way.
Measured
Load-test harness from labsai/EDDI#1044 (steady, 50 conversations × 20 turns, mock LLM delay 0 ms, everything in Docker), origin/main (aa8806c68) against this branch, 1 000 turns each. MongoDB operations per successful turn (serverStatus().opcounters, per-collection from top):
Queries per turn
16.67
6.65
descriptors queries
6.05
1.05
conversationmemories queries
5.04
4.08
secretvault_secrets queries
3.05
0.06
agents queries
1.09
0.09
Updates / inserts per turn
2.05 / 3.11
2.05 / 3.11
Turns/s (single run, indicative)
117
146
On PostgreSQL (pg_stat_statements, SELECT conversation_state, data FROM conversation_memories), full conversation loads per turn went from 2.09 to 1.13 with short conversations, and from 2.74 to 1.88 in the long-conversation scenario (10 × 200 turns). An instrumented build traced the excess over MongoDB's 2.0 to ConversationStepRunner.reloadIfSuperseded: the reply is delivered before the turn is persisted, and on PostgreSQL the full-document append grows with the conversation, so the client's next turn is often admitted against the row as it was before the previous turn's write and reloaded when it runs (68 % of turns on main). That reload is what keeps the turn on the current document, so it stays; avoiding it means loading at run time when a turn is already in flight, or a cheaper PostgreSQL write (WS6/WS7).
The descriptor write stays one per turn, now a $set instead of a replace. Left on the turn path: one descriptor read (the ownership check), the full conversation load, the state and revision projections, and the GDPR restriction check on usermemories.
Design decisions
A request-scoped memo, not new parameters. The checks sit behind
IConversationService.say/sayStreaming, which Slack, MCP,/v1and A2A also call; threading a resolved descriptor through all of them would have changed every signature for a saving that only the REST path needs twice.
🔒 fix(ui): clear three npm advisories reported by Scorecard (2026-10-16)
Repo: EDDI (fix/ui-dependency-advisories)
What changed and why
OpenSSF Scorecard's Vulnerabilities check flagged three advisories. All three came from the UI lockfiles, not from the Maven build.
GHSA-238p-pmpm-9mq7, KaTeX prototype-pollution trust bypass (
katex< 0.18.2). The Chat UI's ownkatexwas already 0.19.0.rehype-katex@7.0.1andmicromark-extension-math@3.1.0each ask for^0.16, which gave them a nested 0.16.47 copy that ships in the chat bundle. Both are on their latest release, so an npmoverridesentry now points both at the root version ($katex). Build, lint and all 480 chat tests pass, including theMessageBubblemath-rendering tests.GHSA-rj75-hqrm-r3gf, quadratic selector parsing in
postcss-selector-parser(< 7.1.6).@tailwindcss/typography@0.5.20, also on its latest release, pins exactly 6.0.10. The Manager now overrides it to^7.1.6. This is a build-time dev dependency. The Manager's generated CSS is byte-for-byte identical under 6.0.10 and 7.1.6, across all three stylesheets and 141.proserules.GHSA-vfj7-8cjw-p6xm,
bracesstack exhaustion (all versions through 3.0.3, with no fixed release). It reached the repo only throughui/manager/.ds-sync/package-lock.json, via@tailwindcss/cli→@parcel/watcher→micromatch..ds-syncholds local design-sync tooling that is never shipped and is not inventoried in the SBOM. Its lockfile is removed and gitignored, and the Dependabot entry for that directory stays to keep the manifest's direct dependencies current.
Both lockfiles were regenerated with the pinned Node 24.21.0 (npm 11.19.0), so the diff holds only the dependency change, without peer-flag churn from a different npm. Each nested entry was deleted by hand before npm install, because npm does not apply a new override to an entry the lockfile has already resolved.
Files: ui/chat/package.json, ui/manager/package.json, both package-lock.json files, ui/manager/.gitignore, .github/dependabot.yml
Next
Drop the two overrides once rehype-katex/micromark-extension-math accept KaTeX ≥ 0.18.2 and @tailwindcss/typography stops pinning postcss-selector-parser 6.
docs(planning): human takeover / handoff design for review (2026-10-15)
Repo: EDDI (docs/planning-human-takeover; planning document only, no production code)
What changed and why
WS7 of the competitor-research roadmap needs a maintainer-approved design before any code: a live 1:1 conversation handed to a person, who talks to the user while the pipeline is off and then hands it back. planning/human-takeover-design.md is that design, written against origin/main @ aa811c838.
Inventory of every branch on
ConversationState. Engine, both conversation stores, cluster leases and fencing (#956), idempotent turns (#1000), the idle sweep and undeploy (#990), HITL,/v1, Slack, A2A, MCP, group members, schedules, Chat UI and Manager. Each entry gives the location, what it does today and what the new state needs. Allow-list sites are safe by default. The deny-list sites are listed as must-fix:NON_APPENDABLE_STATESin both stores, undo/redo, the admin state reset, the per-agent idle sweep,TurnIdempotencyService.isReplayable, and the A2A outcomeswitch, whosedefault -> completedwould report an empty finished task.Recommendations: a new
HUMAN_CONTROLstate rather than reusingAWAITING_HUMAN; the reserved actionHANDOFF_TO_HUMAN, applied at the end of the turn; an opt-inrequest_human_agenttool that is never selected by an empty built-in whitelist; operator endpoints under/agents/{conversationId}/takeover. Takeover writes run as coordinator tasks under the conversation lease, which is never held for the length of a takeover. One step per message, with the operator's identity kept out of user-visible output.operator.*audit entries with the actor set server-side and message text stored only as a digest (a content commitment, not a copy). BecauseAuditLedgerServicewrites asynchronously, each takeover write also records its audit entry in a journal inside the conversation document, and a reconciler submits any entry a crash lost. Operator turns go into LLM history annotated as a human's. A dedicated role that never admits the conversation owner and, by default, reaches only the agents whose desk the caller belongs to.Separable first PR: a property patch alongside a HITL
/resumedecision. It is allow-listed per agent, refuseslongTermandsecretscopes, is audited by digest, and is validated before the resume CAS so a refused patch does not use up the pause.
Design decisions
AWAITING_HUMANmeans "refuse input, then resume the pipeline at a bookmark", and HITL admits the owner. Takeover means "accept input, return to idle", and the owner must be excluded. Reusing the state would take a sub-branch at about 20 sites, and a missed one silently drops customer messages.Paths avoid the word "operator", because in the Manager the Operator is the Platform Operator LLM.
What's next
Maintainer sign-off on the eleven questions in §11 of the design (Q11 confirms the secure default: desk scoping required, unrestricted access only by explicit opt-in), then PR 1 (property patch) and PR 2 (state and API) as laid out in §13.
feat(agent-tests): agent regression harness — golden conversations (2026-10-15)
Repo: EDDI (feat/agent-test-harness; WS6 Phase 6.1)
What changed and why
EDDI had thousands of tests and none that asserted what an agent does. A config-driven engine records every turn — actions, properties, output, tool calls, cost — so a suite can assert exactly that, independently of how an LLM words its answer.
AgentTestSuiteconfig resource (configs/agenttests): a versioned document like every other config — scripted cases of turns, per-turn expectations, tool mocks, defaults (toolMode,unmockedTools,repetitions,passRate,turnTimeoutSeconds) and a per-run dollar ceiling (maxCostPerRun, default $1).AgentTestSuiteValidatorrefuses at save time (400) what a run could not honour: unknown modes, invalid or over-long regexes (500 chars), more than 200 cases / 50 turns per case / 20 repetitions / 2,000 turns per run.AgentTestRunrecords (engine/agenttests, collectionagenttestruns): one document per run throughIResourceStorageFactoryat a single version (theGroupConversationStorepattern), so it works on MongoDB and PostgreSQL alike; listed per agent newest-first, pruned to a bounded number per agent.AgentTestRunnerruns a suite against an agent version deployed to thetestenvironment: one conversation per case repetition as useragent-test:<runId>:<case>:<repetition>, each turn through the non-streamingsaywith a per-turn timeout, judged from the stored memory afterwards (actions, properties, output text,audit:tool_calls,audit:cost, state). Repetitions run on virtual threads, at mosteddi.agent-tests.max-parallel-cases(4) at once; the summedaudit:cost(start turns included) is checked againstmaxCostPerRunbefore every turn. A HITL pause is an observableconversationState, after which the conversation is ended — the runner never waits for a human. Every test conversation is ended and permanently deleted afterwards (RestConversationStore.purgeConversation, the guard-free half of the permanent delete) unless the run keeps them. One summary audit-ledger entry per run (taskId: ai.labs.agenttest).ExpectationEvaluator:actionsContain,actionsExact,properties(equals— representation-tolerant,3="3"—matches,exists,absent),outputContains,outputMatches,toolCalled(+argsSubset),toolNotCalled,maxToolCalls,maxCostUsd,conversationState. Every failing expectation is reported with the expected and actual value.ReDoS guard (
BoundedRegex): no safe-regex helper existed. Patterns are capped at 500 characters at save time and matched against aCharSequencethat throws after 250 ms, so a catastrophically backtracking pattern fails its expectation instead of occupying a thread.Long-term user memory is neither read nor written by test conversations:
ConversationService.createPropertiesHandlerhands anagent-test:user no user-memory store (soConversationskips both the init load andstorePropertiesPermanently), and the undo/redo long-term sync skips them.AgentTestService(shared by REST and MCP): reading the suite needs VIEW; the version under test is deployed totestthroughIRestAgentAdministration.deployAgent(test, …, autoDeploy=false, wait), so the deploy's own EDIT check, space-reference guard and agent quota apply to the starter; a run is refused (409) when a newer version is also deployed totest, because new conversations start on the newest ready version. At mosteddi.agent-tests.max-concurrent-runs(2) runs execute per node (429 beyond).Tool mocking (
ToolMockRegistry), fail closed. Consulted at the three places a pipeline reaches the outside world:ToolLoopRunner.executeSingleToolCallResultbefore executor dispatch (every LLM tool source; the HITL resume path goes through the same method),ApiCallExecutor.execute(rule-triggered httpcalls — the mock replaces theIResponse, sosaveResponse, retries andpostResponseproperty instructions run on the mocked{httpCode, body}unchanged; fire-and-forget calls are not dispatched) andMcpCallsTask(rule-triggered MCP calls — no server contact at all, not even tool discovery, unless the suite runs live). An unmocked call returns{"status":"NOT_EXECUTED","reason":"no mock defined in test mode"}(a 501 for httpcalls) and fails the case;toolMode: live/unmockedTools: liveare explicit opt-ins. A test conversation the registry does not know — a turn still running after its run gave up — is refused too. Memory-writing tools never run live in a test. For every other conversation the hook is one string prefix check on the user id. The LLM-path hook is a self-contained early return directly after the call is traced, so the pending split of that method merges trivially.Tool expectations see all three paths: the registry records every intercepted call per turn (mocked, refused or live), and
toolCalled/toolNotCalled/maxToolCallsare judged against that record rather than the LLM-onlyaudit:tool_callstrace.REST. Suites:
/testsuitestore/testsuites(URIeddi://ai.labs.testsuite/testsuitestore/testsuites/{id}?version=N, the v6 store convention; registered with the workspace access-index backfill). Runs:POST /agenttests/runs(202 with theRUNNINGrecord),GET /agenttests/runs/{runId},GET /agenttests/runs?agentId=. Botheddi-admin/eddi-editor, the deploy tier.MCP.
run_agent_tests,get_agent_test_run,list_agent_test_runs(McpAgentTestTools, AUTHOR tier likedeploy_agent); tool count 85 → 88.Metrics.
eddi_agent_tests_runs_total{status},eddi_agent_tests_turns_total,eddi_agent_tests_run_duration_seconds, charted in the Scheduling row of the Full Metrics Reference dashboard.Docs. New
agent-testing.md(concepts, JSON reference, mocking rules, CIcurlrecipe, EU AI Act evidence note);mcp-server.md,metrics.md,configuration-reference.md(eddi.agent-tests.*),SUMMARY.md.Full-engine proof:
AgentTestSuiteIT(DevServices MongoDB) stores a suite over REST, starts a run against the deterministic rules-onlyagentenginefixture agent — the run deploys it totestitself — and reads backPASSEDfor a suite that holds andFAILEDwith the actual actions for one that does not. It found two defects the unit tests could not: MongoDB assigns a run's id only on its first write, and a turn's completion callback can run before the turn is stored, so a turn is now judged from the snapshotsaycompletes with (detailed, current step) and only its internalaudit:cost/model names — stripped from every client projection — are read from the stored step, waiting up to 5 s for it.Platform Operator. May read suites and runs and start a run (a gated write — it deploys to
test, like the deploy it already has); it may not write suites. Prompt explains reading results andunmockedTool.operator-revision.json→ 24.
Review fixes
Unchecked purge moved out of the REST layer. The permanent delete is now
ConversationPurgeService(memory package);RestConversationStorecallspurgeonly after its owner check and keeps no unchecked public method. The runner callspurgeAgentTestConversation(conversationId, runId), which refuses any conversation whose user id is notagent-test:<runId>:…— the runner can only delete what it created. Nothing in the delete path reads a request identity (tested on an identity-less virtual thread, with a pending approval ended as a system actor).Cluster mode is refused (409). Mocks and runs live in one JVM and NATS cluster mode can route a test turn to another node. A call refused for want of a session on this node now says so (
no agent-test session on this node …) instead ofno mock defined.PR review. A run whose result cannot be stored (an oversized document, say) is replaced by a terminal
ERRORrecord without the per-case detail, never leftRUNNING; an output expectation's failure records the output cut at 2,000 characters like the turn's own; a suite read goes through the sharedRestVersionInfo.read(version=0= current, null/negative checks); the purge treats the store'snullfor a missing conversation as already gone. A rule-triggered httpcall's mock is selected before the request is built, so a mocked call neither resolves${vault:}/${connection:}/${caller:}references nor fails for an unprovisioned credential.Orphaned runs. A new
ABORTEDstatus: at startup,AgentTestRunRecoverymarks everyRUNNINGrun (none can be live yet) aborted with the reason and deletes its test conversations, found by their deterministic user ids.
Design decisions
The test marker is the user id (
agent-test:prefix), not a new memory field: theCONVERSATION_STARTturn runs insidestartConversationbefore the conversation has an id, and the user id is the one thing every seam (user-memory handler, tool loop, httpcall executor, MCP task) already has. The prefix only ever takes capabilities away, so it need not be unforgeable.agent-test:rather than the plan'stest:, which a real deployment could plausibly use for real users.ToolMockRegistryis static, because the LLM tool loop is plain classes built byAgentOrchestrator; threading a CDI bean through would have changed a dozen constructors (and the pendingexecuteToolCallsplit).Runs are not versioned config and live in their own single-version collection, pruned per agent (
eddi.agent-tests.max-runs-per-agent, 50).A newer version deployed to
testrefuses the run instead of being undeployed: the runner never changes a deployment it did not make.Suites are not yet part of agent export ZIPs (maintainer decision) — follow-up.
Known gaps and follow-ups
Phase 6.2: generate a suite from a conversation, LLM-as-judge expectation, Manager page. Phase 6.3: optional deploy gate.
Suites in agent export/import ZIPs and in agent sync.
A run lives on the node that started it; if that node stops, the run is marked
ABORTEDat the next startup and must be started again.
Files: AgentTestSuite.java, AgentTestSuiteValidator.java, AgentTestSuiteStore.java, AgentTestRunStore.java, AgentTestRunner.java, AgentTestService.java, ExpectationEvaluator.java, ConversationService.java, ToolMockRegistry.java, IRestAgentTestRuns.java, IRestAgentTestSuiteStore.java, McpAgentTestTools.java, agent-testing.md
feat(groups): member_tool_call SSE event for group members (2026-10-15)
Repo: EDDI (feat/groups-member-tool-call-events)
What changed and why
A group member's turn is not streamed, so an observer saw nothing between speaker_start and speaker_complete, however long the member's tool loop ran. The 1:1 stream already emits tool_call (name only); the group stream now emits member_tool_call {agentId, displayName, tool} with the same rule: the name travels, the arguments never do.
IConversationMemorygains a name-onlytoolCallObserver(default null), deliberately separate from the event sink: a non-null sink switches the LLM task into its streaming path, which a member turn must not trigger.ToolLoopRunnernotifies it next to the sink (observer failures are swallowed).ConversationResponseHandler.toolCallObserver()(default null) lets a plainsaycaller supply it;ConversationServiceinstalls it per turn.MemberTurnExecutorsupplies one only when a listener exists, and drops events from a cancelled speaker (the callback runs on a coordinator thread).GroupDiscussionEventListener.onMemberToolCall(default no-op), emitted byRestGroupConversation.SlackGroupDiscussionListenerkeeps the no-op: Slack posts finished contributions, and a message per tool call would be noise.Manager: the speaking member's typing indicator reads "using X..." instead of "responding..." (i18n in all locales). Docs: SSE table gains
member_tool_call,cost_updated,stance_updated, andtokenis marked as never emitted.
Design decisions
Observer on memory rather than a new
sayoverload: keeps the 9-argumentsaysignature (and every existing mock of it) intact.Absent observer or listener changes nothing.
✨ feat(llm): input and output guardrails on LLM tasks (2026-10-15)
Repo: EDDI (feat/llm-input-output-guardrails) — WS4 Phase 4a, executing the R0 spec of planning/langchain4j-recommendations.md.
What changed and why
Only tool results were governed (ToolResultGuardrail). Nothing screened the user's message or the model's final answer — the largest governance gap (jailbreaks, PII leaking either way). An LLM task can now carry inputGuardrails and outputGuardrails: ordered lists of {type, action, maxRetries, blockMessage, parameters}. Actions are block (default), redact, reprompt (output: re-ask the same model, maxRetries default 2, clamped 0–5, then block) and warn. Built-in types: prompt-injection (input), pii-redaction, regex-filter, max-length (both), json-object (output). Nothing is on by default; a task without the lists never touches the guardrail service.
Input guardrails screen the user's raw message before retrieval (a blocked message issues no RAG query or
httpCallRagcall; a redacted one is the retrieval query), then the assembled prompt before the model is built,preRequestruns or the circuit breaker is consulted — the second pass reuses the first result when the model-facing message is unchanged, so a finding is recorded once. A block answers the turn with the block message, served as a fallback (LlmFallbackHandler.serveText: the step'sllm:fallback:<taskId>flag keeps it out of later history,fallbackFieldwrapping applies underconvertToObject); the model is never called. Since the history builder merges a fallback turn's question into the next user message, only the last text part of the last user message is the current turn — earlier parts are screened as history, so a blocked injection cannot block every later turn. Redaction rewrites what the model sees; memory keeps the user's text. Earlier user messages of the history window are re-screened silently every turn, so a message blocked/redacted on its own turn is not replayed to the model later (a guardrail can opt out viascreensHistory(), meant for model-backed types).Output guardrails run right after
responseValidation, in every branch — plain, streaming, tool loop, cascade — and on the HITL resume path. A block is served through the sameserveTextpath (flagged, wrapped, not parsed, not recorded as the model's response); the raw output stored underlangchain:<type>:<taskId>is the wrapped content, as on every other fallback path, while the stream and the visible output carry only the message text. A reprompt runs on the branch that produced the answer: plain chat re-asks the model; the tool loop and a resumed loop re-ask only the final answer over the tool transcript (reaskFinalAnswer— no tool runs twice); the cascade re-asks the accepted step. Corrective shape is R5's (FormatRetryRunner.withCorrective): request, rejected answer as assistant turn, corrective user message. A reprompt needsresponseValidation.minAttemptMsof turn time left (#996 deadline) and an admitting per-model circuit breaker (#1001: a fresh ticket per reprompt, settled with its own outcome; the HITL resume neither consults nor settles one, as for R12), else blocks. Reprompt tokens fold into the turn's token usage and cost (cascade: priced with the accepted step's prices intocascadeCostUsd).Streaming: an output guardrail with
block/redact/repromptforces the task onto the buffered path exactly like aretryresponse-validation policy (bufferOutput = retryPolicy != null || guardrailBufferingreplaces every streaming decision that usedretryPolicy != null);warnkeeps streaming.Evidence: step key
audit:guardrail:<phase>:<type>(a list of{phase,type,action,reason,retryCount,taskId}), collected byLifecycleManager.buildAuditEntryintoAuditEntry.output.guardrails(LLM task only); SSEguardrail_triggered{type,phase,action,taskId}viaConversationEventSink→StreamingResponseHandler(both wrappers inConversationService) →RestAgentEngineStreaming; countereddi.guardrail.triggered{phase,type,action}.
Design decisions
EDDI-native SPI instead of
dev.langchain4j.guardrailtypes. R0 chose the lc4j types; against langchain4j 1.22.0 (javap-verified)OutputGuardrailRequeststill demands aChatExecutorthat a guardrail may call itself — a second model-call path outside the turn's budget, deadline and cost accounting —GuardrailRequestParamsstill NPEs withoutuserMessageTemplate/variables, results are sealed, andJsonExtractorOutputGuardrailno longer exists. Reprompting is EDDI's loop through aReprompterthe branch supplies, so the executor would be dead weight or a hazard.ContentGuardrail(type(),phases(),evaluate(text, context)→GuardrailVerdictALLOW/REWRITE/VIOLATION) keeps "a new type is just another bean":GuardrailServiceindexes every@Any Instance<ContentGuardrail>by type.GuardrailVerdict.costUsdandGuardrailContext.messagesare the hooks Phase 4b'sclassifiertype needs.A block is a value, never an exception (R0 T1): a guardrail message can quote user text and would otherwise reach the tool loop's retry classifier.
Fail closed (Pillar 4, consistent with the 4b classifier): a guardrail that throws or returns no verdict blocks (reason
guardrail_error) when its action isblockorreprompt, and warns when it isredactorwarn; per-guardrailparameters.failMode(closed/open) overrides. History messages a closed guardrail cannot check are withheld.Find vs act: guardrails only report; for
pii-redaction/regex-filter/max-lengtha finding withblockrefuses, withredactapplies the rewrite.No new loop on top of
FormatRetryRunner: its triggers are a fixed enum tied toresponseValidation; reusing its corrective shape,Asker,turnBudgetandminAttemptMskeeps the semantics without entangling the two policies.No
ExtensionDescriptorentries (R0 1.3 f): the descriptor describes the workflow step'suri, not the LLM resource; guardrails live in the resource.Not extracted into
executeModel(T11): hooked at the existing seams instead, so the diff inLlmTaskis additive plus theretryPolicy != null→bufferOutputsubstitutions.
Known limits / follow-ups
An
httpCallRagtemplate that readsmemory.current.inputdirectly (instead ofuserInput) still sees the stored, unredacted text (documented).Manager: only the
LlmTasktype mirror (inputGuardrails/outputGuardrails,GuardrailConfig); the guardrail list editor on the LLM task form came with #1077, merged into this branch. Platform Operator cheatsheet explains configuring guardrails; revision bumped.Phase 4b (
classifiertype) builds on this branch.SSE acceptance criterion 11 (
guardrail_triggeredbeforedoneover a real socket) is covered at unit level (handler →sendJson) only.
Files: GuardrailService.java, ContentGuardrail.java, built-ins under guardrails/impl/, LlmTask.java, LlmConfiguration.java, LifecycleManager.java, SSE plumbing (ConversationEventSink, IConversationService, ConversationService, RestAgentEngineStreaming); docs langchain.md, security.md, audit-ledger.md, metrics.md, rest-api-reference.md.
feat(llm): tool repeat guard refuses identical failing tool calls (2026-10-15)
Repo: EDDI (feat/llm-tool-repeat-guard)
What changed and why
Inside the iteration cap a model could re-send the same failing call (a 403, a 404, a schema-rejected body) every round, burning cost and rate-limit budget and repeating side effects on non-idempotent endpoints. The tool loop now keeps a per-run ToolRepeatGuard: a call whose last identical call failed, with no other call succeeding since, is answered NOT_EXECUTED without running and traced as tool_repeat_refused (metric eddi.tool.repeat.refused, tags source, reason). After maxRefusalsPerTurn (default 3) refusals the loop stops asking the model and ends the turn with a fixed message.
Behaviour change: the guard is ON by default. An agent with no toolRepeatGuard now gets it with the defaults (maxIdenticalFailures 2, maxIdenticalCalls unlimited, maxRefusalsPerTurn 3). It only refuses calls that already failed identically with no progress in between. "toolRepeatGuard": {"enabled": false} restores the previous behaviour exactly. See Repeated failing tool calls.
ToolOutcomeClassifierclassifies the RAW tool result (before the provenance envelope): HTTPhttpCode2xx success, 408/425/429/5xx retryable, other statuses terminal;Error:strings and{"error":...}retryable, except rejected arguments and unknown tools (terminal); loop-level refusals (budget, tenant quota, expired deadline,NOT_EXECUTED/DENIED) never count as failures. MCPisErrorresults reach the loop as an internal-error string and are retryable.ToolLoopRunner.executeToolCallreturns governed and raw results;executeSingleToolCallResultstill returns the governed string (resume path unchanged).Guard state is per run of the loop: a HITL resume and each cascade step start fresh. Failures were already never cached.
Platform Operator prompt updated (revision bumped).
Files: ToolRepeatGuard.java, ToolOutcomeClassifier.java, ToolRepeatGuardConfig.java, ToolLoopRunner.java
Manager: the LLM task editor's tool-call limits block has a "Repeated failing tool calls" control (toggle, thresholds, exempt tools); the field is written only when the author changes something.
✨ feat(observability): W3C trace propagation on outbound calls and execute_tool spans (2026-10-15)
Repo: EDDI (feat/observability-trace-propagation)
What changed and why
A trace used to stop at EDDI's edge: it showed that a turn spent four seconds in the LLM task, but not which MCP server or API made it slow. Two additions close that gap (pillar 6, observability).
execute_tool {tool}span per tool call — opened inToolExecutionService.executeToolWrapped, the one seam every tool source passes through (builtin, http, mcp, a2a, dynamic, memory, recall, plus themcpcallsstep). GenAI semconv attributes (gen_ai.operation.name,gen_ai.tool.name,gen_ai.tool.call.id,eddi.tool.source,error.type), semconv revision pinned viaLlmTelemetryListener.SEMCONV_SCHEMA_VERSION. The span is current while the tool runs — inline, and on the timeout worker through the existingcarryContext— so outbound requests are its children. Cache hits (eddi.tool.cache_hit=true) and rate-limited calls (error.type=rate_limited) get a span too: cheap when OTel is off, and exactly what a slow-turn investigation needs to see.W3C
traceparent/tracestateon outbound calls, via a newTracePropagationbean (W3CTraceContextPropagatoronly — neverbaggage): httpcalls (HttpClientWrapper, on a copy of the request so the memory record and the HITL approval fingerprint do not change per send), theOutboundHttpfacade — built-in tools, A2A, the RAG crawler, OAuth, Slack, remote sync (first hop and same-origin hops; dropped on cross-origin hops like credentials — the Vert.x redirect handler drops them too) — and MCP (params._metaper SEP-414 through langchain4j'smetaSupplier, plus the HTTP header).Quarkus' Vert.x HTTP client tracer is off for the httpcalls client (
TracingPolicy.IGNORE). With the default policy it re-injected a freshtraceparentonto every redirect hop, including a cross-origin one the redirect handler had just stripped. The explicit header still carries the trace; the auto-instrumented client span for httpcalls is what is given up.Config:
eddi.tracing.propagate-outbound(defaulttrue). Inert whilequarkus.otel.sdk.disabled=true— a no-op span has an invalid context and produces no header, never an all-zero one.
Design decisions
MCP threading. Verified in the langchain4j-mcp 1.22.0-beta32 bytecode:
DefaultMcpClientcalls the meta supplier synchronously on the calling thread before the transport, butStreamableHttpMcpTransportrebuilds the request on an HTTP-client callback thread when it retries after session expiry. So the header supplier reads the trace context from the message's_meta, not fromContext.current()— header and_metacannot disagree, whichever thread builds the request.Source and call id travel in the OTel
Context(ToolCallTrace), set byToolLoopRunneraround its one call into the service, rather than as two more parameters: they label the span and nothing else,ToolInvocation's equality is a cost/cache identity, and a new overload would have broken the Mockito stubs of 17 test classes.Merged onto the
OutboundHttpfacade (#1042/#1046).SafeHttpClientwas retired onmainwhile this branch was open; propagation moved into the facade'sexchange/redirectHeaders, so every caller of the facade gets it and A2A no longer needs its own injection.Tracer: lazily resolved
GlobalOpenTelemetry.getTracer("eddi.tools"), same pattern asLlmTelemetryListener/LifecycleManager; package-private field so tests install an SDK tracer without mutating the JVM-wide global.
Docs
Monitoring guide: execute_tool span, propagation rules, and a "Sending traces to Langfuse / Arize Phoenix / Jaeger / Tempo" section with endpoints verified against each project's docs (Phoenix Cloud left explicitly unverified). Configuration reference row; tracing note in metrics.md; Platform Operator prompt line on tracing a slow tool (revision 17 → 18).
Files: TracePropagation.java, ToolExecutionService.java, ToolCallTrace.java, OutboundHttp.java, HttpClientWrapper.java, HttpClientModule.java, McpToolProviderManager.java, A2AToolProviderManager.java, monitoring-guide.md.
Not verified
The acceptance check — one connected trace through the monitoring compose (pipeline task → gen_ai span → execute_tool → downstream span) — was not run end-to-end in a live stack; the unit tests pin each link.
💰 feat(tenancy): enforce the tenant monthly cost budget — meter settled turns and Dream runs, gate model calls (2026-10-15)
Repo: EDDI (feat/tenancy-cost-metering)
What changed and why
maxMonthlyCostUsd was stored, validated, shown in the Manager quotas page and documented as not enforced: TenantQuotaService.recordCost had no production caller, so the monthly counter stayed at zero and the pre-call gate never tripped. It is now real.
Metering at the settle points. New
TurnCostMetercharges the current step'saudit:costto the default tenant from the pipeline's completion callback —ConversationService.admitTurn(say, streamed say, rerun; group member turns and sub-agents go through it too), the inlineCONVERSATION_STARTturn instartConversation, andConversationHitlService.resumeConversation(now always passes a completion callback, also for an internally driven resume). Only the not-yet-metered part is charged: the step keepsaudit:metered_cost, persisted with the turn, so a turn paused for approval and resumed is charged once in total. Skipped for a turn stopped by lease loss (nothing is stored; the new owner re-runs and meters it); a replayed idempotent turn never reaches the callback. A denied or unavailablerecordCostnever fails the turn — logged and counted oneddi.tenant.cost.metering{outcome}; a charge the store could not record is carried forward asaudit:pending_coston the newest step and charged by the conversation's next settle (review finding: an ordinary say turn starts a new step, and say turns are persisted as appends, so leaving it on the old step would have lost it).The marker key is
audit:metered_cost, notaudit:cost:metered. Step lookups are prefix matches, so a key starting withaudit:costwould be read back as the step's cost bygetLatestData(AUDIT_COST)(LlmTask.accumulateCost,LifecycleManager).audit:costno longer depends on the audit ledger.LlmTaskonly wrote it witheddi.audit.enabled=true; token usage and cost are now recorded either way (accumulateUsageAndCost), since the tenant budget charges them.Pre-model-call gate. New
LlmSpendGate, asked once per LLM task before any model request (plain, tool loop, cascade, streaming). The existingcheckCostBudgetgate ran only before tool calls, so an agent without tools never stopped, and one with tools kept calling its model to be refused tool after tool. A refusal fails soft like the tool-call gate: the model is not called, the task's fallback answer (responseValidation.fallbackMessage, or the default sentence) is served regardless ofonError, the step recordsllm:spend_refused:<taskId>, andeddi.llm.spend.refused{reason}counts it. Cheap: with quotas off it is a cache hit; on, one monthly-cost read per LLM task. The circuit breaker ticket is not acquired for a refused call, and the rolling summary is not updated.Dream (A2).
DreamServicecharges each consolidation call at the dream config's own prices (pricedCost— never the upper-bound estimate it uses formaxCostPerRun, so an unpriced config meters $0) and stops consolidating once the tenant budget is spent (not a failed cycle).Caveats removed. The WARN in
RestTenantQuota, the "not enforced" notes inTenantQuota,checkCostBudget(which also wrongly saidAgentOrchestratorcalled it per LLM turn) andrecordCost, and the note intenant-quotas.md, replaced with an accurate section listing the call classes that are not metered: rolling summary, tool-response summarization, group window/stance summaries, embeddings, the pre-pause segment of a tool-call HITL pause, lease-lost turns. TheMemberTurnExecutorcomment callingAUDIT_COSTa running total is corrected (it is per step).Docs/Operator.
tenant-quotas.md,langchain.md(prices drive the budget),metrics.md,configuration-reference.md; the Platform Operator prompt says the cap is enforced and priced-only (operator revision bumped; 20 at merge time).
Tests: TurnCostMeterTest (delta, pause→persist→resume once, prefix trap, outage retry, exception swallowed, over-budget marked, in-memory end to end), ConversationServiceCostMeteringTest (settle point through the real say path, unpriced, idempotent replay, lease loss), LlmTaskSpendGateTest, DreamServiceTest additions, ConversationServiceResumeTest (resume callback meters), RestTenantQuotaTest (no "NOT enforced" warning), LlmTaskAuditLedgerTest (cost now bypasses the collector gate), TenantCostMeteringIT (Mongo + Postgres Testcontainers: two priced turns cross a $0.01 budget and the gate then refuses; and a priced turn that pauses, is persisted to and reloaded from the real conversation store, and resumes with further cost is charged exactly the step total, with audit:metered_cost on the persisted step).
Group cost
GroupCostLedger used to read only the member conversation's last step's audit:cost; main fixed that independently (#1066, the snapshot now carries the conversation's summed cost). Tenant metering does not go through it either way — member turns settle through say.
💰 feat(llm): per-conversation LLM cost ceiling maxCostPerConversationUsd (2026-10-15)
Repo: EDDI (feat/tenancy-cost-metering)
What changed and why
A new optional agent-level field, maxCostPerConversationUsd on AgentConfiguration, bounds the priced spend of one conversation — the sum of every step's audit:cost. Absent (every existing agent) means unlimited and behaviour is unchanged; 0 allows no priced spend; a negative value is unlimited. The task-level, tool-only maxBudgetPerConversation is untouched.
Carrier.
AgentStoreClientLibrarycopies it onto the deployedAgent, which puts it on the memory instartConversationand incontinueConversation(every say, rerun and HITL resume passes there, so the running version's value always wins and a version without one clears it). The memory carrier is transient and typedOptionalDouble, not a nullableDouble: a mocked memory hands back0.0for aDouble, which here means "no spend allowed".Checks.
LlmSpendGatecompares the conversation's spend with the ceiling before the tenant budget, once per LLM task before any model call (plain, streaming, tool loop, cascade); a refusal serves the fallback answer and recordsllm:spend_refused:<taskId>withreason: conversation_ceiling. Because that gate only sees a tool loop's cost when the loop ends,ToolLoopRunnerrepeats the check between rounds (prior spend + the loop's tokens at the task's prices + its tool cost) and ends the loop with a fixed answer saying the completed calls took effect. Counted oneddi.llm.spend.refused{reason="conversation_ceiling"}.Docs.
langchain.md(new section),tenant-quotas.md,metrics.md.
Tests: ConversationCostCeilingTest (old JSON without the field, round trip, carrier set and cleared, spend summed over steps without the metering marker, gate order and edge values), LlmTaskSpendGateTest (ceiling refuses without asking the tenant budget; no ceiling sums nothing), ToolLoopRunnerCostCeilingTest (stops at the ceiling, prior spend counts, no ceiling unchanged), AgentStoreClientLibraryMemoryToolsTest (deployed agent carries the value).
Not done
No Manager field: the agent editor has no cost/limits section and no nullable-number input, and turnDeadlineMs — the nearest agent-level setting — is not editable there either. The value can be set through the agent JSON. Follow-up: a "Limits" section for both.
perf(groups): run the blocking group endpoints on virtual threads (2026-10-15)
Repo: EDDI · Branch: feat/group-endpoints-virtual-threads
What changed and why
This is the last part of the throughput plan's WS2 (item 5). Six group endpoints run discussion work inline, and each one held a Quarkus worker thread for an entire multi-agent discussion, every member turn and LLM call included:
discussfollowUpWithMembercontinueDiscussionapproveGroupPhasesubmitHumanInputapproveGroupPhaseStreaming, which callsresumeDiscussionon the request thread
The worker pool has about 200 threads and blocking REST endpoints share it, so a handful of long discussions could starve unrelated requests. Conversation turns already left that pool (PR #1045), and the member turns inside a discussion already run on virtual threads.
RestGroupConversation now marks those six methods @RunOnVirtualThread. The other streaming endpoints were already asynchronous and are unchanged: discussStreaming goes through startAndDiscussAsync, and continueDiscussionStreaming uses its own executor.
Design decisions
The annotation is on the implementing methods, not on
IRestGroupConversation. The JAX-RS contract stays free of execution-model detail. Whether Quarkus REST honours the annotation there was the open question;GroupEndpointsVirtualThreadITsettles it over HTTP.The proof is an IT, not a unit test. The execution model is chosen when Quarkus dispatches the request, so calling the bean directly cannot observe it. The IT installs a Mockito stand-in for
GroupConversationServicewithQuarkusMock(Mockito, not a JDK proxy, becauseQuarkusMockneeds an instance of the bean class). The stand-in recordsThread.isVirtual()for each service call and completes the streaming listener.
Verification
GroupEndpointsVirtualThreadIT: 6 tests, one per endpoint. With every annotation removed, all 6 fail with "a worker thread".GroupConversationITandGroupHitlIT, which drive real discussions, approvals and human input through these endpoints, pass (12 tests).1,106 group unit tests pass, along with
ImportStyleTest,BuildQualityGatesTestandChangelogRotationTest.
Outbound HTTP callers moved onto the facade; SafeHttpClient retired — consolidation phase 2 (2026-10-15)
Repo: EDDI · Branch: feat/outbound-http-callers (stacked on feat/outbound-http-facade, labsai/EDDI#1042) · Plan: planning/http-client-consolidation-plan.md, Phase 2
What changed
Every EDDI-owned caller now sends through OutboundHttp, with its existing caps, timeouts and redirect rules unchanged:
WeatherTool, WebSearchTool
HOPS_ONLY (fixed hosts), JDK-safe redirects
bytes(1 MiB / 2 MiB, TRUNCATE); a truncated answer is refused as before
PdfReaderTool, WebScraperTool
the tool's own URL check, then HOPS_ONLY
bytes(eddi.tools.*, TRUNCATE)
AttachmentForwarder
STRICT
bytes(per-file cap, TRUNCATE)
SafeHttpPageFetcher (crawler)
STRICT
bytes(cap, TRUNCATE); its hand-written bounded read and watchdog are gone (identical in the facade), and so is its IRuntime dependency
OAuthTokenClient
NONE (the credential-endpoint allowlist is the gate), NEVER
string(1 MiB, FAIL). New cap: a token answer was unbounded before; anything over 1 MiB is now a transient TOKEN_ENDPOINT_UNAVAILABLE
SlackWebApiClient
NONE (fixed host), NEVER
string(1 MiB, FAIL); its private HttpClient is gone. Now bounded in time — it had no request timeout at all, and gets the facade's 15 s per hop
A2AToolProviderManager
STRICT or METADATA_ONLY per eddi.security.ssrf-protection.enabled, NEVER
bytes(1 MiB, TRUNCATE); its lazy private client and its a2a-body-watchdog thread are gone
OpenApiSpecFetcher (MCP/httpcall OpenAPI discovery, added on main while this PR was open)
its own redirect loop with OutboundTargetPolicy on every hop, each hop one NEVER send with SsrfPolicy.NONE (the policy is the gate)
stream(16 MiB, 4 × 30 s); its private openapi-spec-body-watchdog thread is gone. Its "did not arrive within" message now names the real budget (120 s), not the request timeout
RemoteApiResourceSource (+ the two static helpers)
new profile INTERNAL_PEER: NONE (SourceUrlValidator stays the gate), NEVER
JSON string(eddi.backup.sync.max-response-bytes, FAIL) with the old refusal message; archives bytes(256 MiB, FAIL)
SafeHttpClientis deleted (internal API, no callers left), withCappedStringBodyHandlerand the per-source client lifecycle (close(),configure(), the owned-client flag): sources share the application's facade.BoundedBodyReadermoved intoengine/httpclient/outboundas package-private.RestImportServicegets the facade by setter injection, lazily falling back to a standalone one outside CDI, asA2AToolProviderManagerdoes.AGENTS.md (§4.2 table, §4.4 Tool Security and its sample, Key Files), README,
architecture.md(SSRF layers and sample),connections.md,code-review-standards.md,security-review.md,a2a-protocol.md,configuration-reference.mdandmetrics.mdnow nameOutboundHttp.The
// codeql[java/ssrf]suppressions moved with the sinks: they now sit on thehttp.send(...)calls inRemoteApiResourceSource(and itssendJsonhelper).
Tests
The 22 server-backed
SafeHttpClienttests were ported toOutboundHttpServerTestagainst the facade on the real JDK engine (a no-ophopValidatorreplaces the Mockito spy that let a redirect reach loopback). Their subjects, and a new cross-originAuthorizationcase, are all still covered over real sockets.New test helpers in
engine/httpclient/outbound(test sources):TestOutbound(standalone facade, facade over any engine, canned responses),ScriptedEngine(records hops, replays answers), andJdkClientEngine(routes facade hops into a mocked JDKHttpClient). The last one let roughly 200 remote-sync test stubs stay as they were while the code under test runs through the real facade.The crawler, OAuth, A2A wiring and new Slack tests run the real facade over a scripted engine rather than mocking it. New: a loopback crawl seed is refused before anything is sent; an A2A peer's 307 and a Slack 302 are never followed; a sync source declaring a body over
eddi.backup.sync.max-response-bytesis refused before it is read (the old size tests only simulated the refusal in a stub, so lifting the cap broke none of them).Mutation-checked: dropping
NEVERfrom OAuth, A2A, Slack or remote sync, weakening the crawler toHOPS_ONLY, or lifting the remote-sync size cap each fails a test.
Design decisions
internal-peerhas its own connection pool but no configuration keys yet. Remote sync had nothing tunable, so it uses thedefaultsettings, and the configuration reference says so.Pass-through, not rewrite: every caller keeps its old checks (the tools' own
validateUrl, A2A's pre-credential check,SourceUrlValidator). The facade's policy is added on top.
Next: Phase 3, the langchain4j adapter: shared LLM provider pools, plus llm-provider keys.
Outbound HTTP facade — Phase 1 of the client consolidation (2026-10-15)
Repo: EDDI · Branch: feat/outbound-http-facade · Plan: planning/http-client-consolidation-plan.md, Phase 1
What changed
New package
ai.labs.eddi.engine.httpclient.outbound.OutboundHttpis the one place outbound policy lives: the SSRF policy per request (STRICT,HOPS_ONLY,METADATA_ONLY,NONE,FOLLOW_GLOBAL_FLAG); redirects followed hop by hop with aMethodRule(JDK_SAFE, the RFC 9110 ruleSafeHttpClientalways used, andVERTX_COMPAT, which matches what thehttpcallsVert.x client does); cross-origin stripping of the fixedSENSITIVE_HEADERSplus any header the request marks caller-derived (a${caller:token}can sit in any header name); one whole-exchange deadline; redirect bodies dropped after 64 KiB; body caps enforced while reading (BodyMode.string/bytes/file/stream/discard,OnOverflow.TRUNCATE|FAIL); refusal on a Vert.x event-loop thread; four meters (eddi.http.outbound.requests|duration|blocked|bytes) on a new Outbound HTTP dashboard row.OutboundEngineis a one-hop SPI;JdkOutboundEnginekeeps onejava.net.httpclient perProfile(default,llm-provider,apicalls,internal-peer), with an optional forward proxy (vault-resolvable credentials, answered to proxy challenges only, failing closed when unresolved) and an optional namedquarkus.tlsconfiguration.SafeHttpClientis now a@Deprecatedadapter over the facade. Its API and behaviour are unchanged: all 22 server-backedSafeHttpClientTest/SafeHttpClientBodyBoundsTestcases pass as they were, apart from one import (CallerFramesmoved). Its unit tests of moved internals were ported: the method rule toMethodRuleTest, the budget and redirect-body discard toOutboundHttpTest, and thewithDefaultTimeoutrebuild to a request-conversion test.New settings, documented in configuration-reference.md:
eddi.http.outbound.engine,eddi.http.outbound.default.{connect-timeout,total-timeout,protocol,tls.configuration-name},eddi.http.outbound.proxy.{host,port,non-proxy-hosts,credentials}. The connect timeout falls back tohttpClient.connectTimeoutInMillis, so a tuned deployment keeps its value.
Design decisions
Only the
defaultprofile has keys. The others get theirs in the phase that moves their callers, so no documented setting is a silent no-op in the meantime.tls.named-groupswas dropped from this phase.java.net.http.HttpClientcopies the SSL parameters it is given and discardsnamedGroups:client.sslParameters().getNamedGroups()comes backnull. A key would therefore be a no-op. PQC plan PQ-3 needs another route: anSSLContextwrapper that sets groups per engine, the globaljdk.tls.namedGroups, or the Vert.x engine.max-connections-per-hostwas deferred to the Vert.x engine (Phase 4), because the JDK client has no per-host pool limit.OutboundBlockedExceptionextendsIllegalArgumentExceptionandOutboundTimeoutExceptionextendsHttpTimeoutException, so every existingcatchkeeps working.The plan's table maps
send*toNONE, but whatsendactually did was trust the initial URL and fully validate every redirect hop. That isSsrfPolicy.HOPS_ONLY, a policy the plan did not list.The event-loop guard was enabled after an audit: the only
Uni/@NonBlockingcode insrc/main/javaisNamelessPrincipalAugmentor, which makes no outbound call.Mutation-checked: removing caller-derived stripping, the
VERTX_COMPATRETURN, the redirect-hop check, the FAIL-mode cap probe and the redirect-body cap each fails a test.
Next: Phase 2 moves the callers (OAuthTokenClient, SafeHttpPageFetcher, AttachmentForwarder, the tools, SlackWebApiClient, A2AToolProviderManager, RemoteApiResourceSource) onto OutboundHttp and retires SafeHttpClient.
docs(security): cryptography inventory and post-quantum readiness, guarded by a test (2026-10-15)
Repo: EDDI · Branch: feat/pqc-crypto-inventory
First step (PQ-1) of the post-quantum readiness work. It changes no runtime behaviour.
What changed and why
New page
docs/cryptography.mdlists every algorithm EDDI uses (vault AES-256-GCM and PBKDF2, the HMAC-SHA256 audit ledger and vault checksums, Ed25519 agent signing, SHA-256 hashing, and TLS), what each one protects, and whether it is post-quantum safe. It also covers the threat model (harvest-now-decrypt-later for TLS, future forgery of Ed25519 signatures) and the roadmap. The page is linked fromsecurity.md(TLS section and See Also) and fromSUMMARY.md.Verified on JDK 25.0.1: JSSE's default named groups are classical only (
x25519, secp256r1, secp384r1, secp521r1, x448, ffdhe*), whileML-DSA-65andML-KEM-768are available through the standard JCA (an ML-DSA-65 signature is 3309 B and its public key 1974 B). The page states only these verified facts about TLS.New
CryptoInventoryTestscanssrc/main/javafor the JCA enginegetInstance(...)calls andnew SecretKeySpec(...). It resolves each algorithm from a literal or a same-filestatic final String, and fails the build in four cases:the algorithm is not on its allowlist;
the argument cannot be resolved, so moving the string into a variable cannot bypass the check;
the call pins a JCA provider;
an allowlist entry is no longer used, or is not named in
docs/cryptography.md.
Design decisions
Rather than scan only the per-class constants listed in the plan, the test resolves each call's argument, so a new call site cannot slip through by using an unfamiliar constant name.
TrustManagerFactory,KeyManagerFactoryandKeyStoreare left out of the scan: they name PKIX and trust-store formats rather than primitives.The allowlist is two-way (unused entries fail as well) so the doc cannot drift from the code.
Next
PQ-5a: make the existing agent signatures on audit entries versioned and verifiable (see planning/pqc-readiness-plan.md).
✨ feat(rag): live run progress, a knowledge-base inspector and schedule status for ingestion (2026-10-15)
Repo: EDDI (feat/rag-ingestion-ux)
What changed and why
Ingestion ran blind: a run row was written as RUNNING with zeroes and only got its numbers when it ended, nothing said what a knowledge base actually held, and a source's schedule was a cron string with no word on whether it was armed, firing or failing. The backend now answers all three.
Run visibility
IIngestionStateStore.reportProgress(run)writes a running run's counters onto its row, fenced onstatus = RUNNINGin both stores, so a late write can neither reopen nor overwrite a finished or reaped run.IngestionPipeline's collector calls it at most every two seconds (forced once at the start, so the trigger is on the row before the first document); a failed write is a stale number, never a failed run.IngestionRungainsdocumentsSkipped,stopReasonandtrigger(MANUAL/SCHEDULED), with a 13-argument constructor kept for the existing callers. Postgres gains the columns throughADD COLUMN IF NOT EXISTS; Mongo needs nothing. The skipped count and stop reason were already inIngestionReportand reached only the preview response and the log.RagSourceIngestionService.runAsynctakes the trigger;processScheduledFirepassesSCHEDULED. A run cancelled at shutdown is now closed with the counters its last progress write recorded rather than zeroes.POST …/sources/{sourceId}/runreturns therunIdit reserved.
Inspector — KnowledgeBaseInspector, read-only:
GET …/sources/{sourceId}/documents(VIEW) — the source's document states, most recently embedded first, filterable and paged, labelled by file name for uploads; the orphan-sweep marker row is hidden.GET …/sources/{sourceId}/chunks?documentId=(EDIT) — one document's chunks in document order.POST /ragstore/rags/{id}/search(EDIT) — a test retrieval with the knowledge base's ownmaxResults/minScoreas defaults, optionally narrowed to one source.The vector stores have no listing, so chunks are reached by a similarity search filtered on the metadata ingestion writes, and always ANDed with
EmbeddingStoreFactory.retrievalFilter— the inspector sees exactly what retrieval would, and a per-id knowledge base in a shared table sees only its own chunks. A store that cannot filter answers 501; a failing provider or store 502 with the cause.
Schedules
IScheduleStore.readScheduleByName(Mongo + Postgres), andGET …/sources/{sourceId}/schedule(VIEW) returning next/last fire, fire status, fail count, disable reason and the last five fires.GET /ragstore/rags/cron/previewapplies the save-time checks — parseable, matches a real date, not more frequent thaneddi.schedule.min-interval-seconds— and returns the next fire times in UTC.
Design decisions
Chunks and search need EDIT, the document list VIEW. A published knowledge base grants VIEW to everyone; the chunk text is the knowledge base's content and every call costs an embedding.
Progress is throttled in the pipeline, not in the store. One small update per source every two seconds; the interval is an instance field only so a test can make every document report.
Search goes through the retrieval isolation filter unconditionally. An inspector that could see another knowledge base's chunks in a shared table would be a cross-tenant read.
Tests
IngestionStateStoreContract (three new cases, run against Mongo, Postgres and the in-memory double), IngestionPipelineTest (trigger + stop reason recorded; counters visible on the running row while it embeds), RagSourceIngestionServiceTest (shutdown keeps progress), KnowledgeBaseInspectorTest (real InMemoryEmbeddingStore: ordering, isolation, source narrowing, min score, file labels), RestRagIngestionInspectionTest (access levels, clamping, 400/404/501/502), RagSourceScheduleViewTest, and readScheduleByName in both schedule store container tests.
Files: IIngestionStateStore.java, IngestionPipeline.java, KnowledgeBaseInspector.java, RagSourceIngestionService.java, IRestRagIngestion.java, RestRagIngestion.java, IScheduleStore.java, both state and schedule stores, docs/rag.md.
What's next
The cost controls planned in rag-ingestion-source-types-plan.md (§3.13) and run outcome/duration metrics. A cancel button for a running run would need a cancellation signal the worker polls; isCancelled is the natural hook.
✨ feat(manager): see ingestion while and after it runs — progress, run details, schedule, contents, test retrieval (2026-10-15)
Repo: EDDI (feat/rag-ingestion-ux)
What changed and why
The knowledge-base editor showed a spinner during a run, "N ingested · M unchanged" after it, a bare cron string for the schedule, and nothing at all about what the knowledge base held. It now uses the endpoints added in the backend entry of the same date.
Live progress (
ingestion-run-history.tsx→RunProgress): documents looked at against what the last complete run saw (or the file count, for a Files source), every counter as it moves, the trigger, and elapsed time against the source's time budget. The run history polls every 2 s while a run is in flight (was 3 s).Run history opens each run to all it recorded — skipped, failed, removed, chunks, duration, estimated cost and how it ended, the stop reason said in words. A completed run that lost documents gets an amber icon instead of the green tick, and its summary says how many failed.
Errors say what the server said. Run, Preview and Purge failures append the server's message to the generic line ("…A run may already be in flight." was shown for a disabled source and for a database fault alike).
Schedule (
ingestion-schedule.tsx): a preset picker (hand only, hourly, daily, weekly, monthly — UTC) or a custom cron checked against the server's rules while it is typed, with its next fire times in local time. Once saved,ScheduleStatusshows the next run, the last fire, recent fires with their errors, and says in words when a saved cron produced no schedule, when fires are failing, when the scheduler disabled it and when it was dead-lettered. The card header shows the preset's name with the raw cron on hover.Ingested documents (
ingestion-source-contents.tsx): the source's documents, filterable and paged, each Live, Missed by the last N runs or Removed; opening one shows its chunks. Collapsed by default — each opened document is an embedding call on the server, so chunks are fetched only on demand, never retried, and kept for five minutes.Test Retrieval (
retrieval-tester.tsx): a new editor section that searches the whole knowledge base or one source exactly as an agent would and shows each chunk with its score and origin.After a run ends the document list and schedule refetch (
useRefreshAfterRun), keyed on the newest run's id and status rather than a timer.The legacy Document Ingestion section now says that pasted documents cannot be listed, updated or removed later, and points to a Files source.
Schedules page: an ingestion schedule links to the knowledge base it is changed on.
Design decisions
No
countinterpolation in the new strings, so none of them needs per-locale plural categories; the numbers read naturally with neutral wording ("Missed by the last {{runs}} run(s)").The source card observes the files query only while a run is in flight, for the progress total. Observing it always refetched the list every time a card was opened — caught by the existing "reloads the file list" test.
The run id
POST …/runnow returns is not used:ApiClientdiscards every 202 body, and theRUNNINGrow in the history identifies the run.
Tests
resource-detail-rag-insight.test.tsx (9 cases: progress estimate and bar, run details and stop reason, server error text, schedule status / missing schedule, live cron check, documents → filter → chunks, retrieval request and result, retrieval failure), one case in schedules-regressions.test.tsx; the cron assertion in resource-detail-rag-sources.test.tsx now checks the preset label and the raw cron in its title. 87 new keys in all 11 locales; npm run i18n:check, lint and typecheck pass. The five new operations are added to openapi-operations.json (refreshed from a Maven-built spec), which the MSW contract test checks every handler against. Checked in the browser against the mock API.
feat(loadtest): turn load-test harness and the throughput baseline (2026-10-15)
Repo: EDDI · Branch: feat/throughput-loadtest-harness
What changed and why
WS0 of the throughput plan: every later workstream must show before/after numbers, and until now there was nothing to measure with.
scripts/loadtest/(new). A compose stack (MongoDB, a WireMock OpenAI-compatible LLM, EDDI, k6) with everything bound to127.0.0.1, plusloadtest.py, which uses only the standard library.upmounts this checkout'starget/quarkus-appinto the published image, the wayscripts/cluster-demodoes, and creates one deployed LLM agent throughPOST /administration/agents/setup.runandmatrixset the mock's latency through WireMock's admin API, run k6 (scenariossteady,burst,same-conversation,long-conversation), sample the saturation gauges every second, and write turns/s, latency percentiles, errors by status, peak executor, coordinator, audit and pool gauges, and MongoDB operations per turn (opcountersandtopper collection).scripts/loadtest/results/baseline-2026-10-15.md. Measured onaa811c838at 3 s LLM delay: 50 and 200 concurrent conversations run at the LLM's pace. At 500, throughput flattens at about 61 turns/s with the managed pool pinned at 199 active and up to 198 queued, and p50 rises from 3.1 s to 7.5 s. No request is rejected: overload shows up as latency. Each turn costs about 23 MongoDB operations, independent of load.
Design decisions
One Python driver instead of the plan's
setup.sh/collect.sh. It matches the cluster demo and runs the same way from PowerShell and Git Bash.No new meter. The existing executor gauges explain the latency on their own, so the plan's optional
eddi.turn.queue_waittimer is not added.WireMock with async responses and no request journal, so the mock is not the bottleneck at hundreds of concurrent delayed calls.
Next
WS1 (configuration cache): re-measure with --think-ms 3000, because back-to-back turns hide the 2 s TTL. WS2 (thread ceiling and admission). Unexplained so far: about 3 vault reads per turn.
perf(runtime): conversation turns on virtual threads, bounded by an in-flight limit (2026-10-15)
Repo: EDDI · Branch: feat/throughput-virtual-thread-turns
What changed and why
WS2 of the throughput plan. Each in-flight turn held one ManagedExecutor platform thread, blocked on the pipeline's future for as long as the LLM took. The pool (~200 threads), which blocking REST endpoints share, was therefore the node's turn ceiling. Past it, turns queued without bound in front of the pool, and overload showed up as latency for everything rather than as a rejection.
Turns run on virtual threads.
IRuntime.ITurnExecutionis a marker sub-interface of the completion callback. Both coordinators (AbstractQueuedConversationCoordinator.execute, andClusterConversationCoordinator.runUnderLease, whichsubmitNextalso goes through) now pass one, andBaseRuntimeruns those submissions on a dedicated virtual-thread executor (eddi-turn-*). The body is unchanged: thread bindings, the nested marker (so the pipeline still goes to the nested executor), the one-shot callback and the abandonment token. Deploys, retention sweeps and the parser endpoint stay on the pool. New gauge series:eddi_runtime_executor_{active,queued}{pool="turn"}.Admission control:
eddi.conversation.max-in-flight-turns(default1000). The C11ProcessingTurntoken carries the permit. It is taken with one CAS against a permit counter, so concurrent admissions cannot overshoot, and given back exactly once byfinish(). Only the turn's own exits callfinish(): the turn task'sfinally, its discard hook, and the pre-submission rollback. The gauge's existingrelease()still fires as soon as the client has its answer, but persistence runs after that on the same thread, so the permit stays held until then. Releasing it with the gauge let the node run past its limit (1029 active at 1000 in the load test below). The permit is admitted after idempotency admission (a duplicate key answered from the stored result takes no permit) and before the tenant quota slot, so a capacity refusal does not spend quota.startConversationadmits its CONVERSATION_START turn the same way, because that turn runs inline and can call an LLM. A turn the watchdog abandons while its body keeps running (a swallowed interrupt) keeps its permit until that body really stops: the in-flight registration that already tracks such zombies returns it onsettle(). A zombie that never ends therefore holds its permit, whicheddi_conversation_abandoned_runningshows. The refusal,TurnCapacityExceededException, extendsRejectedExecutionException, so every surface answers it with the existing 503capacity_exceeded+Retry-After. It is counted ineddi_turn_rejected_total{reason="in_flight_limit"}./v1/chat/completionsruns on a virtual thread (@RunOnVirtualThreadinstead of@Blocking). Both the sync wait and the streaming body held a second worker thread per request next to the turn's own.Monitoring.
EddiExecutorSaturatedno longer describes turns. The newEddiTurnCapacityReachedalert fires when turns are refused at the limit for 5 minutes; it has a runbook entry and a promtool case. The full-metrics dashboard's "Coordinator throughput" panel charts the rejection rate.docs/metrics.mdand the configuration reference cover the new series and property.
Measured (load-test harness of the WS0 PR, 3 s mock-LLM delay, 10 turns per conversation)
200
52–60 · 3.1–3.3 s · 3.5–4.4 s
60 · 3.1 s · 3.6 s
500
61 · 7.5 s · 9.8–10.1 s
131 · 3.3 s · 4.2 s
1000
(not run: past the ceiling)
269 · 3.2 s · 4.6 s
1500 (limit 1000)
—
182 · 3.6 s · 5.5 s; 8161 × 503, no timeout, no other 5xx
Before, at 500 conversations, the managed pool was pinned at 199 active with up to 198 queued. After, it stays at 0: turns peaked at 1029 active on pool="turn" with 326 live JVM threads. That build still released the permit with the client's answer. The overshoot past 1000 is the persistence tail that review moved inside the permit, and the numbers were not re-measured after that change. MongoDB operations per successful turn are unchanged (≈ 22.7). A refused turn still costs its conversation loads, because admission sits after them. That is WS3a's single-load work.
/v1 answers capacity refusals as 503
Review found that the OpenAI-compatible bridge turned any RejectedExecutionException into a 500: the new in-flight limit, coordinator saturation and the shutdown drain alike. That applied to the sync response, the streaming error event and conversation start. It now answers 503 capacity_exceeded with Retry-After: 5, like every other surface. A quota-store outage gets 503 quota_accounting_unavailable (OpenAiApiException.capacityExceeded, OpenAiConversationBridge.rejectionAsApiException, and a Retry-After header from OpenAiExceptionMapper).
max-in-flight-turns=auto (the default)
A fixed 1000 fitted only one container size. The Helm chart's 1 GiB limit gives a 512 MB heap at the image's default 50 %, so a busy node would run out of memory long before 1000 turns. auto (InFlightTurnLimit) derives the limit from the maximum heap: (max heap − 256 MB) ÷ eddi.conversation.in-flight-turn-memory-mb (new, default 2 MB per turn, twice the ~1 MB measured). That gives 128 at 512 MB, ~1400 at 3 GB and ~2900 at 6 GB.
A number still sets the limit, and
0still disables it.An invalid setting fails the boot (
@PostConstruct), and the node logs the value it resolved.The value is exported as the gauge
eddi_conversation_max_in_flight_turns, charted next to the in-flight count on the full-metrics dashboard. That panel's legend is now on.
Sizing the limit
A later comparison run (the load-test harness, MongoDB and PostgreSQL, two rounds each) found that with exactly as many clients as the limit (1000 against 1000), 5–12 % of turns were refused. A turn keeps its place until it is persisted, which happens after its caller already has the answer, so a client's next turn can arrive first. The configuration reference and application.properties now say to leave roughly 10–20 % headroom above the expected number of concurrently active conversations. They also give the measured heap per in-flight turn (~1 MB for short conversations) and PostgreSQL's pool default (50).
Design decisions
A callback marker, not a new
IRuntimemethod or a wrapped callable. About 25 tests mockIRuntime, and a new method would returnnullthere. The coordinator tests also assert callable identity (eq(task)) andisNull()bindings, which a wrapper would break. The coordinators already pass a callback; marking it changes nothing else.max-active-conversationsstays. It caps how many conversations hold a turn queue and only ever refuses a new conversation; the new limit caps turns. Both are documented side by side.Rejections log at DEBUG in
ConversationService.RestAgentEnginealready logs one WARN per 503, and under overload a second line per refused turn only doubles the flood.
Next
RestGroupConversation.discussand the other synchronous group endpoints still hold a worker for a whole discussion. Converting them is a JAX-RS-interface change; it is a separate piece.WS1 (configuration cache), then WS3a (one conversation load per turn, which also makes refused turns cheap).
🔒 fix(security): close the M9, M10, L6, L9, L10 and L12 findings of the 2026-10-15 review (2026-10-15)
Repo: EDDI (fix/authz-lifecycle)
What changed and why
Six residual findings of the security review of main at d49e855, each a gap that the live RBAC/IDOR tests did not reach. One commit per finding; the code comments name the finding so a later reader can find this entry.
M9 — A2A JSON-RPC skipped the per-agent USE check.
POST /a2a/agents/{agentId}required a role, but not theUSEgrant thatPOST /agents/{id}/startand/v1apply under enforced workspaces, so anyeddi-usercould converse with any agent.RestA2AEndpoint.handleJsonRpcnow callsResourceAccessGuard.requireAgentUseAccessbefore dispatchingSENDandSTREAM— outside the method's catch-all, so the refusal is a 403 and not a JSON-RPC "internal error".tasks/getandtasks/cancelstay principal-scoped: they reach only a task this peer created after passing the gate.A2aEndpointPermissionsTestandRestA2AEndpointTestcover every send and stream method name in all three dialects.M10 — GDPR erasure and export did not reach the A2A task store. A peer's tasks hold the message it sent and the reply, keyed by its principal, and outlived an erasure until the cache expired.
IA2ATaskStoregainstasksOfanderaseForPrincipal(the length-prefixed key makes a principal's prefix exact), andA2ATaskGdprParticipantregisters both withGdprComplianceServiceas stepa2aTasks. It also joins the cascade's stop phase:beginErasurecloses the store to the principal's writes for five minutes, so a peer request admitted while the cascade runs cannot leave a task behind the sweep; on one node the check and the write are serialised against the sweep by a read/write lock, and in cluster mode the marker lives in a sharedA2A_ERASINGbucket so every node refuses the writes, while a shared per-principalA2A_INDEXlets a sweep or export on one node reach the records other nodes wrote (bucket keys are hashed, so nothing else can enumerate them). The index is kept with a compare-and-set loop —SharedKvCache.replace(key, expected, next)is now a revision-checked update on the bucket, not get-then-put — and caps a principal at 10,000 tasks: an id that falls off the end takes its record with it. The one narrow cross-node residual is inclustering.md.gdpr-compliance.mdlists it and now has a section naming what erasure does not reach — RAG knowledge bases, application log files, telemetry exports and LLM-provider retention — with why, and what bounds each.L6 — dead letters kept the raw turn input for seven days.
describeTurnruns before the pipeline, so thescope: secretscrub could not help, and only a client that setcontext.secretInputwas spared. The captured input and its string context values now pass throughSecretRedactionFilter— string leaves inside object values included, with credential-named keys masked — an entry the client markedsecretor whose key names a credential is dropped, and a turn addressed to an agent whose workflows carry anyscope: secretproperty instruction is recorded assecretInput: truewithout input or context, like a client-flagged one. The fact is computed once at deployment:PropertySetterConfiguration.hasSecretInstructions(), carried byIExecutableWorkflowand aggregated onIAgent, and read from the agentsayalready resolved for the turn — no second lookup on the hot path. A turn with no resolved agent is treated as one that expects secrets.L9 — three ownership gaps on the internal REST surface.
RestAgentManagementnever bound the{userId}path segment to the caller (its only check asked whether the caller was anonymous), andinitUserConversationdeleted the ended-conversation mapping before the engine's transitive 403; every method now runsOwnershipValidator.validateUserAccessfirst. The group write pathsfollowUp,continueandcontinue/streamusedrequireOwnerOrAdmin, which admits any authenticated caller to a legacy record with no owner; they userequireOwnerOrAdminStrict, as delete and close already did. And aneddi-approvercould cancel any user's executing turn throughPOST /agents/{id}/cancel: a caller who is only an approver now goes throughcancelPausedConversation, a single compare-and-set onAWAITING_HUMANthat never signals an executing turn, so the entitlement check and the cancel are one atomic operation (any other state is a 403; documented inhitl.md); the MCPcancel_conversationtool applies the same rule throughHitlAccessGuard.mayCancelExecuting; owner and admin are unchanged.L10 — unbounded listings and unbounded per-user attachments.
?limit=2147483647returned every descriptor in one response (verified live on/agentstore/agents/descriptors).PageBoundsapplies one ceiling —eddi.rest.listing.max-limit, default 1000, the Manager's largest descriptor page — to every config store's descriptor listing, the cross-resource/descriptors, the conversation listing (which used to clamp silently at 100), the visible user memories and both/administration/logslistings; a limit above it, or a negative index, is a 400 with a JSON{"error": …}body.eddi.attachments.max-per-userandeddi.attachments.max-total-bytes-per-userdefault to 500 files and 1 GiB instead of off (attachments-guide.md).L12 (remaining) — legacy salt and request logging. A boot that adopts the legacy fixed KEK salt (DEKs present, no per-deployment salt) records the fact in the vault metadata (
vault-kek-legacy-salt-seen); every later boot still on it logs an ERROR namingPOST /secretstore/secrets/admin/rotate-kekand the date the salt was first adopted, where before there was one WARN per boot. A persisted or migrated salt clears the record.logRequestson the LLM decorators wrote 200 characters of the last message — the user's own text — at INFO; the line is now DEBUG and both it and thelogResponsesline run throughLogRecordRedactor(before truncation, so a key straddling the cutoff cannot leave its first characters behind), which is public for that.Flaky test fixed at its cause.
ClusterConversationCoordinatorTest.localDeadLettersPagefailed CI on this branch (and passes or fails locally by chance): the local dead-letter id was drawn outside the lock that appends the entry, so concurrent failures could append out of id order, and the cursor paging over local entries — which skips by id number — then dropped or repeated one. The id is now taken under the lock;InMemoryConversationCoordinatorTest.concurrentDeadLettersAreRecordedInIdOrderpins it.
Files: RestA2AEndpoint.java, A2ATaskGdprParticipant.java, CachedA2ATaskStore.java, ConversationService.java, WorkflowStoreClientLibrary.java, RestAgentManagement.java, RestGroupConversation.java, RestAgentEngine.java, PageBounds.java,