Skip to content

Preserve Codex agents configuration across Gateway overlay lifecycle #199

Closed

Description

@NOirBRight

Outcome

Prove that CodexHub preserves Codex rust-v0.145.0 agent configuration across Gateway connect, Stable/Developer takeover, restart, and restore without silently enabling or rewriting multi-agent V2.

Problem

rust-v0.145.0 consolidates shared settings under [agents], including enabled, max_concurrent_threads_per_session, default_subagent_model, default_subagent_reasoning_effort, and role definitions. CodexHub's overlay is designed to preserve unknown TOML, but there is no dedicated regression contract for these tables and nested role/config-file values.

Scope

  • Add representative [agents] and nested role fixtures to the config overlay tests.
  • Cover the canonical concurrency key and retained legacy max_threads alias without normalizing user-owned text unnecessarily.
  • Preserve default subagent model/reasoning settings and role config_file references.
  • Preserve structured multi_agent_v2 feature configuration and explicit user enable/disable choices.
  • Verify connect, takeover, interrupted update, restart/readback, and restore.
  • Keep CodexHub from auto-enabling V2 or choosing role/model defaults on the user's behalf.
  • No new UI is required in this issue.

Acceptance criteria

  • User-authored [agents], nested roles, and relevant feature configuration survive every overlay lifecycle semantically unchanged.
  • Stable/Developer takeover does not drop or duplicate agent tables.
  • Restore returns the exact pre-owned configuration modulo documented CodexHub-owned sections.
  • Unknown future agent keys remain preserved.
  • CodexHub never writes multi_agent_v2 = true unless an existing explicit user-owned value is being preserved.
  • Existing provider, model, context-budget, ownership, and backup behavior remains unchanged.

Verification

python -m pytest -q tests/test_config_overlay.py
python -m pytest -q
git diff --check
python scripts/report_quality_gates.py

Verification class is strict because this is a persisted configuration and ownership contract.

Relationships

Activity

  1. added
    enhancementNew feature or request
    ready-for-agentFully specified, ready for an AFK agent
    wayfinder:taskWayfinder implementation task
    P2Priority 2: routine work
    on Jul 22, 2026
  2. added
    P1Priority 1: current iteration goal
    and removed
    P2Priority 2: routine work
    on Jul 29, 2026
  3. NOirBRight commented on Jul 29, 2026

    @NOirBRight
    OwnerAuthor

    0.1.8 Beta1 role

    Preserve the user’s existing [agents] configuration and the selected collaboration backend across Gateway overlay apply/readback/restore. This is configuration safety for #252; it does not include sidebar task APIs or the full cross-Home history migration deferred to #197.

  4. 7 remaining items

  5. NOirBRight commented on Jul 30, 2026

    @NOirBRight
    OwnerAuthor

    Repair review delta is ready at exact SHA 415a45f077dc03f0cc051b09b6121aad4bc14770 on codex/issue-199-agents-config.

    • Active takeover metadata now anchors the exact recovery backup SHA-256 and verifies durable backup/sidecar readback before live publication. Same-marker drift fails closed for owned, unowned, interrupted, Stable→Developer, Developer→Stable, raw/comment, provider/model, restart, and real subprocess paths.
    • Journal/receipt owner × status × phase legality is shared and typed. Forged owned journals using unowned-only transformation statuses fail during read, before filesystem mutation.
    • Duplicate-key receipt coverage now starts from a complete valid receipt and duplicates all six critical keys.
    • Legacy 0.1.7 sidecars without an anchor report typed MISSING_RECOVERY_ANCHOR, retain all evidence, and have an explicit offline quarantine/recovery boundary in the evidence README.

    Candidate verification:

    • overlay: 106 passed, 186 subtests passed
    • authoritative Python 3.13 core: 1519 passed, 1 skipped, 598 subtests passed
    • the first core attempt inherited Hermes Python 3.11 in PowerShell children; its only two issue Restore bundled provider/model capabilities when installed runtime config predates them #108 replay failures were isolated as PEP 695/tool-validator execution failures, then passed with Python 3.13 first on PATH before the clean authoritative full run
    • py_compile, compileall, and git diff --check: passed
    • report-only quality gates: exit 0, parse errors 0, baseline counts unchanged (2 unused imports / 83 dead-function reports / 146 duplicate-name reports)

    Immutable evidence: https://github.com/NOirBRight/CodexHub/blob/415a45f077dc03f0cc051b09b6121aad4bc14770/docs/evidence/issue-199/README.md

    No merge or issue closure was performed. A fresh independent exact-SHA Standards/Spec review remains required.

  6. NOirBRight commented on Jul 31, 2026

    @NOirBRight
    OwnerAuthor

    0.1.8 roadmap placement

    This configuration-safety gate now belongs to beta.3 and blocks the model-specific V2 tracer bullets #282/#283. It no longer blocks beta.1 core Responses. PR #260 remains the current reviewed implementation candidate.

  7. NOirBRight commented on Jul 31, 2026

    @NOirBRight
    OwnerAuthor

    #260 已关闭并延后:该工作项保留为 0.1.8 Beta3,后续基于最新 dev 重新实现并重新审查;现有 #260 分支不作为完成证据。

  8. NOirBRight commented on Aug 2, 2026

    @NOirBRight
    OwnerAuthor

    This was generated by AI during triage.

    Roadmap correction: this configuration-safety work belongs to 0.1.8-beta.4 and blocks #252/#282 under #284. Closed PR #260 remains non-evidence; reimplementation starts from current dev.

  9. NOirBRight commented on Aug 10, 2026

    @NOirBRight
    OwnerAuthor

    Beta4 implementation complete and merged via #400.

    Evidence:

    • reviewed candidate: 907a78938e0aee7a6e27a313c356b43a5d62b0b3
    • dev merge: ceb80a41c76c6fe0736824815e80de3dd463dbb3
    • focused overlay gate: 69 passed, 11 subtests passed
    • Python core: 2254 passed, 1 skipped, 490 subtests passed
    • report-only quality gate: exit 0, parse errors 0
    • git diff --check origin/dev...HEAD: passed
    • independent Standards review: PASS
    • independent Spec review: PASS

    The current production overlay already preserves [agents] safely, so no production routing/configuration code was changed. The regression matrix binds canonical and legacy concurrency keys, nested roles/config files, defaults, unknown fields, scalar V1, structured V2 enabled/disabled, missing V2, apply/restart/readback, bidirectional takeover, interrupted recovery, backups, and exact restore.

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

    P1Priority 1: current iteration goalcampaign:0.1.8-beta40.1.8 Beta4 generic Collaboration V2 campaignenhancementNew feature or requestready-for-agentFully specified, ready for an AFK agentwayfinder:taskWayfinder implementation task

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions