Skip to content

feat(settings): unify workflow settings behind one resolver + migrate config-root legacy - #3893

Closed
snowykr wants to merge 7 commits into
Yeachan-Heo:devfrom
snowykr:feat/settings-unify
Closed

feat(settings): unify workflow settings behind one resolver + migrate config-root legacy#3893
snowykr wants to merge 7 commits into
Yeachan-Heo:devfrom
snowykr:feat/settings-unify

Conversation

@snowykr

@snowykr snowykr commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

What

Unify the three workflow runtimes' (ralplan / ultragoal / deep-interview) settings reads behind one shared resolver with a fixed five-layer precedence, and migrate the orphan legacy config-root settings.json into the modern config.yml exactly once.

  • New src/gjc-runtime/workflow-settings.ts — one resolver, five layers: project .gjc/config.yml → project .gjc/settings.json → user <agentDir>/config.yml (trusted GJC_CODING_AGENT_DIR/GJC_CONFIG_DIR + XDG) → legacy <configRoot>/settings.json → built-in default. config.yml uses the nested schema form (flat dotted keys honored only in legacy settings.json), so every effective override stays manageable via Settings/gjc config. Canonical realpath source, typed diagnostics, explicit invalid policy (continue by default, throw for ralplan).
  • src/config/atomic-yaml-patch.tswithAtomicYamlConfigTransaction (under-lock transaction seam with removeTopLevelKeys for dotted top-level keys).
  • src/config/settings.ts — one-time config-root migration into the default global agent config.yml (absent-only, durable pending/complete marker, no-clobber .bak, crash-recovery state machine, strengthened default-global pairing gate; invalid strict ralplan legacy values keep the source active; future-schema targets never touched).
  • src/config/settings-schema.ts — register gjc.ultragoal.nudgeBudget (default 10, integer ≥ 0); schemas/config.schema.json regenerated.
  • Runtimes — hand-rolled JSON readers removed; ralplan strict for all three keys (exit 2, former silent maxIterations fallback removed — user-confirmed); ultragoal/deep-interview tolerant; deep-interview's inverted precedence corrected to project-beats-user.
  • SKILL docs (ralplan / ultragoal / deep-interview) — identical precedence block, nested-only config.yml wording, strict vs tolerant, migration note.

Why

The workflow runtimes hand-rolled settings.json-only reads and never consulted the modern config.yml, so gjc config set gjc.ralplan.maxIterations 7 (config.yml) was silently ignored by ralplan. The legacy config-root ~/.gjc/settings.json was an orphan path no migration covered, the gjc.ultragoal.nudgeBudget key was missing from the public schema, and deep-interview read user YAML before project JSON (inverted precedence). This PR makes the settings surface single-source: what gjc config writes is what the runtimes read, with one documented precedence.

