Dependency management on committed-truth + GitHub-native (PR #85 integration) + org-config consolidation#94
Merged
Conversation
…utation agent Move the BFF's LLM generation flows (requirements generate, requirements chat, design generate) off the legacy agents-service and onto the new @aep/agents file-mutation agent, streamed through a unified turn endpoint and folded client-side. - packages/agent-stream: extract the client-safe fold + wire contracts (FileBundle/applyToolCall/toChange, the SSE reader, StreamPart types, and the single component-design JSON schema) into a shared workspace package, so the console, evals, and service fold one definition. - services/agents: harden the standalone agent — per-turn model built from the X-Anthropic-Key header, always-on M2M gate (RS256 JWKS / HS256), Postgres conversation store with TTL sweep, SSE keep-alives, vendored skills. Set AGENT_MAX_OUTPUT_TOKENS (default 64000) so large generations no longer truncate mid-tool-call and silently fold to an empty draft. - services/aep-api: new files feature (list/read/apply with per-file CAS, 409 on conflict) and genai feature (unified turn endpoint, SSE passthrough, vendored skills, save=tag / discard=revert-to-tag); per-project working tree and clone plumbing removed; design assembled from component design.json. - console-legacy: cut the requirements/design pages over to the unified turn endpoint with FE-owned drafts folded client-side, including a live "typing" preview. The architecture cell diagram now projects the live draft/stream (not only committed HEAD), so it builds up during design generation and renders before publish. - When a turn does hit the output-token limit, salvage the partial file and surface a non-fatal banner instead of silently discarding the content. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ervices Rebuild the task subsystem around GitHub issues + an executions-only DB, replacing the former board/projector/dispatch pipeline. Adds the execution feature, task planning tools (plan/plan_tap, taskmeta, task-plan-accumulator), and the tasks_github_native + executions migrations. Retires the standalone agents-legacy service and the aep-api observer, projects_v2, and legacy agents clients. Shrinks codingagent to the executor/exec_watcher path and reworks the console-legacy task UI, agent-stream task contracts, and adds the sse-cassette package. Updates deployments (agents-service -> agents) and related config. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Replace GitHub Git-Data REST access with a local git-plumbing engine over a
shared RWX volume, and replace the FE-owned draft model with server-side
committed-truth generation turns. Implements docs/design/shared-volume-clone-
architecture.md end to end.
Engine & infra (Phase 0):
- internal/platform/gitfs: bare-mirror plumbing engine (never checked out),
per-repo flock, per-op GIT_ASKPASS token minting (no credential at rest),
immutable per-SHA snapshots (tmp+rename), CAS Mutate/Tag/Diff, four-pass
reaper (trash/age-reap/orphans/quota-LRU).
- gitrepo.Workspace port as an alias surface over gitfs (arch-lock keeps the
engine feature-free); sentinels aliased so errors.Is identities hold.
- deployments: aep-workspaces volume (agents mounts it read-only), git in the
aep-api image, helm RWX PVC + fsGroup, workspace/reaper config knobs.
Reads/writes onto the mount (Phases 1-3):
- skills, files, artifacts moved to ReadBundle/List/ReadFile + Mutate/Tag;
flow skills seeded into the _skills mirror at provisioning.
- 409 Apply contract frozen; conflict_retry.go + RetryCAS + caches deleted.
Committed-truth generation (Phase 4):
- agent_turns table + one-active guard + heartbeat sweep; detached turn runner
(202 {turnId}) with an in-memory stream broker (resumable replay + tail),
agentfold Go fold gated by an integrity manifest (cassette goldens byte-equal
to the TS fold), D15 disjoint-rebase / overlap-fail.
- agents service reads immutable snapshots behind a structural ID/tenancy fence
and emits the terminal manifest; TurnRequest carries workspace refs, not files.
- console: draft store removed; 202 + attach/resume streams, viewer mode on 409,
edit guards, unapproved-requirements banner; save/discard on server truth.
Cleanup (Phase 5): REST Git-Data path deleted, spec regenerated code-first.
Fixes surfaced by e2e + review:
- pin the _skills on-disk leaf to org-skills via GitRepository.WorkspaceSlug
(owner-prefixed slug broke the agents snapshot-path derivation).
- project tc.Sub, not the embedded RegisteredClaims.Subject it shadows in JSON
decode, so turn commits attribute the prompting user (D20).
- JWT nbf backdate + jose clockTolerance (S2S clock-skew 401s); Apply CAS
exhaustion -> 409; detached-turn panic barrier; quota snapshot in-flight
guard; empty-instruction 400; and assorted robustness hardening.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…laybook Captures the accumulated design/ADR notes from the aep-rewrite line, including docs/design/dependency-management-migration.md — the executable playbook for integrating upstream PR wso2#85 (connections story). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…G + Thunder gate
Phase 1 of the dependency-management migration (docs/design/dependency-management-migration.md):
land ONLY the platform infra the connections-story feature needs, and prove the
existing project/design/tasks/build/deploy + auth flow stays green on 1.1.1 with
zero feature code — so any post-merge red is unambiguously feature code.
- env.sh: OPENCHOREO_VERSION 1.0.1-hotfix.1 -> 1.1.1 (Resource-model CRDs) + CNPG_VERSION.
- setup-prerequisites.sh: install CloudNativePG operator (platform-resource provisioner).
- setup-aep.sh: postgres-cnpg ClusterResourceType + data-plane RBAC + workload-publisher binding.
- setup-thunder-client.sh: lift/restore THUNDER_SKIP_SECURITY around client bootstrap (1.1.1 gates the admin API).
- single-cluster/postgres-cnpg-{resourcetype,rbac}.yaml: the platform-resource catalog sample.
- compose + helm aep-api: add AEP_API_INTERNAL_BASE_URL (kept our keyless-boot agents block;
did NOT inherit upstream's boot-time ANTHROPIC_API_KEY).
Robustness fix (setup-openchoreo.sh): a cold 1.1.1 control-plane install races the
controller-manager validating webhook (chart applies ClusterAuthzRoleBinding CRs before the
webhook pod has endpoints; helm leaves the release 'failed'). Treat only a 'deployed' release
as installed, and retry helm upgrade --install after the webhook has endpoints.
Validated on a full teardown->fresh setup->start->seed cycle (cold pull); the retry path
fired once then succeeded. All 7 compose services + OC 1.1.1 control/data/workflow planes +
CNPG + postgres-cnpg ClusterResourceType healthy.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…write-improve Phase 2 of the dependency-management migration (docs/design/dependency-management-migration.md). Integrates upstream PR wso2#85 ("connections story") by MERGE (second parent = 1076be7) so future `git merge upstream/aep-rewrite` sees the advanced common ancestor and stops re-surfacing these 323 files. This is the sole known-red checkpoint — brought green over Phases 3-4. Resolution (per §4 grounded posture): - keep-ours WHOLESALE: internal/feature/{task,execution,codingagent} + internal/contracts/taskmeta (our GitHub-native dispatch core), packages/contracts/api/v1/openapi.yaml (wso2#72 prompt/search/ nextCursor kept; ComponentTask.type-required NOT taken). Temporarily-keep-ours (grafted later): design/{design_service,design_huma}.go + artifacts/artifact_store.go (P5), console types.ts (P3/P7), component-design-schema.ts + SKILL.md (P3). - skip-delete (git rm): all upstream component_tasks-based files — codingagent/{resource_watcher, dispatch_service,dispatch_cascade_hook,+dbtests}, task/{board_service,handlers,task_diff,task_stream, planner_skill,+tests}, contracts/{dispatch,hooks,task_state}.go, models/{component_task,tasks}.go, testdata golden task JSON; services/agents-legacy/**; services/agents/src/agents/{architect,taskplanner, document-generation,dsl-render}/** (structured-output routes); the two task-coupled dependencies files (resources/{external_values,resources_service}) + resources_huma + endpoints/access_* (all rebuilt on our aep:provision funnel in P6). - take-theirs (net-new, clean): internal/feature/dependencies/** AGNOSTIC subset (MCP server/tools, endpoints/{catalog,naming}, resources provisioner cores), clients/openchoreo/{resource_client, external_resource_type}, models/{external_resource,access_request,design,component}, artifacts/ {design_json,spec_collect,commit_design_file}, platform/auth/agents_scoped, repositories/ {external_resource,access_request}_repository, docs/**, skills/**, apps/console/** (accept-theirs). - take-theirs-EDIT: phase9_dependency_mgmt.go (kept 2 CREATE TABLEs, stripped the ALTER component_tasks step — we have no such table), resources/ports.go (trimmed TaskStore/TaskCompleter/RedispatchFunc). Expected-red: our code still uses connections[] vocab (P3 migrates), the dependencies feature is not yet wired (P4), external_resource_repository's Consumers method still queries component_tasks (adapted to design-scan in P6). No structured-output agents, no agents-legacy, no component_tasks ALTER, no wso2#72 removals leaked in. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… merge resolution Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… vocabulary (TS)
Phase 3 of the dependency-management migration. Migrates the TS/contract vocabulary
to the unified kind-discriminated dependency model. OpenAPI regeneration is code-first
(make gen exports from Go Huma) so it lands in Phase 4 when Go compiles.
- packages/agent-stream/component-design-schema.ts: rewrite the Zod validator from
connections[] (http/datastore/connector) to dependencies[] (4 kinds: component/
org-service/external/platform-resource) + ConfigKey + candidates + the platform-owned
exposesAPI/callerIdentity/componentAgentInstructions. Drift-guard vs the (already
merged) ComponentDesign contract type now passes. gen regenerated component-design.schema.json.
- packages/agent-stream/index.ts: export Dependency/DependencyKind/ConfigKey/
DependencyCandidate/ExposesAPI/CallerIdentity (was ComponentConnection).
- services/agents/main/component-design.test.ts: import checkComponentDesign from
@aep/agent-stream (the centralized home) instead of a never-existent local module.
- services/agents/shared/mcp-client.{ts,test.ts}: remove — unused orphan importing the
deleted contracts/sse-events McpConfig; the main-agent MCP client is (re)introduced
properly in Phase 5 with the TurnRequest.mcp contract.
- console-legacy types.ts: DesignComponent dependsOn[]/dependentApis[] -> dependencies[];
add Dependency/DependencyKind/ConfigKey/DependencyCandidate/ExternalResource/AccessRequest
so the merged-in dep UI pages + clients typecheck. (Task-coupled gate fields + the vitest
suites stay for Phase 7.)
- skills/high-level-architecture/SKILL.md: take upstream's dependencies + "discover before
you invent" rewrite; sync the vendored aep-api copy (go generate re-vendors in Phase 4).
Also carries the Phase 2 take-theirs-EDITs that were applied but not re-staged before the
merge commit: phase9_dependency_mgmt.go (ALTER component_tasks stripped, 2 CREATE TABLEs kept)
and dependencies/resources/ports.go (TaskStore/TaskCompleter/RedispatchFunc trimmed).
Green: packages + @aep/agents + console-legacy SOURCE typecheck. Deferred: apps/console
(needs its wso2#77/wso2#80 backend APIs — convergence follow-up); console-legacy vitest tests (Phase 7);
Go build (Phase 4).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…del + MCP surface live Phase 4 of the dependency-management migration. Brings aep-api to green on the unified dependency model and wires the agnostic MCP discovery surface with real adapters. Provisioning (value/param collection + the aep:provision funnel) stays absent until Phase 6. Design codec reconciliation (artifacts): - artifact_store.go: drop the old connections→dependsOn/DependentAPI codec + the deleted static ExternalAPICatalog resolution; delegate to design_json.go's new dependencies codec (parseComponentDesignJSON) and retire the per-component design.md frontmatter path (design.json is now the sole authored component model, matching upstream's design.md removal). Add SplitDesign (the write-side inverse of AssembleDesign). - Defer the spec-pipeline commit path to Phase 5: git rm commit_design_file.go; trim StoreConsumedSpec from spec_collect.go (keep ValidateOpenAPI/FetchSpecFromURL/NormalizeOpenAPIYAML). - designspec validator: accept additionalProperties as bool OR subschema (the dependency `parameters` string-map); sync the go:embed'd component-design.schema.json to the regenerated (dependencies) source (byte-identity drift guard). Repositories: - external_resource_repository.Consumers: trim the dropped-component_tasks query to return empty (rebuilt as a design-artifact scan in Phase 6, §3.2 item 7). MCP discovery surface (Phase 4 crux): - surfaces.go: mount POST /internal/v1/mcp behind auth.AgentsScopedVerifier (aud aep-api-mcp, org from ocOrgId claim), conditional on the task-token manager. - app.go: wire real readers — ExternalResourceRepository (DB), endpoints.Catalog + resources.ResourceTypeCatalog (OC Resource-model client via openchoreo.NewResourceClient). Arch + tests: add the `dependencies → dependencies/resources` feature-edge allowlist row; migrate all design/component test seeds connections→dependencies + design.md→design.json; strip the ALTER component_tasks step's leftover (already done) and remove upstream tests coupled to deleted symbols (component_tasks Consumers, PlannerFS, config.RepoBasePath, Phase-5 resolver). Green: `go build ./...`, `go vet ./...`, `go test ./...` (dbtests skip w/o Docker), gofmt. Deferred: apps/console typecheck + the license-check `$param`-filename Makefile quirk (both apps/console-convergence follow-ups); real spec pipeline + provisioning (Phase 5/6). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e live) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
TS half of Phase 5 of the dependency-management migration: the file-mutation `main`
agent discovers the org's dependency catalog over MCP during generation, using an
endpoint + token handed to it in the turn request. (The Go/BFF half — read-resolution,
proceed-gate, spec pipeline, and minting the mcp{url,token} block — lands separately.)
- @aep/agent-stream: add `McpConfig {url,token}` + optional `TurnRequest.mcp`; export McpConfig.
- services/agents/src/shared/mcp-client.ts: re-add the MCP client (JSON-RPC 2.0 over POST,
bearer auth, tools/list → dynamicTool proxies to tools/call; a tools/call isError becomes a
tool-error result, never a thrown turn). Imports McpConfig from @aep/agent-stream.
- run-conversation-turn.ts: when TurnRequest.mcp is present, load MCP tools and merge under a
shadow-guard `{...mcpTools, ...baseTools}` so a built-in tool always wins a name clash;
absent mcp is a byte-identical no-op.
- server.ts: parse/validate the wire `mcp` field (isMcpConfig guard; 400 on malformed).
- Fix a Phase-3 straggler: agent-stream json-schema.test.ts asserted `connections`; now `dependencies`.
Green: @aep/agent-stream typecheck + test (43/43); @aep/agents typecheck + test (128/128).
Wire shape (matched by the Go half): `mcp: { url: string, token: string }`, optional.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…e + spec + MCP mint Go/BFF half of Phase 5, grafted onto our committed-truth architecture (SaveAndProceed = the v<N>-<M> tag-cut = approve). Pairs with the TS half (44a77c8) on the mcp:{url,token} wire shape. Read-time resolution (artifacts): - OrgServiceResolver consumer interface (IsNamespaceVisible/ExistsAnyVisibility) + resolveOrgServices: on every design read, org-service deps resolve 4-state (resolved / blocked+access-required / unresolved+not-found) against the live org endpoint catalog; external deps flagged needs-spec. FAIL-OPEN (nil/erroring resolver leaves deps as-authored). Wired at the composition root — the endpoints.Catalog satisfies the interface structurally (no new feature edge; arch-test untouched). Proceed-gate (design): - ErrUnresolvedDependency sentinel + firstUnresolvedDependency; SaveAndProceed returns it (→ 409 in design_huma.go) when a dep is org-service-unreachable OR external-needs-spec — ONLY those two; external-values + platform-resource are Phase-6 dispatch-gated. Never gates autosave. Spec pipeline: - StoreConsumedSpec validates+normalizes a fetched OpenAPI and returns the component-relative path; external-resource Upsert registration on save is fully wired (via ExternalResourceRepository). TODO(Phase 6): the single-file spec COMMIT + auto-fetch-on-save — committed-truth writes go via the Files API (no single-file commit surface yet); deferred deliberately, no gitOps path invented. BFF MCP mint (agentsvc/genai): - TurnRequest gains MCP *MCPBlock ({url,token}); the design-generate turn mints a BFF-signed token (aud aep-api-mcp, via TaskTokenManager) and sets url = <AEP_API_INTERNAL_BASE_URL>/internal/v1/mcp. config: AEPInternalBaseURL reads AEP_API_INTERNAL_BASE_URL. Best-effort (nil/mint-error → no block). Tests: resolve_org_services_test + proceed_gate_test (service + component-tier 409) + StoreConsumedSpec. Green: go build/vet/test (dbtests skip w/o Docker); gofmt clean. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d-aware gate Foundation for provisioning-as-issues (§3.6): the taskmeta vocabulary and the execution funnel's gate learn about aep:provision dependency gates. No provisioning behaviour yet — that lands in 6.2 (services + watcher). Green: build/vet/test. - taskmeta: ClassProvision (aep:provision) class + KindProvision execution kind; a succeeded provision run derives StatusDeployed (ops arm extended), so it satisfies the unchanged depsGate. Block gains GateKind (config-collection | resource-provisioning | org-publish) round-tripped through the codec. - execution funnel: projectView indexes aep:provision gate issues by dependency name; depsGate is dependency-kind-aware — a consumer coding task holds until each of its design external/platform-resource deps' provision issue derives deployed (org-service stays proceed-gated). DesignReader gains ProvisionDepNames. - OnExecuteIntent no-ops a stray aep:execute on a provision issue (drawer-driven). - Tests: derive/label/block round-trips + funnel provision-gate hold/release. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…params + readiness watcher)
Rebuilds the value/param-collection surface upstream expressed as component_tasks
+ a projector, re-based onto aep:provision GitHub issues + provision Executions +
the readiness watcher (dependency-management §3.6). Green: build/vet/test/arch.
New internal/feature/provisioning (arch row {dependencies/resources, gitrepo}):
- EnsureProvisionIssues: mint one aep:provision gate issue per distinct external /
platform-resource dep, deduped per project. Wired to design approval
(design_service.SetProvisionIssueMinter → SaveAndProceed), so gate issues exist
before planning gates any consumer.
- ValueService.SaveValues (external): split values plain/secret by the registered
schema, write secrets to SM-API + author the OC external Resource model, then
complete synchronously (readyWhen:${true}) — Finish the provision run, close the
gate with a no-secrets binding reference, Reevaluate.
- ResourceService.Provision (platform-resource): author the OC Resource+binding
(async) + admit a RUNNING provision Execution pinned to the development binding.
- ResourceWatcher: cloned from ExecWatcher, keyed on KindProvision + the binding's
Ready condition → Finish (→ deployed) + close gate + Reevaluate; 30m stale bound.
- StatusService: masked status (output NAMES only — no values/secretRefs).
- resources_huma: list/delete external-resources (409 in-use), collect-values (200),
provision (202), status. Wired via RegisterAllHuma; nil svc → 503.
app.go wires the provisioner cores + service + watcher; provision Execution rows
carry the gate issue's repo full name so the funnel gate resolves them. Tests cover
mint/dedup, external sync-complete + schema split (no secret leak), platform async,
watcher ready/stale, status masking, in-use delete.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
At coding dispatch the platform resolves the consumer component's dependency
targets and posts the "Platform-resolved dependencies" comment for the coding
agent to copy into workload.yaml — the platform NEVER patches the Workload CR.
Green: build/vet/test/arch.
- codingagent: new DependencyWiring port (primitives — no provisioning import) +
WithDependencyWiring + a best-effort call in runCoding.
- provisioning: WiringResolver re-expresses the upstream resolveConsumerDependencies
builder byte-for-byte — org-service (ResolveNamespaceVisible, visibility
namespace, address=<UPPER>_URL) + same-project component (ResolveProjectEndpoint,
visibility project) endpoints, external-resource outputs (env-var == output name
verbatim) + platform-resource outputs (envVarName = <UPPER(dep)>_<UPPER(out)>),
marshaled as `dependencies: {endpoints, resources}`. Empty resolution → no comment.
- app.go attaches the resolver to the coding executor.
- Tests: comment header + yaml shape + env-var naming byte-parity; empty → silent.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…umers scan + teardown
Completes the §3.6 model: cross-project org-service access + the completeness tail.
Green: build/vet/test/arch.
- Access requests (provisioning): RequestAccess validates the org-service dep on the
consumer design, resolves the provider (FindByComponent, any visibility), and mints
a provider-side aep:provision org-publish gate issue (deduped — a second consumer
rides it). ProviderTaskID re-keyed from the dropped component_tasks row to the
provider issue ("<project>#<number>"). GET access-requests lists a consumer's rows.
- Grant/reject cascade: OnComponentDeployed (wired to the exec watcher's build-success
via a new codingagent.DeployObserver port) grants every rider on the provider's
org-publish issue + closes it; RejectByProviderTask flips open riders. The
orgPublished durability marker commit needs the single-file committed-truth write
path and is tracked as a follow-up — the functional gate is Phase 5's proceed-gate
over the live catalog.
- Consumers via design scan (§3.2 item 7): ExternalResourceRepository.Consumers stayed
nil; the service now scans committed designs (ProjectLister + DesignReader) for the
in-use DELETE 409 guard + the list.
- Teardown: project delete deprovisions the project's OC Resource model (external +
platform) before the OC/repo delete — OC does not cascade the logically-owned
Resources (project_service.SetResourceDeprovisioner).
- NewService takes a Deps struct. Tests: request/dedup, grant-on-deploy, teardown,
design-scan in-use 409.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rovisioning routes `make -C services/aep-api openapi` export after Phase 6: the 7 provisioning operations register in Go Huma and now appear in the public contract (external-resources list/delete, collect-values, provision, dependency-status, access-request, access-requests). Also finalizes the connections→dependencies vocabulary in the spec (drops the retired DependentAPI/dependsOn schemas). wso2#72 list-projects search + nextCursor retained. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ence + follow-ups
…ing + remove dead code + fix stale docs Completeness/wiring audit (vs the PR workspace) + dead-code audit + golangci-lint (0 issues) after Phase 6. Green: build/vet/test/arch/lint. Finished the one real half-wired capability: - External-resource → coding-runner secret injection was built on both ends (resources.ResolveRunnerSecrets producer + codingagent dispatcher consumer) but never connected. Wired it: provisioning.Service.ResolveComponentRunnerSecrets (design external-dep names → per-env secretStorePath), codingagent.RunnerSecretResolver port + WithRunnerSecrets, populate Inputs.ExternalResourceSRs at proxy dispatch, composition-root adapter. Guarded/best-effort (nil → the prior empty-slice no-op). Removed dead code (audit-confirmed, golangci-lint can't flag exported): - resources.ExternalResourceRegistry port + its assertion (superseded by provisioning.ExternalResourceCatalog + the design-scan consumers). - repositories.ExternalResourceRepository.Consumers (zero callers; only satisfied the dead assertion — the ExternalResourceConsumer type stays, used by the scan). - provisioning.Service.RejectByProviderTask (orphan; the reject cascade is a tracked follow-up needing a decline signal — noted in place + §8). Fixed stale docs/comments: resources/doc.go (described the git-rm'd ValueService/ ResourceService/resources_huma), resources/ports.go trim note, dependencies/doc.go (MCP surface now in-package), app.go "unwired until Phase 6" line, and the spec-commit TODO(Phase 6) markers reworded to their tracked-follow-up label. Audit verdict: no silently-dropped upstream capability, nothing built-but-unwired. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…d, runner-secret wiring finished)
…_resources + access_requests tables) E2E-caught: RunPhase9DependencyMgmt was coded but never added to the migration steps slice, so external_resources + access_requests never got created and the provisioning list/access-request endpoints 500'd (relation does not exist). Adds the ctxStep (idempotent CREATE TABLEs, no component_tasks ALTER). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ion on the agent write path
E2E-caught Bug A: any FRESH design was broken platform-wide — the agent authored
the pre-Phase-3 connections[] schema, which the strict dependencies[] reader 500s
on (GET /design/bundle → 500 → Publish disabled). Phase 3 migrated the read side +
the TS zod gate but missed the WRITE path:
- agentfold/designgate.go: re-ported to dependencies[] (kind-discriminated) to
match the current packages/agent-stream component-design-schema.ts zod gate —
it had drifted, still validating connections[]/{to,type,onPlatform}. Deliberately
at-most-as-strict as the zod (which runs first), so a zod-passing write folds.
- agents main prompt.ts: design.json example uses dependencies[] (was connections).
- high-level-architecture SKILL.md: bump aep.version 1->2 so the version-gated
reconcile re-syncs the (already-migrated) dependencies[] skill into provisioned
org skills repos (a plain rebuild does NOT re-sync a same-version skill).
Golden-parity tests disabled (t.Skip, per instruction) pending fixture regen — the
recorded cassettes + TS-fold goldens + frontmatter fixture still encode connections[]:
TestFoldGoldens_EveryCassetteByteEqualsTSFold, TestFoldGoldens_ManifestVerify,
TestComponentDesignGate, TestFrontmatterAndGuard_MatchFileBundleFixture. Full suite
otherwise green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… golden-fixture-regen follow-up
…action updated for Phase 7
… gate captions
Finish the console-legacy half of the dependency-management merge. The net-new
dep UI (services/api/{accessRequests,externalResources,provisioning,specs}.ts,
pages/architecture/*, ExternalResourcesSettings) came in byte-parity at the
merge and has typechecked since Phase 3; App.tsx already registered the four
client token accessors + the external-resources route; buildProjectModel already
renders dependencies[] edges. This wires the remaining shared-file work:
- ProjectArchitecturePage: mount the (previously orphaned) DependenciesSection +
DependencyDrawer inside the Component Design view, plus the /architecture?dep=
deep-link and a refetch-re-derive effect so an open drawer tracks fresh
read-time resolution. The provisioning CTAs (provide external values / attach
spec / provision platform-resource / request org-service access) live here,
per §3.6 — the tasks board only links back to a blocking dep.
- Held-task gate captions are already driven off our GitHub-native derived read
model (TaskRow shows "Waiting for: <dependsOn>" for pending/on_hold) — no
component change needed. Rewrote TaskRow.test.tsx onto TaskView (derivedStatus
+ flat dependsOn); deleted the orphaned TaskDetailPanel.test.tsx (that
component was git-rm'd at the merge; its SYSTEM-task CTAs moved to the drawer,
which has its own panel tests).
- Test infra: install vitest 4 + testing-library + jsdom (matching upstream),
scope vitest's include to src/ so it doesn't collect the node:test SSE-cassette
suite under test/, and add --experimental-require-module (jsdom 29's
html-encoding-sniffer ESM require, no-op on Node >= 22.12). Component suite
47/47 green; console typecheck 0 errors.
- Cassette suite de-gated (moved out of `test` into an opt-in `test:cassettes`):
its fixtures/turns/*.json.gz recordings predate the design.json/dependencies[]
schema (golden-fixture-regen follow-up); the stale design-generate replay is
also individually skipped.
apps/console is accept-theirs (already byte-parity with the workspace).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…aptions, vitest green, cassettes de-gated Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… write path Bring PR wso2#85's collect-dependency-spec route the rest of the way in. The SSRF fetch / OpenAPI validate / normalize half was already ported (spec_collect.go); only the commit was stubbed, deferred on "no committed-truth single-file write surface" — which is now stale: files.FilesService.Apply (atomic apply → main, per-file baseSha CAS) exists. - design.CollectSpec: resolve the {component, dep} external target (unknown → 404, non-external → 400), fetch (SSRF-guarded) when specUrl is set, validate + normalize, then commit TWO files in one atomic apply — the normalized spec at specs/design/components/<c>/dependencies/<dep>.openapi.yaml AND the component's design.json with the dependency's specPath recorded (+ the transient specUrl hint dropped). Recording specPath is what clears the external-needs-spec proceed-gate on the next read. Read-time status/reason are never persisted — the design.json codec (SplitDesign → dependencyJSON) omits them (ADR-0003). - StoreConsumedSpec now returns the normalized blob (was discarded) so the design service can commit it; the validate/normalize logic stays in artifacts. - Arch boundary held: design imports only artifacts. The Files commit surface reaches design through a narrow designFileCommitter port, adapted at the composition root (internal/app/design_adapters.go) over files.FilesService — no files import in the design feature. - Route collect-dependency-spec (design_huma.go): POST .../components/{c}/ dependencies/{dep}/spec, {rawSpec|specUrl} → {specPath}; error mapping 404/400/502/409/500. Regenerated the code-first openapi.yaml (route + CollectSpecInput/OutputBody; wso2#72 fields retained). The console-legacy specs.ts ProvideSpec panel already targets this path. Tests: CollectSpec (bad source, unknown target, wrong kind, invalid spec, 2-file atomic commit records specPath, commit-conflict → 409, nil committer). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…route un-deferred (7e5b71c) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…rker, reject cascade) + build→deploy unblock Close the now-unblocked dependency-management follow-ups and the pre-existing build→deploy blocker. c1 — auto-fetch-on-save: SaveAndProceed now fetches any external dependency with a specUrl hint but no specPath yet, via CollectSpec (SSRF fetch → validate → atomic commit of spec + design.json specPath). Non-fatal per dep; a fetch that lands advances HEAD, so the design is re-read at HEAD for the gate + tag. c2 — orgPublished durability marker: design.MarkOrgPublished commits exposesAPI.orgPublished on a provider component (idempotent, reuses the committed-truth Files commit path). The provisioning grant cascade (GrantByProviderComponent) calls it through a narrow OrgPublishMarker port, wired at the composition root (breaks the design↔provisioning cycle with a setter). Persists the provider's publish decision across redeploys. d — reject cascade: an org-publish gate issue closed with its consumers still ungranted is a decline → those access requests flip to rejected (Service.OnIssueClosed). The webhook router now CHAINS handlers per (event, action) so provisioning subscribes to issues/closed alongside task's noop; the grant path flips riders to granted before it closes, so a platform-driven close finds them granted and this no-ops. RepoLocator gains ByFullName (repo→project). e — builtin-skill vocab: api-management + react-webapp SKILL.md migrated from the retired dependsOn / dependentApis field names to dependencies[] (kind component / external); aep.version bumped 1→2 so the reconcile re-syncs org copies. b — build→deploy leg: (1) coding_agent_logs migration — the legacy phase3 migration keyed the table to component_tasks (dropped in the GitHub-native cutover) and guarded on it, so it never created the table and the JobWatcher's final-log persist hit 42P01; the new migration creates it keyed to executions(id) after the executions + tasks_github_native steps. (2) runner image repinned v4→v5 (config + manifests) — the v4 image predated the path-scoped credentials/refresh route; v5 built from the current runners/remote-worker and pushed to docker.io/xlight05/aep-coding-agent-runner:v5. Tests: CollectSpec suite, router chain (multi-handler + error aggregation), OnIssueClosed reject/no-op. Build/vet/gofmt/arch green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…urce Replace the three inconsistent org-integration tag groups (/org/credentials/anthropic, /org/credentials/github[/pat|/connect/start], /org/idp[/rotate|/discovery]) with one singleton /config resource plus a small set of action routes, and drop the redundant /org prefix everywhere (/org/skills -> /skills). See docs/design/org-config-consolidation.md. Backend: - new internal/platform/humakit/patch: Field[T] omittable-nullable PATCH wrapper (absent/null/value tri-state) rendered as a nullable object schema Huma actually validates, with unit tests. - new internal/feature/orgconfig: GET/PATCH /config (llm/gitProvider/idp sections, kind-discriminated, write-only secrets) + connect-sessions / disconnect / idp client-secret / discovery action routes. The orchestrator runs an atomic probe-before-persist multi-section PATCH over the reused services and maps failures to section-pointed RFC-9457 problems (location: body.<section>). ~40 component tests over a real DB with faked Anthropic/GitHub probes. - additive probe-only seams on the reused services (AnthropicCredentialService. ValidateKey, CredentialService.ValidatePAT; Connect refactored to reuse them) and idp.IDPService.SetProfile (wholesale-replace, killing the empty=keep quirk). Legacy *_huma.go route halves + their component tests removed; UpdateProfile / structToMap dropped as dead. arch-lock allowlist + the registration test updated; spec regenerated (no /org/*, /config present). Frontend + scripts (console-legacy only): - the four org-settings service wrappers now read/write /config and /skills while preserving their public shapes, so the settings pages are unchanged (bar dropping ocOrgId); generated client regenerated. seed-dev.sh bootstrap collapses four legacy calls into one GET + one atomic PATCH /config. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…so2#87/wso2#89) into rewrite-improve Second upstream sync after the dependency-management merge. Mostly net-new (take-theirs); a handful of shared files resolved keep-ours + graft-their-additive. TAKE-THEIRS (net-new, clean): - services/collab — Yjs collaboration server skeleton for Tiptap collaborative markdown spec editing (PR wso2#86, phases 1-6) + apps/console/src/features/spec/collab/*. - playground-token: internal/feature/dependencies/playground_token.go + /internal/v1/mcp/playground-token surface (flag-gated on PLAYGROUND_TOKEN_ENABLED, off by default; docker-compose sets it) + services/agents/playground/mcp.ts (MCP discovery resolver) + config.PlaygroundTokenEnabled. RESOLVE-UNION (both added, keep both): - deployments/docker-compose.yml (AEP_WORKSPACE_ROOT + PLAYGROUND_TOKEN_ENABLED). - services/agents/.env.example (our agents config + the AEP_MCP_* discovery vars). - CONTEXT.md (our GitHub-native glossary + the new "Playground token" entry). - pnpm-lock.yaml (regenerated from the merged package.json set). KEEP-OURS + graft their additive bits: - surfaces.go — keep our /internal/v1/executions/ model; take the new MCP + playground-token doc rows; drop their stale /internal/v1/tasks/ row. - services/agents/AGENTS.md — keep our accurate per-turn-key/workspace model doc; drop their boot-time-ANTHROPIC_API_KEY line; graft the playground-MCP bullet. - services/agents/playground/playground.ts — keep our committed-truth workspace turn shape (workspaceRef/EvalWorkspace/evalTurnHeaders); add the mcpResolver + `mcp` on the turn body; SKIP their /tasks command (the structured task-planner we don't have) + its `model` field. SKIP (consciously not adopted): the structured task-planner glossary entry + the /tasks playground command (task-planner is the SKIP'd structured agent). Validation: aep-api go build/vet/tests green (incl. the new playground-token surface test); pnpm turbo typecheck 12/13 green (@aep/collab net-new, @aep/agents, @aep/agent-stream all green). @aep/console fails ONLY on pre-existing gaps (verify-2 CreateProjectRequest.prompt + the two-console convergence deferral) — not introduced by this merge. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…-improve Third upstream sync. PR wso2#91 (console/sso-91): Thunder login via oidc-client-ts + header org/project switchers, entirely in apps/console (accept-theirs, per our two-console posture) plus a net-new deployments/dev-thunder-setup/ and a values-thunder.yaml tweak for the console OAuth client. No aep-api/agents/packages changes — the only conflict was pnpm-lock.yaml (new oidc-client-ts deps), regenerated from the merged package.json set. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…t-memory Keep the upstream PR code-only: remove the docs/ planning/design set, the .agents/skills/migrate-ai-sdk-v6-to-v7 skill, and the accidentally-harvested services/aep-api/testdata/harvest/.claude/agent-memory fixtures. All were net-new additions on this fork line (absent in aep-rewrite), so they net-zero out of the PR diff; the harvest golden tests read only testdata/harvest/golden, not .claude. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Integrates PR #85's dependency-management ("connections story") onto our foundations — committed-truth generation + GitHub-native tasks — rather than the DB
component_tasksgraph it shipped on, plus the follow-on upstream syncs (collab #86, playground-token #87/#89, console SSO #91/#93) and an org-config API consolidation.A file-level parity audit (PR #85 vs this branch) was run — verdict: no dependency-management capability silently dropped; every relevant upstream file is TAKEN (byte-parity), ADAPTED (re-expressed on our substrate), or consciously SKIPPED, with all divergences logged.
What's in it
connections[]→dependencies[]everywhere (four kinds: component / org-service / external / platform-resource), read-time 4-state resolution (never persisted, ADR-0003), and the whole net-newinternal/feature/dependencies/feature — MCP discovery server + 4 tools, the OC Resource-model client, external-resource registry, SSRF-guarded spec collection.Provisioning re-expressed on our substrate (the crux). Upstream's SYSTEM
component_tasksrows + projector + gate columns →aep:provisionGitHub issues + aprovisionExecution kind + a dependency-kind-aware funneldepsGate. AResourceWatcherfinishes platform-resource provisions on OC binding readiness; grant/reject cascades ride our webhook/deploy signals; ADR-0004 declarative wiring is posted at dispatch. No DB gate state, no stubs.Also here:
collect-dependency-specon the committed-truth Files-API write path (atomic spec +design.jsonspecPath commit) + auto-fetch-on-save; the org-published durability marker + reject cascade.coding_agent_logsmigration re-keyed toexecutions(id)(the legacy one guarded on the droppedcomponent_tasks); coding runner image repinned to v5./org/credentials/*+/org/idp*mini-APIs → one/configsingleton (GET/PATCH+ action routes) with apatch.Field[T]omittable-nullable idiom;/org/skills→/skills; legacy/org/*retired.Validation
build/vet/ tests green (incl. provisioning, gate, collect-spec, reject-cascade, playground-token surface).turbo typecheck12/13 packages green (@aep/collab,@aep/agents,@aep/agent-stream, allpackages/*).@aep/console(apps/console) fails only on pre-existing gaps — the missingCreateProjectRequest.promptfield and the spec-view/board fields it's built ahead of — tracked as the two-console convergence deferral, not introduced here.Known follow-ups (tracked, none a lost capability)
Golden-fixture regen (stale
connections[]cassettes/goldens aret.Skip'd), the skill version-bump vendoring durability,CreateProjectRequest.promptre-add, dead SKIP-leftover inservices/agentsplayground, andapps/consoleconvergence. Full-stack fresh-cluster e2e sign-off is still owed (blocked this session on a transientraw.githubusercontent.comrate-limit during OC install, not code).(Internal design docs / planning notes are intentionally kept out of this PR.)
🤖 Generated with Claude Code