Repository navigation
Conversation
|
Resolved: The earlier stale-role/assignment finding is fixed: refresh now clears the previous |
|
Thanks for the review. Addressed the refresh aliasing issue in commit
Validation after the fix:
The invalid machine-setting promotion fix is included in dependent PR #1468 as |
Resolved: Refresh now snapshots Review was read-only; no PR code was run, built, or installed. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
@huong8373tt-beep Thanks, this is step 2 of #1459. With the built CLI on workspace-only and self-only installs, the overlay works:
- Machine values apply.
recallEnabledfrom the machine file takes effect in the workspace. - Saves stay local. They leave the machine's values out of the workspace file.
- Commands still write.
recall disablewrites the key even when the machine file already says false. - Codex trust.
codexTrustEnabled: falsestops a new workspace'sinitfrom trusting Codex hooks. - Nested maps.
workflows.toolsmerges per key. - Bad values. A wrong-typed scalar warns once and is ignored.
- Mixed releases. 0.28.0 reads the workspace config this build saves.
We reviewed 3bc680c and re-checked the two later commits at 0030f9a. They fix the user-scope loss and the role revocation we found at 3bc680c. At 0030f9a:
- the
report-timeoute2e (a user who setusageReportEnabled: false) passes; role-assignments.test.tspasses;- a revoked role is no longer delivered, the same as on
main.
How step 1 lands. #1468 was closed right after 3ca7b95, and 3ca7b95 is not in this branch. So this PR carries #1468's first commit without its fix: init --scope user over a machine file with recallEnabled: "yes" still writes an install it can't read. Please either reopen #1468 and stack this on it, or bring 3ca7b95 into this branch. This PR's loadMemberSettings could also do that validation.
Changes before this is approved:
- [P1 blocking]
update.test.tsno longer loads. Its mock of../types.jslacksMemberSettingsSchema, so about 60 tests silently stop running; at 0030f9a it still fails to load. CI was red at 3bc680c: all six Lint & Test jobs and E2E shard 1. Please run the full unit suite, since the PR's own files pass while others fail. - [P1 blocking] A wrong-typed
workflows.allowvalue lifts the restriction. Withworkflows: { allow: { network: "false" } }in the machine file,workflow start --driver localwarnsIgnoring network in …and runs a step that requires network; withnetwork: falseit is refused (readMachineWorkflowSettings,src/config.ts:327-337). #1459 says a badworkflows.allowvalue fails the workflow command and names the key, so a typo never lifts a restriction. One badenventry also drops the wholeallow.envlist. Other commands should only warn. - [P1 blocking] Real-CLI record. The body needs one real-CLI run after
npm run build(AGENTS.md, "Testing before a PR"). For example: a workspace-only install withrecallEnabled: falsein the machine file, thenpullandrecall status. - [P2 non-blocking, needed for approval] One declaration and the classification test.
MemberSettingsSchemarepeatsLocalConfigSchema's member keys instead of being composed into it, andLOCAL_CONFIG_INSTALL_KEYSis unused and not exhaustive. We added a new key toLocalConfigSchema, andtscand every test still passed. #1459 asks for a test that fails until each key is declared one or the other, for exampleLocalConfigSchema = InstallSchema.merge(MemberSettingsSchema)and a test that the shape's keys equal the union of the two lists. - [P2 non-blocking, needed for approval] Two readers still ignore a settings-only machine file. The HTTP local agent's Codex trust (
src/local-agent.ts) and the price-table aliases (src/hook-handlers.ts) still callloadLocalConfig(). SocodexTrustEnabled: falsedoesn't reachinit --http. We found this by reading the code, not by running it. The #1459 readers table lists both.
Non-blocking:
- [P2 non-blocking]
aiis copied into every workspace config, butcallToolkeeps readingai.toolthroughaiToolSettings, so the key has two readers. Leaveaiout of the overlay, or makeaiToolSettingsthe one reader. - [P2 non-blocking]
codexTrustEnabled: falsein the machine file still doesn't hold duringinit --scope user's first hook setup. We ran this one. - [P3 nit] The warnings say
(root)and name only the last part of a nested key. - [P3 nit] A workspace config with
ai: { tool: "" }becomes unreadable. - [P3 nit]
refreshRoleAssignmentlost its #1186 comments. - [P3 nit] Every save moves the member settings to the top of the file.
Overlap: #1465 conflicts in src/config.ts; keeping both sides of the destructure resolves it. #1474 is stacked on this; we'll review it once this settles.
CI review: we agree with its findings; the two later commits fix the first two.
Verified: build and tsc pass at 3bc680c and 0030f9a. At 0030f9a, the six unit files that failed at 3bc680c pass (156 tests) except update.test.ts, which does not load. The report-timeout e2e passes (21), and the role-revocation run matches main. At 3bc680c the full unit suite had 10 failures. Not run here: the full suite at 0030f9a, init --http, and Windows.
0030f9a to
edad625
Compare
Resolved: Refresh snapshots the resolved config before clearing it, fixing aliasing-related settings/role loss. Stale role/assignment cleanup remains fixed. Promotion now validates top-level settings individually, fixing the previously reported invalid Review was read-only; no PR code was run, built, or installed. |
|
Thanks for the detailed review. I have rebased #1473 on #1468's current I am addressing the remaining P1 items together: restore the unit-test module coverage (including |
|
Thanks for the detailed review. I addressed the remaining PR1/P2 items and pushed commit Changes:
Verification on the current branch:
The repository-wide Windows suite remains unsuitable as a gate on this host: it times out in existing POSIX/symlink/fixture-lock paths. The focused tests above cover the changed paths. |
Resolved: The current diff fixes the previously reported aliasing-related settings/role loss, stale role/assignment metadata, invalid top-level settings promotion, and valid nested workflow settings loss during promotion. Review was read-only; no PR code was run, built, or installed. |
…e base of this stack
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Re-review at d81cca5. Most of the earlier findings are fixed. Two blocking items are left.
Blocking
- [P1 blocking] CI fails on the merge with main.
pull-scope-isolation.test.ts› "clears a pending auto-report when 'member' disables reporting in 'project' scope" (from #1462) fails on all three ubuntu Lint & Test jobs in both runs at this head. Merging d81cca5 into main locally gives 1 failed / 56 passed; main alone passes 57/57. The test runspulltwice on the same config object and setsusageReportEnabled = falsein between; the overlay's in-memory refresh puts the earlier value back. A realpullreloads the file, and thereport-timeoute2e covering the same flow passes 23/23 on the merge, so users do not hit this. The fix is to rebase and give the second pull a freshly loaded config. Worth knowing for later writers: after the overlay, a member setting written to the config object in memory is dropped by the nextrefreshRoleAssignmentor save unless it goes throughmarkMemberSettingsWritten. - [P1 blocking] The PR body still has no real-CLI record. The 19:14Z comment mentions a built-CLI run without commands or output. Please paste one representative run into the body.
Fixed since 0030f9a
| Finding | Evidence |
|---|---|
update.test.ts did not load |
Full unit suite at the head: 590 files, 17,511 tests pass; on the merge with main update.test.ts passes 64/64. |
A bad workflows.allow failed open |
Built CLI, self-only install, a step that needs network: network: "false", allow: "no" and an env list with one bad entry are all refused. |
| Settings-only machine values not read by the HTTP local agent | #1477's test for it passes on this head and fails on the old local-agent.ts. init --http itself not run. |
| Two copies of the member-setting key list (from #1468) | readSettingsOnlyConfig now walks MEMBER_SETTING_KEYS and reads workflows entry by entry. |
| Classification test | A new key in LocalConfigSchema keeps tsc green and fails the test, as #1459 asks. |
ai copied into workspace configs |
No longer copied; a workspace config with ai: { tool: "" } loads again. |
Non-blocking
- [P2 non-blocking] The member settings are still declared twice:
MemberSettingsSchemais not composed intoLocalConfigSchema. - [P2 non-blocking]
init --scope usersaves the deny fallback (network: false) into the new install while the warning says "Ignoring". A typo meant to allow network is saved asfalse. - [P2 non-blocking] A machine
codexTrustEnabled: falseis still not respected duringinit --scope user's first hook setup ("Trusted 7 teamai hook(s) in Codex"). The code is from #1468; the new commits do not touch it. - [P3 nit] Warnings still print Zod's
(root); every save moves the member settings to the top of the file; a misspelled key underallow(netwrok: false) is skipped with no warning (#1477 refuses it);scope === 'user' ? … : …appears three times and could belocal ?? await loadMemberSettings().
Also checked
- Interdiff since 0030f9a: +35/−35 in 4 source files. No schema key, flag or team repo layout change.
- With #1475 (now on main), the rules agree for
updatePolicyandautoCompactTokens: with a user install the user scope decides; without one the workspace config decides, with the machine value below it. On the merge,autocompact-pullpasses 3/3. npm ci,npm run build,npx tsc --noEmit,npm run lintexit 0. The full e2e suite was not rerun; the earlier review ran the related files and this round reran the ones the new commits reach.
d81cca5 to
252d129
Compare
Resolved: The current diff fixes the earlier aliasing-related settings/role loss, stale role/assignment metadata, invalid top-level settings promotion, and valid nested workflow settings loss during promotion. Review was read-only and limited to the specified diff. No PR code was run, built, or installed. |
252d129 to
ec70d09
Compare
|
Update on the current rebased head
The PR body now contains the exact commands and these limitations. I am not presenting the full suite as green. |
Resolved: The current diff fixes the earlier aliasing-related settings/role loss, stale role/assignment metadata, invalid top-level settings promotion, and valid nested workflow settings loss during promotion. Review was read-only and limited to the specified diff. No PR code was run, built, or installed. |
|
Update on the current rebased head
The PR body now contains the exact commands and these limitations. I am not presenting the full suite as green. |
SaulMoro
left a comment
There was a problem hiding this comment.
This was generated by AI during triage.
Approving at ec70d09. Both blocking items from our last review are resolved:
- CI on the merge with main.
pull-scope-isolation.test.tsnow returns a freshly loaded config from both scope readers on every pull, as a realpulldoes, so the #1462 regression test checks the persisted path again. CI at this head is green on the merge with main. - Real-CLI record. The body now has a built-CLI run with an isolated HOME and a local bare remote: workspace init and pull, the machine
recallEnabled: falsein effect, no machine value written into the workspace config, andrecall disablewriting the explicit local override.
The rebase onto main is clean (git range-diff shows the earlier commits unchanged); the only new commits are those two test changes.
The non-blocking items from our last comment can follow: the member settings are still declared twice (MemberSettingsSchema not composed into LocalConfigSchema), init --scope user saves the deny fallback for a bad workflows.allow, and a machine codexTrustEnabled: false is not applied during init --scope user's first hook setup.
This branch carries #1468's commits, so merging it lands step 1 and step 2 of #1459 together.
…e base of this stack
Tencent#1478 added a member sessions setting to config.yaml, and Tencent#1473 made every config key either an install key or a member setting. Keep sessions per install, as scoring is, so the key ownership test passes again.
Summary
This is the second dependent PR for #1459, building on #1468.
recall enable/disablewhen the effective value came from the machine overlay.Validation
All validation below was run against the current rebased head
ec70d09d.npm run build- passednpm run typecheck- passednpm run lint- passed (0 warnings, 0 errors)pull-scope-isolation.test.ts- 57member-settings-overlay.test.tsconfig-not-initialized.test.tsupdate.test.tsworkflow-run-controls.test.ts- 99pull-scope-isolationregression now passes with a fresh config object between pulls; the mock was also updated for the currentmainexports.git diff --check- passedRepresentative built-CLI run
After
npm run build, I ran the built CLI against an isolated HOME, a fresh workspace, and a local bare Git remote. The run exercised:The run exited successfully and printed
REAL_CLI_OK. It verified that:recallEnabled: falsewas effective;recall disablewrote the explicit localrecallEnabled: falseoverride.Full-suite note
The full repository unit suite was attempted on Windows and reached real test execution, but the host lacks POSIX
sleepand has unrelated Windows symlink/path-lock fixture failures. A Linux rerun was also attempted on the controlled server; dependency installation stopped at an external npm registry ECONNRESET while downloadinghandlebars, before tests could start. The focused suite above is green; no environment failure is being reported as a code pass.Disclosure
Slai Agent Runtime assisted with investigation, implementation, and test execution. The account owner reviewed and authorized this contribution and remains responsible for the submission.
Depends on #1468 and continues #1459 step 2.