Testing

  • 297 focused tests pass across 10 files (resolver 12, migration 21, atomic-yaml 14, ralplan 110, deep-interview 25, ultragoal-nudge 17, config-root 3, settings-manager 46, state-runtime, config-cli), each review finding with a regression test.
  • check:types, generate-schemas/check:schemas clean; biome clean on the change set.
  • Gates: check-visible-definitions OK, verify-g002-gates pass, verify-gjc-skill-docs --fail 0 drift, rebrand-inventory --strict clean, default-gjc-definitions 28 pass.
  • E2E (native gjc ralplan --write with project .gjc/config.yml maxIterations: 2): 3rd revision opener exits 3 with PLANNING-STUCK, max_iterations: 2, max_iterations_source: <project>/.gjc/config.yml — config.yml honored end-to-end.
  • Full bun check is run by CI on this head (not completed locally — 15-min timeout); the TS/schema/gate subset passed locally.
  • Every codex-review P2 finding across all review rounds (fork PR Stabilize multiplexer rendering without scrollback replay #20 + upstream PR feat(settings): unify workflow settings behind one resolver + migrate config-root legacy #3893) was validated against the code and resolved, then squashed into the 7 logical commits: malformed-config/null-root load resilience, valid-only target blocking, flat invalid key replacement, legacy value validation + coercion, strict-invalid source retention, target-override-first ordering, flat-key gating to JSON, future-schema skip, schema integer/min/max constraints for all strict numeric keys, and the source-hash verification chain (pre-patch / pre-move / post-backup) with target revert + source restore.

GJC verdict

gajae.pr-review-verdict.v1 merge-approved sha256:01001ce2300e08bb8de488f8328b00f955c2add08453ae65a41d5f0caaa3399d reviewer:architect evidence:independent architect review of the production tree at head 424bd6a7 (architecture/product/code CLEAR, APPROVE; recovery/reconcile hardening across 33 review rounds: pending-then-complete reconcile with durable-backup prior hash + repairsApplied/preRepair-hash ownership incl. absent-sentinel, lazy agent-layer migration reads, pre-flag repair reversion on deletion, pending fields cleared on completion; 325 focused tests) — 7 logical commits

  • Target branch is dev
  • bun check passes (full run in CI on this head; focused TS/schema/gate subset passed locally)
  • Tested locally
  • CHANGELOG updated (user-facing: precedence, nudgeBudget, migration, strict exit-2, nested config.yml form)
  • Verdict above matches the exact PR head (424bd6a, diff sha256 01001ce2), not an earlier commit

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ce6611c3c8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread schemas/config.schema.json Outdated
Comment thread packages/coding-agent/src/config/settings.ts Outdated
snowykr added a commit to snowykr/gajae-code that referenced this pull request Aug 5, 2026
… move fallback

Addresses upstream PR Yeachan-Heo#3893 review P2 (chatgpt-codex-connector):

1. The generated config.schema.json allowed any JSON number for
   gjc.ultragoal.nudgeBudget, while the runtime enforces a non-negative
   integer; an editor validating against the published schema accepted -1 or
   1.5, which the runtime then rejects. The schema generator now emits
   type: integer, minimum: 0 for the key (same pattern as
   sdk.promptDeadlineMs) and the artifact is regenerated.

2. #moveLegacySourceNoReplace's fallback for filesystems without hard links
   used a raw POSIX rename after an lstat check; a destination created in the
   race could be overwritten (settings.json.bak or marker quarantine). The
   fallback is now a COPYFILE_EXCL copy, which fails with EEXIST and can
   never replace an existing destination.

Lore-id: settings-unify-20260805
Tested: 292 focused tests 0 fail; check:schemas clean (regenerated);
check:types clean; biome clean
@snowykr
snowykr force-pushed the feat/settings-unify branch from 3c292ec to 522ab32 Compare August 5, 2026 17:35

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 522ab32fb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch from 522ab32 to 352f3ab Compare August 5, 2026 17:45

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 352f3abc4e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/generate-json-schemas.ts
@snowykr
snowykr force-pushed the feat/settings-unify branch from 352f3ab to 2e9d49e Compare August 5, 2026 17:54

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2e9d49ee7a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts
@snowykr
snowykr force-pushed the feat/settings-unify branch 2 times, most recently from 44a4bca to 2f16ff6 Compare August 5, 2026 18:06

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2f16ff6d9c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch 2 times, most recently from 0a055fd to d0a62bd Compare August 5, 2026 18:32

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: d0a62bd0d6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch from d0a62bd to 17b1565 Compare August 5, 2026 18:44
@snowykr

snowykr commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@snowykr
snowykr force-pushed the feat/settings-unify branch from 17b1565 to 0b2cdfb Compare August 5, 2026 18:53

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b2cdfb4e9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch from 0b2cdfb to 19fa5f8 Compare August 5, 2026 19:03

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19fa5f8600

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
Comment thread packages/coding-agent/src/config/settings.ts
@snowykr
snowykr force-pushed the feat/settings-unify branch from 19fa5f8 to 1408842 Compare August 5, 2026 19:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 14088421bb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8e79772c9b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch 2 times, most recently from 99999c2 to a641218 Compare August 5, 2026 19:48

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a641218126

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch from a641218 to d530a6d Compare August 5, 2026 19:56
@snowykr
snowykr force-pushed the feat/settings-unify branch from 11c528f to 708ea14 Compare August 6, 2026 09:27

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 11c528f5f2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 708ea14c9a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch from 708ea14 to 338a786 Compare August 6, 2026 09:33

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 338a7866f0

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
@snowykr
snowykr force-pushed the feat/settings-unify branch 2 times, most recently from 15ac207 to 7f3be62 Compare August 6, 2026 09:46

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7f3be62a50

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
Comment thread packages/coding-agent/src/config/settings.ts
Comment thread packages/coding-agent/src/config/settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9070431356

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 966230084d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 435defcc00

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts Outdated
Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f61a58a5d2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts
Comment thread packages/coding-agent/src/config/settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 016691bb0c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aae955b3f8

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts
Comment thread packages/coding-agent/src/config/settings.ts
Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 84d3e91102

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts
Comment thread packages/coding-agent/src/config/settings.ts Outdated
@Yeachan-Heo

Copy link
Copy Markdown
Owner

Author hold recorded from snowy_kr in #playground-ko.

  • Holding maintainer review/processing on this PR for now.
  • Will not continue GJC review/repair/merge work until snowy re-requests review or explicitly unlocks it.
  • Current observed head at hold time: 84d3e911.
  • Review decision remains CHANGES_REQUESTED; no merge action.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 65d2934c79

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 19b6ec56e7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/gjc-runtime/workflow-settings.ts

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30e8952646

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/coding-agent/src/config/atomic-yaml-patch.ts
Comment thread packages/coding-agent/src/config/settings.ts Outdated

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f50c6d672c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +2784 to +2785
await Bun.write(tempPath, serialized);
await fs.promises.rename(tempPath, markerPath);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Durably sync the migration marker before publication

If the machine loses power after this rename, neither the temporary marker nor its parent directory has been synced, even though the target config write uses both barriers. The target patch and .bak can therefore survive while the marker disappears; the next load sees source plus backup without a valid marker and deliberately refuses recovery, so the copied agent value can permanently shadow later legacy-source edits. Sync the marker file before renaming and sync the parent directory afterward.

Useful? React with 👍 / 👎.

snowykr added 7 commits August 6, 2026 21:16
The config-root workflow-settings migration must read the target config.yml,
decide absent-only patches, apply them, and finalize a marker/source transition
inside one critical section. withAtomicYamlConfigTransaction re-exposes the
existing per-file queue + cross-process lock so a caller can inspect root/current
and applyPatches without re-acquiring the lock; parse failures surface before the
callback so no migration action can run against a malformed target.

Lore-id: settings-unify-20260805
Constraint: preserve validateRoot/onRestored CAS-restore semantics for existing callers
Tested: atomic-yaml-patch suite (12 pass incl. root/current exposure, parse-before-callback, scalar-root no-write)
The ultragoal nudge budget is a workflow setting read by the runtime but was
missing from SETTINGS_SCHEMA, so gjc config set rejected it as an unknown path
and the generated config.schema.json did not document it. Registered with the
existing default (10) and integer >= 0 validation, schema regenerated.

Lore-id: settings-unify-20260805
Tested: check:schemas clean; generated config.schema.json contains ultragoal.nudgeBudget default 10
Introduce workflow-settings.ts as the single source of precedence for the four
workflow setting surfaces (project config.yml > project settings.json > agent
config.yml > legacy config-root settings.json > default). No workflow runtime
hand-rolls file discovery, YAML/JSON parsing, or key extraction anymore; the
resolver exposes typed diagnostics, an explicit invalid policy (continue by
default, throw for ralplan), flat/nested extraction (flat wins), and canonical
realpath sources using the exported standardizeMacOSPath precedent.

Lore-id: settings-unify-20260805
Constraint: pure module - no Settings/discovery imports, no module-scope path hoisting
Tested: workflow-settings suite (11 pass) + atomic-yaml suite (12 pass); package + utils check:types clean
…g.yml

One-time migration of the orphan config-root settings.json workflow keys into
the default global agent config.yml, hardened by codex review: malformed
config.yml never aborts settings load (pre-transaction short-circuit +
resilience catch); only valid target values block the patch; invalid flat
keys are removed verbatim (removeTopLevelKeys, non-restorable receipt);
legacy values are validated before migrating; invalid strict ralplan values
keep the source active so gjc ralplan still fails loudly; flat keys are
honored only in legacy JSON; future-schema config.yml targets are skipped; quoted numeric values are coerced like the Settings schema; the no-clobber move fallback uses COPYFILE_EXCL.

Lore-id: settings-unify-20260805
Constraint: custom/temporary agentDir (SDK loadForScope, tests) must never consume the global source
Constraint: future-schema config.yml stays read-only across all Settings paths
Tested: 291 focused tests 0 fail; check:types clean; biome clean
ralplan, ultragoal, and deep-interview no longer hand-roll settings.json reads.
All five workflow keys resolve through workflow-settings.ts with the fixed
five-layer precedence; project configuration now beats user configuration
(deep-interview's former user-YAML-first inversion is corrected), and ralplan
is strict for all three keys (malformed/invalid explicit sources exit 2; the
former silent maxIterations fallback is removed, user-confirmed option B).
ultragoal/deep-interview stay tolerant (invalid optional files continue).

Lore-id: settings-unify-20260805
Constraint: keep resolve* signatures, JSON source fields, and ralplan exit-2 error contract (malformed JSON/YAML reasons stable)
Tested: 188 focused tests (ralplan 110, deep-interview 25, ultragoal-nudge 17, config-root 3, resolver 11, migration 10, atomic-yaml 12) + settings-manager/state-runtime/ultragoal-runtime 258 pass; check:types clean
All three workflow SKILL files now describe the identical precedence (project
.gjc/config.yml > project .gjc/settings.json > user agentDir/config.yml >
legacy config-root settings.json > default), flat/nested key shapes (flat
wins), project-beats-user, canonical source, and the one-time paired root
migration. ralplan states the strict exit-2 contract including the removed
maxIterations silent fallback; ultragoal/deep-interview state the tolerant
continue-to-default behavior. Stale deep-interview user-YAML-first and ralplan
project-only paragraphs removed.

Lore-id: settings-unify-20260805
Tested: default-gjc-definitions (28 pass), check-visible-definitions OK,
verify-g002-gates pass, verify-gjc-skill-docs --fail 0 drift,
rebrand-inventory --strict clean
User-facing changes per CONTRIBUTING.md: five-layer settings precedence,
nudgeBudget schema registration, config-root one-time migration, strict
ralplan exit-2, and nested-only config.yml key form.

Lore-id: settings-unify-20260805
@Yeachan-Heo

Copy link
Copy Markdown
Owner

Closing during the emergency maintenance freeze. This PR is not in the retained critical or maintainer-owned set. Do not open a replacement PR unless a maintainer explicitly directs it.


[repo owner's gaebal-gajae (clawdbot) 🦞]

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e16bfa408e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

## [Unreleased]

## [0.12.15] - 2026-08-06
### Added

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore the released changelog boundaries

Adding this section removes the existing 0.12.15, 0.12.14, and 0.12.13 headings, so all previously released 0.12.13 entries are now incorrectly presented as Unreleased and the release history is corrupted. Keep the new entries under Unreleased while restoring every released version heading exactly where it was.

AGENTS.md reference: AGENTS.md:L178-L178

Useful? React with 👍 / 👎.

// Only clear patches when a backup verifies they are still the
// migration write; without one the target values may be newer
// overrides and must be preserved.
if (marker?.status === "pending" && backupExists) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Expose malformed roots during no-backup recovery

When a fresh migration crashes after applying its target patch but before creating .bak, and the legacy source is then replaced by null, a scalar, or an array, backupExists is false, so this branch preserves the stale marker-owned target and returns. Direct strict ralplan resolution cannot verify stale ownership without the backup, accepts the higher-precedence valid agent value, and never reaches the malformed legacy source to exit 2; handle this pending/no-backup state as fail-closed rather than leaving the stale patch effective.

Useful? React with 👍 / 👎.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants