08ebc19c8c7bb33765c4e5ffbccc8ac49130c60e
5
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
e3748895a7 |
feat(workflow): register gate.diff-rules as the .archie/gate.go replacement
steps.go's StageYaegiGate tells the operator to migrate the deleted
.archie/gate.go hook to a registered YAML workflow step, and
BuiltinStepRegistry() exposed only the six shipped workflows' own stages,
so there was nothing to migrate to. What that hook did, from
|
||
|
|
1b4289ed0c |
fix(archied): register the step vocabulary only where a root resolves it
Review pass on the step-vocabulary shape. The gateway root shared openStateStoreAdapter with the daemon, so it registered a step vocabulary and built a workflow-definitions client it never read: the same dead vocabulary the previous commit removed from internal/app/archiemessaging, reintroduced through the shared adapter, and able to fail the gateway's boot the day a provider set can fail to load. The vocabulary and the client now belong to the daemon root alone (openDaemonWorkflowDefinitions, called by Run before buildDaemon captures it), which is what Client's "a process that never reads or writes a workflow definition needs no provider set and cannot be failed by one" already claimed. The root guard was weaker than its own comment: it asserted that a root calls stepVocabulary(), not that the manager returned is the one handed to NewServer/NewWorkflowDefinitionsClient, so a root could call it and inject an empty manager and keep every test green. The pin now asserts the data flow (both halves mutation-checked), plus Run's ordering -- after openStateStoreAdapter, before buildDaemon. Three root guards asserted exact equality with workflow.BuiltinStepRegistry(), which contradicted the extension path they guard: adding a provider to workflowsteps.Providers() -- the documented way a step type arrives -- failed all three, and the expectation could not be satisfied by editing it. They now assert what their doc says (every shipped stage present) plus provenance (every name resolved is declared by the shared provider set), and the workflowsteps guard derives its expectation from Providers() so both sides move together. New guard on the defect class the bead exists for: TestNoProductionSiteReaches- ForTheBuiltinStepRegistry scans the module and fails if any non-test file outside the domain declaration and the shipped provider names BuiltinStepRegistry, which the agreement test cannot see for a sixth resolution site added later. Claim-vs-code corrections: openStateStoreAdapter "reads and replaces" -> the daemon only reads, and ReplaceWorkflowDefinitions has no production caller yet; workflowsteps' package/Providers docs no longer claim every Archie binary registers the set (archie-gateway, archie-messaging, archie-playbooks and archie-ui do not); the shipped-provider test no longer says production does not call BuiltinStepRegistry, which is false -- production calls it only there. |
||
|
|
c0ec3f6b8e |
fix(workflow): pin the roots, drop the dead vocabulary, guard the nil manager
Third review pass on the step-vocabulary shape, one fix per finding. P1, roots unpinned. The agreement test built its own manager and injected it, so it pinned the resolution sites and not the roots that decide the provider set; a root regressed to workflow.NewManager() (no shipped stages) left go test green. archied now resolves through one unit, stepVocabulary (step_vocabulary.go), and agentworker's productionWorkerDependencies is exercised directly: internal/app/agentworker/step_vocabulary_test.go and internal/app/archied/step_vocabulary_test.go assert each root's manager resolves the shared provider set's shipped stages and accepts a provider registered through it. RunStateStore and openStateStoreAdapter own a SQLite file and a gRPC dial, so their calls are pinned by source position, the way composition_order_test.go pins the memory-engine ordering. P2-B, dead vocabulary. archie-messaging registered a step vocabulary it never resolved (its only control-plane call is RuntimeChatConfig) and could fail startup on it before the State Store target guard. The workflow-definitions surface is now its own type, controlplane.WorkflowDefinitionsClient, so the vocabulary is a constructor dependency of the one surface that resolves step types and of nothing else. The messaging root no longer imports workflowsteps. P2-C, nil manager. A nil *workflow.Manager dereferenced on every resolution path. stepRegistry and CompilePinnedWorkflow now refuse with an error naming the wiring mistake; TestNilStepVocabularyFailsClosedAtEveryResolutionSite pins the refusal. Claim-vs-code corrections: agreement is stated as within one build (vocabulary.go, stepRegistry, openStateStoreControlPlane, openStateStoreAdapter); the Yaegi claim now says no bridge to StepFactory has been built and cites internal/secret/secretextract; the provider set names its three roots; Manager.Register's ordering is documented as a constraint with its consequence, and the shape rule no longer claims to reserve shipped stage names; the shipped-stage test compares against the builtin factory's own stage. |
||
|
|
ab204fe586 |
test(workflowsteps): pin that the provider forwards the shipped factories
Self-review of the fwmp shape: the provider enumerates BuiltinStepRegistry and forwards each factory, so no shipped behaviour changed -- but the one guard the refactor moved off the production path lost its coverage. "A shipped stage accepts no settings" was asserted only in internal/domain/workflow/definition_test.go through BuiltinStepRegistry, which production no longer calls; TestShippedVocabularyCoversEveryShippedStage compares names only, so a provider that rebuilt the factories instead of forwarding them would keep every name, lose the guard, and stay green. The new test drives every shipped definition through the registered vocabulary and asserts each step compiles to the shipped stage (not a rebuild named after the step type) and that settings are still refused. |
||
|
|
56f7295a3c |
feat(workflow): own the step vocabulary in a family manager registered at each composition root
archie-core-fwmp. Every call site hardcoded workflow.BuiltinStepRegistry(), so the step vocabulary a workflow definition may name was closed to the six shipped workflows and archie-agent could compile only what the control plane happened to validate against the same literal. internal/domain/workflow.Manager is the family owner (ARCHITECTURE.md#plugin- engine-rule-strict invariant 2): a constructed, injected value with no package-level registry and no init()-time registration. Register validates at the producer and atomically -- nil or unnamed provider, malformed provider or step-type identifier, a step type with no factory, a duplicate claim, a provider declaring one type twice, and a contribution shadowing a shipped stage are each refused, and a refused contribution applies nothing. Registry() hands back a copy, so the closed set is a property of the manager rather than a convention. internal/infrastructure/workflowsteps is the one package both composition roots import: it holds the compiled-in provider set and builds the manager. archied registers it in RunStateStore (the validating side) and in openStateStoreAdapter (the daemon's client), archie-agent in productionWorkerDependencies (the executing side), and archie-messaging at its own root, each before the first resolution. The five hardcoded sites now resolve the injected manager instead: the State Store's workflow-definitions validate closure and encodeWorkflowDefinitions, the control-plane client's read and write paths, and CompilePinnedWorkflow's shipped -definition and pinned compiles (one resolution per package). step_vocabulary_agreement_test.go registers a provider through the production Manager and drives all three sides with it; breaking any one of the six resolution points back to the builtin registry fails that side's assertion. |