Skip to content

refactor(resolve-config): simplify config readers and status helpers - #14189

Merged
melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14099-42507389025-1
Nov 8, 2026
Merged

melodic-automation-lanes[bot] merged 1 commit into
mainfrom
work-resolve-issue/issue-14099-42507389025-1

Conversation

@melodic-automation-lanes

@melodic-automation-lanes melodic-automation-lanes Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

Closes #14099

Summary

Opened by the work-resolve-issue lane. The run's own summary:

Simplified four of the eight listed resolve-config files; behavior is unchanged. In resolve-config.mjs, a new pathsOf helper replaces the base-path and config-path defaulting that 14 functions repeated, and nine *FromBase readers now call the existing configFromBase instead of repeating loadConfig(filesUnderBase(...)). resolveFromBase now loads the config once instead of twice, and issuesByStatus works out the status field id once per listing and the wanted-label test once per issue. The other edits are small: a shared tablesOf helper in dimensions.mjs, the one-use disagree closure inlined in issue-status.mjs, and one shared function for the paths and paths-ignore predicate keys in predicate.mjs. action.yml, patch-rules.mjs, read-status.mjs and read-status.fixtures.mjs were reviewed and left as they were: what could be cut there would either cross files (out of scope) or change a default-parameter edge case.

Not verified

  • node --test over .github/actions/resolve-config/*.test.mjs was not run: this lane's Bash runs only the named wrappers, so the suites are left to the PR's CI
  • tidy skipped: every changed file is under .github/, a listed shared path for the tidy cutoffs
  • ci-status green is left to the PR's CI
  • No changelog fragment added: the change touches no plugin, and check-changelog-fragments passes without one

Fix

  • .github/actions/resolve-config/resolve-config.mjs: new pathsOf(env) helper; configFromBase reused by adoption/ownedBranches/issueDimensions/issueStatus/redMain/postMerge/issueLaneWebHosts/attendedClasses/branchCleanup readers; resolveFromBase loads the config once; issuesByStatus hoists statusField…
  • .github/actions/resolve-config/dimensions.mjs: tablesOf(config) helper shared by parsePin and checkDimensions
  • .github/actions/resolve-config/issue-status.mjs: fieldId read once and used in the unmapped message; the single-use disagree closure inlined at its one call site
  • .github/actions/resolve-config/predicate.mjs: paths and paths-ignore KEYS entries share one somePathMatches function

Verification

The runner ran each check from the base copy against 7165413:

  • scripts/check-changelog-fragments.sh --check: passed
  • scripts/check-changed-skills.sh --merge-base: passed

The run reports:

Left out: the items under Not verified.

Related

#14099

Merge-Risk: max=MEDIUM demote=false head=7165413c5db5c1fc52019e8322d8306713c77316 rubric=8.1.2 rater=claude-opus-5-5 checker=claude-opus-5-5

Lane-Activity: work-resolve-issue/resolve-issue
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 7165413c5db5c1fc52019e8322d8306713c77316: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14189 (refactor(resolve-config))

I found no security issues.

All four changed files are under .github/actions/resolve-config/**, which is a trusted path. resolve-config is also part of the token-broker trust control. I read every hunk in all four files and the code each one gates. None of the changes widens anything: no token scope, lane or activity grant, trusted-actor or bot-setter check, or patch-rule refusal changes.

  • resolve-config.mjs
    • The new pathsOf(env) helper keeps the same env.BASE_PATH || DEFAULT_BASE_PATH and env.CONFIG_PATH || DEFAULT_CONFIG_PATH defaults. filesUnderBase still calls checkConfigPath(configPath) first, so path checking hasn't changed.
    • pathsOf is a const at module scope (L469), and the CLI entry runs at L697, after it. That means no temporal-dead-zone error can occur on load.
    • The nine *FromBase readers now go through configFromBase, which runs the same loadConfig(filesUnderBase(...)) and so the same validation.
    • resolveFromBase now parses the config once. I checked that reusing the result is safe:
      • checkPatchRules (patch-rules.mjs L27-57) only reads activities and doesn't change it.
      • laneHasActivity works from files, not from doc.
      • The patch-rules check still runs before anything else, as it did before (L504-510).
    • In issuesByStatus, statusField and labelled are now computed earlier but from the same inputs, so the results are the same.
  • issue-status.mjs: fieldId comes from the same config["field-id"]. The inlined StatusDisagreement check has the same condition and runs at the same point, before the botSetter / trustedOption branch, so the trusted-setter logic is unchanged.
  • predicate.mjs: the paths and paths-ignore keys now share one matcher function. It behaves the same as the two copies it replaces, and nothing compares the KEYS functions by identity.
  • dimensions.mjs: tablesOf(config) builds the same table object as before.

The PR text contains no instructions aimed at this review lane. This is a first review of the PR (no earlier heads reviewed), so it was not limited to blocking findings.

critical-findings: 0

@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown
Contributor

claude-review reviewed 7165413c5db5c1fc52019e8322d8306713c77316: read 4 of 4 changed file(s); 0 finding(s), 0 as inline comments.

Code review: no findings. This was a complete review: I read every hunk of all 4 changed files. Nothing in the diff is a hold class. The files are under the trusted .github/actions/resolve-config/** path, so each change got a full read. That match alone is not a hold.

Checked against #14099 ("behavior unchanged"):

  • resolve-config.mjs
    • resolveFromBase: now calls loadConfig once and reuses the result. The value of doc is the same as before:
      • The first call already sat on every path, so its throw behavior is unchanged.
      • checkPatchRules (patch-rules.mjs:27-57) only reads activities and never writes to it.
      • laneHasActivity reads files, not doc.
    • pathsOf: keeps the same || defaulting. It is a module-level const that runs only inside functions, so the temporal dead zone is not a concern.
    • The nine *FromBase readers: they now call configFromBase, which does the same loadConfig(filesUnderBase(basePath, configPath), { configPath }) call with the default readRules, as each reader did before.
    • issuesByStatus: hoisting statusField out of the node loop is safe because config does not change inside the loop. Computing labelled eagerly cannot throw, since labels has already been filtered to strings.
  • issue-status.mjs:
    • fieldId is now read before the unmapped closure that uses it. The value is the same, and the closure only runs later.
    • disagree had a single call site on the fieldSetters path, and the inlined copy runs at the same point with the same condition and message.
  • dimensions.mjs / predicate.mjs: these extract pure helpers that return the same tables and predicate results.
  • Exports: no exported name was added, removed or renamed.

Closing issue criteria:

  • Only listed files edited: met. All 4 files are on the issue's list.
  • Size limit: met. The diff is about 109 changed lines over 4 files, within the 400-line, 15-file limit.
  • ci-status green: not checked here. The author says the node --test suites were not run and leaves them to CI.
  • Behavior unchanged: met by my reading of the diff. The existing resolve-config/*.test.mjs suites in CI are what would catch a regression.

The PR body's verification (check-changelog-fragments, check-changed-skills, check-affected, the fresh-context subagent review) is the author's claim, and I did not verify it. The PR context file held no embedded instructions aimed at this lane.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The unattended merge path armed native auto-merge at head 7165413c5db5c1fc52019e8322d8306713c77316, the head its arming checks judged.

@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

Verification evidence for 7165413

The verifier passed this head. The capture artifact holds the capture summary, which says whether the capture ran, and any screenshot or video that passed the mask check; this comment uploads no file.

Capture artifact: pr-capture-14189-7165413c5db5c1fc52019e8322d8306713c77316, expires on 2026-12-08.

One comment per pull request, updated in place for each new head.

@melodic-automation-lanes
melodic-automation-lanes Bot added this pull request to the merge queue Nov 8, 2026
Merged via the queue into main with commit a2dda62 Nov 8, 2026
66 checks passed
@melodic-automation-lanes
melodic-automation-lanes Bot deleted the work-resolve-issue/issue-14099-42507389025-1 branch November 8, 2026 18:34
@melodic-automation-lanes

Copy link
Copy Markdown
Contributor Author

The post-merge check verified merge commit a2dda6241db743e5ab962811ec3240fd2f8f7127; later checks count it verified from this comment.

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.

Simplify .github: resolve-config

0 participants