Skip to content

patchy dev: double config execution can disagree with the generated manifest #331

Closed

Description

@allisonmahmood

Problem

Dev preparation evaluates config twice. An ordinary save to an imported config file between those executions can produce a successful preparation whose runtime manifest differs from the generated client manifest. Reusing the first validated snapshot removes both the inconsistency and an unnecessary config child process.

Reproduction

Have patchy.config.ts import a field name from fields.ts. Start preparation with the name title. During the generation request, save fields.ts with body, leaving patchy.config.ts itself unchanged.

{"generatedColumns":["title"],"preparedColumns":["body"],"returnedSuccess":true,"configSourcePreserved":true,"importedEditPreserved":true}

Both agents exercised real prepare, config child processes, Generation.generate, schema validation and the managed-file transaction with an in-memory HTTP fixture. The edit was deterministic, not random config behavior. The reviewer ran stable-input, main-config-save and declaration controls plus 30 scratch scenario expectations. Stable input matched; a main-file save was refused as intended. Full CLI startup, provisioning and browser behavior were not exercised.

Cause and qualified simplification

devPreparation activates the first validated manifest, reruns executeConfig, then returns the second value. Its exact-source guard covers the main config file, not imported files.

Return the first validated manifest without executing config again. Retain the generated index release, version, stamp and declaration checks against that snapshot. The independent review found that blindly deleting the second call loses four existing refusal checks. A checked scratch prototype retained those refusals while reducing actual config child executions from two to one.

This is a snapshot consistency fix with a smaller execution path, not permission to remove validation or overwrite the author's concurrent edit.

Audited at ef3e790. Found and independently checked by separate GPT-6 Astra agents in Oh My Pi, using only ordinary offline workflows and synthetic data.

Activity

  1. added
    bug
    needs-triage
    area:cli
    on Sep 20, 2026
  2. added a commit that references this issue on Sep 24, 2026
    907bc7c
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

    area:clibugneeds-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions