✨ feat: ADR-011 local mode + credential source abstraction#71
Conversation
|
Pushed 5 commits addressing all 10 review items. Blockers#1 dispatch adapter mismatch ( #2 server_mode vs permissive coupling ( #3 status depends on auth store ( #4 credential_source orphan column ( #5 #6 local seed conflict + fail-fast ( P1/P2#7 discovery binary path accuracy ( #8 login_status gates active ( #9 resolved-credential fast path ( #10 EnvFromHost fail-closed ( Test totals
End-to-end against a fresh data dir with |
|
Pushed Fix A — stale agent.model no longer aborts the runSymptom in e2e: PUT /api/agent-definitions with Fix ( Live evidence after re-run with the same bad value: Run terminated Truth-table tested in 5 unit tests (empty/no-advert/match/mismatch/no-fallback-when-listless). Fix B — agent's final_output surfaces on the issueSymptom in e2e: requirement_analyzer (Claude) completed Fix ( Live evidence after re-run: 3 unit tests cover NaturalEnd→surfaced, error→skipped, whitespace→skipped. Total test countsPer-crate lib totals (existing + new):
Findings noted but NOT fixed in this PR
|
|
Pushed Code fix — token totals on activity rows
Token totals from
(The rest of the original comment — about server URL plumbing and |
|
Pushed 6 commits resolving all 8 actionable R2 items (skipping #9 per reviewer's "not blocking" note). CommitsPer-item resolutionBlockers
P1/P2
R2#9 (not blocking, per reviewer) — skipped. Test totals after this round
|
|
Pushed P1 — local host-native overlay now honors
|
|
Pushed Note on review cacheThe latest review was against a stale view (15 commits /
Genuinely new in
|
2222d68 to
ba08723
Compare
|
History rewritten into 6 atomic commits (force-pushed; tree byte-identical to the previously CI-green Review items — statusP0 (direct CLI dispatch no-pool fail-open) — fixed. Both ingresses now route through one shared resolver
P1 (stale host-native row on re-run) — fixed, both cases:
P3 (PR summary stale migration) — fixed. PR description now reads "Migration V095 … the originally-planned V094 Tests
|
…ed dispatch resolver
ba08723 to
350514f
Compare
|
Pushed P0/P1 (blocker) — inactive agents now refused at both dispatch ingresses
// dispatch_api.rs
pub(crate) fn ensure_agent_dispatchable(agent_def: &AgentDef) -> Result<(), Response>
P2 — resolved-credential read endpoint now mirrors dispatch
P3 — updated_at bumped on login-state refresh
Tests
Note on base
|
Summary
Introduces
oversight local, a single-user, no-login, host-native deployment that boots from any project directory and auto-discovers the user'sclaude/codex/openclaw/hermesCLI agents. Built on a generalisedCredentialSourceabstraction so cloud and local share one dispatch path.Vault/HostNative/EnvPassthrough/ExternalRef) carried onResolvedCredential; resolver dispatches oncredential_idprefixes (host-native:<adapter>,env:,ext:,vault:), fully backward-compatible with the legacy<ns>:<id>form.oversight localsubcommand wires the permissiveAuthorizer, injects a syntheticlocaluser, runs host discovery on boot, and idempotently seedsagent_definitionsrows withcredential_id = "host-native:<adapter>".SecretMaterial::EnvFromHostbuilding block for worker env passthrough (resolver side reserved as stub).mode: "local"field on/api/auth/statusand skips the Login route.scope/scope_idfor future multi-tenant filtering (additive, no data migration). The originally-planned V094credential_sourcecolumn was dropped — thecredential_idprefix is authoritative and the source is derived at read time viaderive_credential_source_kind.Details and tradeoffs:
apps/www/src/content/docs/architecture/adr-011-local-mode-and-credential-sources.md(中文镜像同步)Test plan
cargo test --workspace --lib— 1179 passed, 0 failed across 10 cratesnpx vitest run— 13 frontend auth tests passoversight local:/api/auth/statusreturns{mode: "local", bootstrapped: true}(no login required)claude/codex/openclaw/hermesfrom PATH with correctcredential_id = "host-native:<kind>"/api/agent-definitions/:id/resolved-credentialreturnssource: {kind: "host-native", adapter_kind: "claude"}~/.claude/configoversight servestill requires login and resolves vault credentials)