Skip to content

factory: close the open programmatic doors; programmatic work comes through AgentField - #2489

Merged
santoshkumarradha merged 4 commits into
factory/general-intakefrom
factory/gi-close-doors
Nov 7, 2026
Merged

santoshkumarradha merged 4 commits into
factory/general-intakefrom
factory/gi-close-doors

Conversation

@santoshkumarradha

Copy link
Copy Markdown
Member

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/) and trigger-webhooks.json (internal/factory/trigger/{webhooks,outbox,sink}.go). Nothing creates those files now; old ones on disk are left alone.
  • codeaf factory webhook … and codeaf factory add. Typing either now prints where the work goes instead of falling through to serve.
  • The manual page "The factory's Trigger API". Its questions now reach 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 its Sink interface, the Jira replier and the AgentField sink.
  • trigger.Message, trigger.Status and trigger.StatusOfJob as Go functions, called by AgentField's reasoners.
  • The desk wire factory.intake_add and its factory.intake hello feature. It no longer goes over HTTP. It used to POST to /api/intake. It now calls inbox.Add in 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 with not_found.

E2E scenarios 3 and 4

codeaf factory add could 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, and internal/e2e/factory_general_e2e_test.go scenarios 3 (priority) and 4 (dedup) now file through factory.intake_add. Dedup sends the same (source, id) three times and expects created:true,false,false and the last title.

Proof

  • go build ./..., go vet -tags e2e ./internal/e2e/
  • go test -count=1 on internal/factory/{trigger,serve,inbox,agentfield,api,run} and internal/appwire: ok
  • go 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.
  • New TestTheDesksIntakeFilesOnThisMachinesFactoryWithoutHTTP, which checks:
    • filing and dedup
    • the refusal for another factory
    • the refusal for a repo that is off
    • every removed path, POSTed with the access token, is refused and files nothing
  • New TestTheRemovedFactoryCommandsSayWhereWorkGoes
  • make test-laws, go test ./internal/manual/: ok
  • grep -rn 'api/intake\|webhooks' internal/factory/serve/*.go | grep -v _test finds nothing.

🤖 Generated with Claude Code

…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.
@santoshkumarradha
santoshkumarradha merged commit e79c759 into factory/general-intake Nov 7, 2026
1 check passed
@santoshkumarradha
santoshkumarradha deleted the factory/gi-close-doors branch November 7, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant