Repository navigation
factory: close the open programmatic doors; programmatic work comes through AgentField - #2489
Merged
Merged
Conversation
…hrough AgentField Remove POST /api/intake and its messages and status routes, /v1/webhooks, the signed-webhook sink and its outbox, and the codeaf factory add and codeaf factory webhook commands. The desk's factory.intake_add now files through inbox.Add in the app's own process, on the factory it hosts. trigger.Message and trigger.Status stay for AgentField's reasoners.
# Conflicts: # internal/manual/chat_test.go
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.
The owner's line ("The line between WorkAF and AgentField" in
docs/design/factory-general/DESIGN.md): a WorkAF user never thinks about code. Built-in connectors (GitHub, Jira) are set up in the app with clicks; anything programmatic enters through AgentField. This PR closes the factory's open programmatic doors.Removed
POST /api/intake,GET /api/intake/{source}/{id},POST /api/intake/{source}/{id}/messages(internal/factory/serve/intake.go)/v1/webhooks(GET/POST/DELETE), the signed-webhook sink, its durable outbox (trigger-outbox/) andtrigger-webhooks.json(internal/factory/trigger/{webhooks,outbox,sink}.go). Nothing creates those files now; old ones on disk are left alone.codeaf factory webhook …andcodeaf factory add. Typing either now prints where the work goes instead of falling through toserve.factory-agentfield, which answers "no, through AgentField".factory.md's "send work … from a script or a webhook" section now says the same thing.Kept
inbox.Add, the event bus with itsSinkinterface, the Jira replier and the AgentField sink.trigger.Message,trigger.Statusandtrigger.StatusOfJobas Go functions, called by AgentField's reasoners.factory.intake_addand itsfactory.intakehello feature. It no longer goes over HTTP. It used to POST to/api/intake. It now callsinbox.Addin the app's own process on the factory it hosts (localHostOf), using the host's recipe and checking whether the repo is off. A factory on another machine is refused withnot_found.E2E scenarios 3 and 4
codeaf factory addcould only reach a factory by POSTing to/api/intake. A local-only version would have to write the store from a second process, which skips the host's recipe and its sinks. So the command is removed, andinternal/e2e/factory_general_e2e_test.goscenarios 3 (priority) and 4 (dedup) now file throughfactory.intake_add. Dedup sends the same (source, id) three times and expectscreated:true,false,falseand the last title.Proof
go build ./...,go vet -tags e2e ./internal/e2e/go test -count=1oninternal/factory/{trigger,serve,inbox,agentfield,api,run}andinternal/appwire: okgo test -count=1 -run 'Factory|Intake|Trigger|Webhook' ./cmd/codeaf/: one failure,TestFactoryCommandStepRetryAfterOutOfAttempts. It passes when run alone and has nothing to do with intake.TestTheDesksIntakeFilesOnThisMachinesFactoryWithoutHTTP, which checks:TestTheRemovedFactoryCommandsSayWhereWorkGoesmake test-laws,go test ./internal/manual/: okgrep -rn 'api/intake\|webhooks' internal/factory/serve/*.go | grep -v _testfinds nothing.🤖 Generated with Claude Code