LearnNewsExamplesServices
Frontmatter
id17699
titleDisposition every AgentOS-touching workflow before the cut
stateClosed
labels
enhancementaitestingarchitecturebuildagent-os
assigneesneo-gpt-emmy
createdAtAug 24, 2026, 1:10 PM
updatedAtAug 24, 2026, 5:40 PM
githubUrlhttps://github.com/neomjs/neo/issues/17699
authorneo-gpt-emmy
commentsCount0
parentIssue17500
subIssues[]
subIssuesCompleted0
subIssuesTotal0
contentTrust
projected
quarantined0
signals[]
blockedBy[]
blocking[]
closedAtAug 24, 2026, 5:40 PM

Disposition every AgentOS-touching workflow before the cut

Closed Backlog/active-chunk-19 enhancementaitestingarchitecturebuildagent-os
neo-gpt-emmy
neo-gpt-emmy commented on Aug 24, 2026, 1:10 PM

Context

Sub of Epic #17500, implementing the independent Epic Review's leaf 7: every GitHub workflow that reaches AgentOS-owned tooling must have one repository-cut disposition before relocation.

The live census was reproduced at origin/dev@31d58e01e4 through the production collector, not by title/path intuition:

  • 20 workflow files contain 72 exact AgentOS artifact occurrences;
  • discoverWorkflowReferences() in ai/scripts/diagnostics/agentOsExtractionInventory.mjs:351-373 owns occurrence identity;
  • collectWorkflowReferences() at :721-752 joins each occurrence to its existing plane/custody row;
  • agentOsExtractionInventory.json already classifies those 69 occurrences as Edge or Cloud;
  • the missing authority is the workflow FILE's cut action.

The Epic Review requires exactly three file-level outcomes: move, pin-fetch, or retire. A fourth outcome, “copy,” is explicitly rejected because it creates two workflow owners.

The Problem

Current inventory green proves where each referenced script executes today. It does not decide what happens to the workflow file when that script leaves neomjs/neo.

The existing workflow-reference registry rows deliberately say that a later step will “move or pin-fetch” the owner. That ambiguity is correct for the blocking inventory proof and insufficient for the cut:

  • one workflow may carry multiple occurrences and artifact types;
  • occurrence custody (edge / cloud) is not a repository-cut action;
  • a newly added AgentOS-touching workflow can receive plane authority while still having no cut disposition;
  • a stale file-level plan can survive after the workflow or its last AgentOS occurrence disappears;
  • “copy” can look operationally convenient while silently creating parallel CI authorities.

Without one exact file-level authority population, relocation can leave a workflow broken in Engine, duplicated across repositories, or running moved code from an unpinned branch.

The Architectural Reality

The population and guard already have one owning substrate:

  • ai/scripts/diagnostics/agentOsExtractionInventory.mjs derives workflows from tracked .github/workflows/*.yml and composes them into the SHA-bound zero-residue report;
  • ai/scripts/diagnostics/agentOsExtractionInventory.json is the explicit migration authority registry;
  • test/playwright/unit/ai/scripts/diagnostics/agentOsExtractionInventory.spec.mjs already tests workflow occurrence discovery, exact counts, residue, and schema version.

This leaf extends those siblings. It does not add a second registry, create a new .mjs file, or change any workflow YAML.

Structure evidence:

  • mandatory full npm run --silent ai:structure-map -- --files --loc was attempted and failed on this seat with Cannot create a string longer than 0x1fffffe8 characters;
  • scoped --root ai/scripts/diagnostics --files --loc succeeded and confirms the existing inventory script + JSON as the owning diagnostic siblings;
  • the existing focused unit spec is the matching test sibling.

The Fix

Extend the existing extraction inventory with an explicit workflow-file disposition population derived from the current workflow-reference rows.

Each derived workflow file must match exactly one registry authority row:

  • move — the workflow moves to neomjs/neo-agent-brain;
  • pin-fetch — the workflow stays in Engine and, when the cut executes, fetches AgentOS from an explicitly named immutable pin authority;
  • retire — the workflow is removed at the cut because its guarded contract no longer belongs or has a named successor.

Each row carries source + rationale. pin-fetch rows additionally name the future immutable pin authority; move rows name the target repository; retire rows name the retirement/successor evidence.

The reconciler must fail on missing, duplicate, stale-extra, malformed, or unknown actions. The action vocabulary is independent of Edge/Cloud custody: no code path may derive a file action automatically from one occurrence's plane.

Expose the reconciled rows and counts in the JSON report and human CLI receipt, then bump the inventory schema version.

Contract Ledger

Target Surface Source of Authority Proposed Behavior Fallback / Edge Case Docs Evidence
New workflow-file authority rows in agentOsExtractionInventory.json Epic #17500 leaf-7 map + ADR 0040 §§2.4, 2.8 Every derived AgentOS-touching workflow file has exactly one move, pin-fetch, or retire row with action-specific authority metadata. Missing, duplicate, stale-extra, copy, or unknown action makes the inventory red. Mixed Edge/Cloud occurrences never choose an action implicitly. Registry row source/rationale fields + script JSDoc define the vocabulary once. Current 20-file population reconciles at zero residue; hostile registry mutations red.
buildInventory().workflowFiles JSON projection collectWorkflowReferences() derived population + explicit registry Report total, per-action counts, and sorted exact rows under the SHA-bound receipt. No vacuous green: zero occurrences and registry rows disagree; stale authority stays visible. Return-shape JSDoc + schema-version bump. Unit assertions for count, order, residue, and action metadata.
formatInventory() workflow-file receipt JSON projection above Human output names the file population and action counts before residue/errors. Invalid authority still ends FAILED; prose cannot override the machine verdict. Existing CLI examples remain authoritative. Focused CLI/unit snapshot assertions.

Existing-Enforcement Sufficiency Audit

Existing enforcement is insufficient, measured rather than inferred:

  1. the current collector finds all 20 files / 72 occurrences;
  2. the registry gives all 69 occurrence rows plane custody;
  3. buildInventory() can return green while no workflow file has a cut action;
  4. no other current script or workflow contains the move | pin-fetch | retire file-level vocabulary.

The narrow extension earns its guard because the existing zero-residue instrument owns the population but cannot express or enforce the cut decision.

Acceptance Criteria

  • The workflow-file population is derived from current workflow-reference rows; no second hand-maintained file list exists.
  • Every derived file matches exactly one explicit registry row and current source reconciles 20 files / 72 occurrences at the recorded SHA.
  • The only accepted file actions are move, pin-fetch, and retire; copy and unknown values are unrepresentable and fail loud.
  • Action-specific metadata is enforced: target repository for move, immutable pin authority for pin-fetch, retirement/successor evidence for retire.
  • Missing, duplicate, stale-extra, malformed, and mixed-custody-auto-derivation mutations each turn the focused guard red.
  • Existing per-occurrence Edge/Cloud authority remains unchanged and zero-residue; the new layer composes with it rather than replacing it.
  • JSON + human receipts expose sorted file rows, totals, per-action counts, and the bumped schema version.
  • No .github/workflows/*.yml file changes in this PR; executing move/fetch/retirement stays with the cut leaves.

Out of Scope

Executing any workflow move, cross-repository checkout, or retirement · choosing the cut SHA/tag · repository manifests · workflow redesign · tracker transfer · seat re-provisioning · Engine deletion · any ai/** relocation.

Avoided Traps

  • Copying workflows to both repositories: rejected by the Epic; it creates parallel owners.
  • Reusing edge / cloud as file actions: rejected because execution plane and repository disposition answer different questions.
  • One registry row per occurrence only: already exists and cannot answer what happens to the containing file.
  • A second standalone ledger: rejected; the extraction inventory already owns discovery, explicit authority, residue, SHA binding, and receipts.
  • Hard-coding 20 as the population: 20/72 is current evidence. Discovery remains source-derived and a 21st file must fail until dispositioned.
  • Changing workflow YAML in the classification PR: rejected to keep the authority leaf reviewable and reversible before the cut.

Decision Record impact

depends-on ADR 0040; aligned-with ADR 0039.

ADR successor-risk: adr-aligned — this artifact postdates merged ADR 0040 and implements its §§2.4/2.8 membership + cutover obligations; ADR 0039's two-instrument proof semantics remain unchanged. No later ADR or live correction supersedes this per-file action requirement.

Decision Record

Not needed — ADR 0040 is the accepted authority recorded for the graduated topology.

Related

Parent: #17500
Prerequisites delivered: #17525, #17533
Repository scaffold: #17640
Source Discussion: https://github.com/orgs/neomjs/discussions/17489

Live duplicate gate: latest 20 created-open issues + last 30 A2A messages across all read states checked immediately before creation at 2026-08-24T11:08Z; no equivalent ticket or earlier claim. Semantic Memory Core/Knowledge Base framings were clear misses; live Epic/source decide.

Origin Session ID: 0dc1379e-5329-4fba-80ca-f6466822f7c9

Retrieval Hint: query_raw_memories("AgentOS extraction workflow dispositions move pin-fetch retire")
Retrieval Hint: agentOsExtractionInventory workflow-file authority 19 files 69 occurrences

— Emmy (GPT-5.6 Sol Ultra, Codex)

tobiu referenced in commit 84e6247 - "feat(agentos): disposition extraction workflows (#17699) (#17700) on Aug 24, 2026, 5:40 PM
tobiu closed this issue on Aug 24, 2026, 5:40 PM