Skip to content

test(company-os): an end-to-end workflow test (company, hire, goals, tasks, heartbeat, budget stop, pause, approval, audit) in CI and on a live install #19253

Open
8 of 17 issues completed

Description

@mrveiss

Phase M2.10 of milestone M2. This is the milestone's exit proof.

Problem

No test or script exercises the Company OS workflow end to end. Each defect in M2.1-M2.9 was found by reading code, and nothing proves that the chain works once they are fixed.

Scope

One scripted scenario against a clean install, through the public API (and the UI where a step is UI-only):

  1. create a company;
  2. hire a CEO and two agents, heartbeat-enabled;
  3. set a goal, and create a project and work items;
  4. assign a task;
  5. wait for a heartbeat run that picks the task up;
  6. exhaust one agent's budget and check it is no longer dispatched;
  7. pause and resume an agent;
  8. file a hire approval: the hire happens only after approval;
  9. check that the activity log holds every step with actor_type.

Acceptance criteria

  • The scenario is a repo test, run in CI against a containerised stack, with LLM calls stubbed at the adapter.
  • The same scenario run on a live install, with its output pasted as host evidence. That run closes M2.
  • Each step that fails names the M2.x issue it maps to.

Generated by Claude Code

Activity

  1. added
    phase:M2.10Portability, API docs, plugins and end-to-end proof
    on Oct 23, 2026
  2. github-actions commented on Oct 31, 2026

    @github-actions
    Contributor

    Landed via the merge train (#20212, merge 7432d387d1) via #20158

  3. mrveiss commented on Oct 31, 2026

    @mrveiss
    OwnerAuthor

    Repo half landed via #20158, train #20212, main 7432d38. The workflow's CI runs on the train passed: run 41206893646, against real Postgres and Redis service containers. Still expected to xfail at that point: step 6 budget (#19958, #19240), step 8b hire approval (#8214, PR #20179), step 9 most activity records (#20101). The live-install run stays open, and it needs the install's CLI login restored (#20202).

  4. mrveiss commented on Oct 31, 2026

    @mrveiss
    OwnerAuthor

    Landed via the merge train (PR #20212), main 7432d38 (from #20158).
    Ticked: the repo test in CI (.github/workflows/company-os-workflow-e2e.yml with Postgres and Redis service containers, stub adapter in tests/company_os_e2e/_stub_adapter.py) and the per-step issue mapping (_scenario.py, step to M2.x).
    Latest run on the train (head 07a8695): passed, 13 passed, 4 xfailed, 0 failed. xfails: step 6 budget stop and step 7b paused dispatch (gate in #19958, issue #19240); step 8 hire only after approval (#8214); step 9 activity log, 14 of 16 expected records absent (#20101).
    Left open: the live-install run with host evidence, which closes M2.

  5. 2 remaining items

  6. mrveiss commented on Nov 1, 2026

    @mrveiss
    OwnerAuthor

    M2 plan to the exit, 2026-11-01. Record of the plan is this issue, since the end-to-end run is the exit. Open: 174 issues, 15 PRs. Closed: 103.

    Done on main, measured from code (47 issues read against origin/main, no tests run; the other 127 not measured): #13999, #19240, #19461, #19950, #19951 delivered, the last four with a host criterion left. #14189 and #20247 need host evidence only. Partial: #8214, #16817, #19253, #19936, #20117. Not delivered despite earlier fixes: #18659 (_execute_agent still a stub), #20149, #20150 (only the model half landed), #14772, #14834, #14835.

    Batches, largest blocker first

    # Batch Issues Parallel?
    0 Gate 3 and identity #20247, #20466, #20476, #20521 now
    1 Land what is open PRs #20496, #20478, #20499, #20452, #20222, #20481, #20383, #20426, #20429, #20431, #20436 two CI slots
    2 A run actually works #20149, #20150, #18659, #20507, #20202, #20467, #20129, #19600 with #19601 after 1
    3 Auth and people #20443 decision 14, #20446 build, #20497 with 2, different files
    4 Audit and supervision #20101, #20417 (fold #20108), #14772, #16817, #19631, #20208 after 2
    5 Exit proof #19253, #14189, #14834, #14835, #19251, #12702, #16904, #15763, #15907 after 2
    6 Work hierarchy UI, Workflow Planner, engine #18979-#18982, #19934-#19938, #16762, #16763, #19806, #19807 with M3
    7 Knowledge buckets #19512-#19519, #19579, #19646 independent
    8 Adapters and external agents #13098, #16269, #19787, #15795, #17092, #17098 independent
    9 Rename #19976 and children last, queue empty

    Today's rulings carried in: #8214 four-eyes in one shared file, company-wide budget-raise approval (PR #20496). #20266 subscription runs never fail over dollars (PR #20222). #20443 revocation markers move to a database table, in the deactivating transaction (next on PR #20499). #20446 removal is an admin act, temporary cover agent, transfer record. #18978 every work item has a project, backfill is a proposal (PR #20478). #20497 the CEO agent is named Dispatcher. #17092, #17098 moved here. #20508 a person moves their own tasks freely.

    Proposed to close or move, owner decides: close #19598 (landed through #19847). Move out as not needed for the exit: #19464, #19790, #20144, #19931, #19932, #19939, #19940, #13101, #13100, #16233, and the voice children of #13096. Reconcile #16232 with the #20266 ruling. Fold #20108 into #20417.

    Estimate (an estimate only): 30 M2 PRs landed in the last three days, 9 today. At 10 to 20 issues a day, and about 150 left after the moves, that is 8 to 15 working days for code. The real limit is the two CI slots and the strict landing order. The live end-to-end run comes at the end of batch 5.

    Needed

  7. mrveiss commented on Nov 11, 2026

    @mrveiss
    OwnerAuthor

    Flaky sighting, 2026-11-11. Check Company OS workflow end-to-end on merge-train PR #21324 (head 1f266ae), workflow run 43046878695: attempt 1 failed, attempt 2 passed, no code change.

    Attempt 1 (log checked): test_e2e_04_budget_and_pause.py::test_step_6_exhausted_budget_is_not_dispatched failed in _exhaust with POST /budget/<id>/ingest -> 402 ... budget exhausted: spent=2200.000000 limit=1200.000000. The helper reads tokens_spent, PATCHes token_limit = spent + 1000 (HEADROOM_TOKENS), then ingests remaining tokens. Limit 1200 implies spent was about 200 at the read, so about 2000 tokens landed before the ingest was accepted. The agent is already paused and quiesced first (#21166), so a scheduler run is not an obvious source.

    Hypotheses, not established:

    1. Another spender charged the same budget between read and ingest.
    2. The ingest counts the event twice (200 + 2x1000 = 2200 fits).

    To confirm: run and cost-event rows for that agent between the read and the 402; the budget ledger entries behind the 2200; repeat runs on main without the train.

    Train members #21216 and #21212 touch the dispatch gate and scheduler, so a member-introduced double count is not ruled out by one green rerun.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions