Skip to content

factory: seed auto-merge targets from deployment config - #227

Merged
LittleChimera merged 2 commits into
stagingfrom
factory/ui-automerge-seed
Nov 6, 2026
Merged

LittleChimera merged 2 commits into
stagingfrom
factory/ui-automerge-seed

Conversation

@LittleChimera

Copy link
Copy Markdown

Why

The owner wants the factory to auto-merge without clicking anything. auto_merge in OMNIGENT_FACTORY_DELIVERY_SEED only reaches a factory at its first delivery seed, so an already-seeded factory never gets targets from the deployment.

What

  • New OMNIGENT_FACTORY_AUTO_MERGE_SEED, JSON keyed by repo: {"<owner/repo>": [{"base": "<branch>", "repo"?: "<owner/repo>"}]} (each target's repo defaults to the key).
  • Same pattern as the autonomy seed (factory: no double approvals, an owner-set autonomy level, stale proposals close themselves #204): a new factory on that repo gets the targets in v1; an existing one gets them once at boot as a recorded definition version (created_by: server, created_via: seed), only when its default repo or a person-given project repo matches and no version ever set product.delivery.auto_merge. The root's omnigent.factory.auto_merge_seed label (v<n> / set) keeps it one-shot.
  • A factory whose owners set targets, or set and cleared them, is never touched.
  • Every target must name its base (missing base invalidates the whole value, logged, nothing seeded), so main/master is a target only when named. Empty list seeds nothing.
  • Live PLs get the CHARTER UPDATE for the new merge-policy line (as the environment seed does).
  • Agents still cannot set targets (unchanged AGENT_NEVER path).
  • Docs: docs/FACTORY.md (auto-merge section + env table).

Tests

tests/server/factory/test_auto_merge.py: parsing (base required, empty list, wrong shape), v1 seed, applied once as server + idempotent (also against a changed seed), skipped when set, skipped when cleared, other repo skipped, no implicit main, boot pass announces to the PL. Full tests/server/factory: 4668 passed, 1 unrelated load flake (test_source_pause_undo, passes alone).

🤖 Generated with Claude Code

OMNIGENT_FACTORY_AUTO_MERGE_SEED={"<owner/repo>": [{"base": "<branch>"}]}
gives a factory on that repo its product.delivery.auto_merge targets: in v1,
or once at boot as a seed version (by server, created_via seed) while no
version ever set targets. A factory whose owners set or cleared them is never
touched; each target names its base, so main is never added implicitly. Live
PLs get the CHARTER UPDATE for the new merge policy line.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the size/L Pull request size: L label Nov 6, 2026
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LittleChimera
LittleChimera merged commit d7b4ba4 into staging Nov 6, 2026
51 of 63 checks passed
@LittleChimera
LittleChimera deleted the factory/ui-automerge-seed branch November 6, 2026 09:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Pull request size: L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant