Repository navigation
fix(settings)!: unknown underscore keys fail everywhere; teams gets the _undeclared knob; GSAC_RETRY_BASE_MS - #206
Conversation
File size check0 over a hard cap (fails), 8 warning(s).
Split the file, wrap the line, shorten or exempt the comment, or list the path in 4 managed file(s) skipped; repo-platform owns them. |
There was a problem hiding this comment.
Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.
Note
This error may be related to your runner configuration. You can now configure runners for Copilot code review separately from Copilot cloud agent by creating a copilot-code-review.yml file with your setup steps. Read the docs for details.
e9824f4 to
305b872
Compare
305b872 to
dc7d044
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Mixed wrapper typos currently receive misleading underscore-directive diagnostics.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 48/60 changed files
- Comments generated: 1
- Review effort level: Balanced
dc7d044 to
8de6d62
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Undeclared parent-team revocation can remove access from a declared child team that was considered converged through inheritance.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 48/60 changed files
- Comments generated: 1
- Review effort level: Balanced
8de6d62 to
6fa7474
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Mixed renamed and unknown underscore wrapper keys omit the new directive guidance.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 64/65 changed files
- Comments generated: 1
- Review effort level: Balanced
…he _undeclared knob; GSAC_RETRY_BASE_MS
Four v3 rule decisions, each a small change:
- Underscore rule: an unknown `_x` key is rejected at the document root as it
already was inside a wrapper, with an error naming the two directives
(`_layering`, `_undeclared`); a note belongs in a YAML comment. A misspelled
`_layerin: replace` can no longer pass as a private note and merge a layer
meant to replace.
- teams takes `knobbed(TeamConfig)` with default `keep`: every plan lists the
repository's teams, notes each undeclared direct grant, and revokes them under
`_undeclared: delete` (DELETE /orgs/{org}/teams/{slug}/repos/{owner}/{repo});
access granted above the repository is noted, never touched. The snapshot
writes the wrapper form.
- RETRY_BASE_MS becomes GSAC_RETRY_BASE_MS, documented in the inputs reference;
the old name is ignored, as an environment variable has no loud-error channel.
- The 12 scenario files named with a section key's underscore are dashed, and
a test over the corpus pins the rule.
- Drift lines read declared-first everywhere: collaborators and teams said
`live role X != declared Y`, the other sections `declared X != live Y`.
…e fold of the gate review
- GET /repos/{owner}/{repo}/teams is graded by GitHub at repository Administration (read) alone, so the
list declares that permission and carries the section's 404 posture (denied): a fine-grained token
with administration:read and no org Members reads the list and meets the per-team probes' 404 as
"no access", as it did before the list read existed. The fuzz oracle models the org gate as its own
switch (orgGateDenied) instead of folding it into the section grade; the route-identity pin skips
primaryRead, which is the section's, not the route's.
- One helper words the "granted at the X level" note plan() and snapshot() share; the snapshot comment
no longer calls a direct team never revocable.
- The 12 renamed scenarios (and the pre-existing custom-properties.yml) name themselves as their file
stem, and the corpus test pins name == stem.
- Docs: the env-var table names what GSAC_RETRY_BASE_MS skips versus scales and lists every variable
the action reads; layering.md points at the generated count; the upgrade page's underscore sentence
names its one null-valued corner; a stale "private key" comment and test name reworded.
…; teams docs name the parent-grant caveat - A wrapper holding an underscore key beside a plain typo, or beside the pre-v3 `undeclared` spelling, now gets both clauses in one line: the typo stays on zod's own words, the underscore keys are named before the directives advice, and the rename clause is joined instead of returned alone. - The teams docs say what `_undeclared: delete` does to a declared child team whose access comes through an undeclared parent's grant: declare the parent too, or keep.
6fa7474 to
4225379
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Migration and playbook documentation still contradict the implemented team and retry behavior.
Get a fresh assessment by requesting another Copilot review.
Review details
- Files reviewed: 62/63 changed files
- Comments generated: 3
- Review effort level: Balanced
Before
After
What changed
Four v3 rule decisions, each one small change.
_layeringand_undeclaredare the whole underscore vocabulary; any other_xfails at the root as it already did on a wrapper. A note goes in a YAML comment.teamstakes{_undeclared, entries}, defaultkeep;deleterevokes undeclared direct grants. Snapshots write the wrapper form.GSAC_RETRY_BASE_MS: the retry-timing knob, renamed fromRETRY_BASE_MSand documented; the old name is ignored.Proof
bun run checkgreen (3467 unit tests);bun run test:e2e260/260;bun run fuzz -- --sections teams80/80 (seeds 3503126389 and 2617668430 included) and 40/40 over every section;build:checkzero drift;build:lib+ package smoke ok.Technical details
Based on main 69fc7c4. Upgrade entries:
docs/upgrading/v2-to-v3.mdsections 16, 17, 18.The teams knob in use
Decisions
_xfails at the root (settings-unknown-directives) and on a wrapper, under everysectionsallowlist; the error names the two directives. A wrapper line holding an underscore key beside a plain typo or the pre-v3undeclaredkey names every fix at onceknobbed(TeamConfig), defaultkeep(conservative: a team is often granted by the org; collaborators staysdelete).deleterevokes direct grants throughDELETE /orgs/{org}/teams/{slug}/repos/{owner}/{repo}; org- or enterprise-level access is noted underdelete, never touchedGET /repos/{owner}/{repo}/teamsis gated at repository Administration (read) alone, as GitHub grades it, and carries the section's 404 posture (denied); the public org probe keeps its personal-account 404. A token with Administration but no org Members still reads the list and meets the probes' 404 as "no access", as before this PRGSAC_RETRY_BASE_MStest/e2e/foundation.test.tspins[a-z0-9-]+.ymlandname == file stemover the whole corpusvalueDrift(declared X != live Y) for collaborators and teams first, so this PR keeps main's linesHow
validateSettingsDocsplits the strangers into underscore keys and plain unknown sections (unchanged, the allowlist warning included).wrapperKeyErrorinschema-helpers.tsjoins one clause per kind: theundeclaredrename, the directives line for the underscore keys (named when the list holds anything else); a plain typo keeps zod's own words.plan()reads the org probe, then the team list, then each declared team's probe; the undeclared walk runs after the declared one over the same list.snapshot()emits the wrapper throughknobbedSnapshot.sectionGradeis the repository grade;orgGateDeniedis the org gate's own switch. A shut gate with a held repository grant predicts grade none under the absent posture (reads pass, probes answer 404, writes denied); the prediction carries its effectiveposture, which the preflight fold reads. The route-identity pin skipsprimaryRead, which is the section's, not the route's.Proof detail
unknown-underscore-keyand asserts the rejection names the key.teams-undeclared-deleteandteams-undeclared-keep-noteconverge on a check re-run; endpoint coverage 163/163 (the new DELETE is hit).Line accounting
git diff origin/main...HEAD --numstat, by kind; the 13 renames are +0/-0.teams/index.ts); the two new loud errors (orchestrate.ts,problem.ts,schema-helpers.ts)This PR is the user-visible half of the task (rules and a knob), so source is additive; the one-owner deletions are #208, where source is net flat.
incident-freeze.md,troubleshooting.md,examples.md, andmigrating-from-probot.mdused an underscore note and now use a comment;layering.md's cycle example moved from_notestorepositoryand its wrapper count points at the generated sentence; the pre-existingcustom-properties.ymlscenario is renamed to itsname:(custom-properties-apply-converges.yml); two stale "private key" wordings inlayers.tsand its test.RETRY_BASE_MSname (test-only knob, silent ignore accepted); a typestate for "listing read before the undeclared walk" in teams; theteams: []corner of the oracle (a run that never reaches an org-gated probe can finish clean under org_members none and the 403 style; the generator never draws it); a declared child team losing access through an undeclared parent's revoked grant underdelete(needs a parent lookup per team; documented in the teams section instead).run.test.ts's module-leveltestIoforcollectingIo()is not mechanical (61 sites readcapturedaslevel: messagestrings andmask:lines, whichcollectingIoshapes differently); it goes to the test-audit task.test/action/run.test.tsonto chore(test): one generator registry behind build:check, one Io capture fake, one ROOT, conventions stated #200; the drift lines and the upgrade page onto refactor(sections)!: milestones, webhooks, and rulesets join listSection; duplicate live items fail loudly everywhere #202). The lead's gate review: 1 blocking (the team list's grant) and 11 non-blocking, all folded. Copilot: 3 threads, 2 fixed, 1 recorded and documented, all resolved.keepand the ignored old env var name are owner decisions;lib/settings.schema.json,action.yml,COVERAGE.md,docs/reference/sections.md, anddocs/reference/undeclared-policy.mdare regenerated.BEGIN_COMMIT_OVERRIDE
fix(settings)!: unknown underscore keys fail everywhere; teams gets the _undeclared knob; GSAC_RETRY_BASE_MS
BREAKING CHANGE: an unknown underscore key at the document root fails validation naming
_layeringand_undeclared, where v2 dropped it as a private note; move notes into YAML comments.teamstakes the{_undeclared, entries}wrapper (defaultkeep): every run lists the repository's teams (repository Administration read) and notes undeclared direct grants,_undeclared: deleterevokes them, and snapshots write the wrapper form.The retry-timing knob is read from
GSAC_RETRY_BASE_MS;RETRY_BASE_MSis ignored.END_COMMIT_OVERRIDE