
Victor CasadoandClaude Sonnet 4.6
d4486a7a29
refactor: apply code-review findings to github-native coordination
scripts/github-coordination.js:
- parseArgs: replace 13-entry if/else chain with BOOL_FLAGS/VALUE_FLAGS
lookup maps; shrinks from 119 to ~45 lines
- Extract dispatchCommand(options, ctx) and formatOutput(payload, options)
from main(); main() shrinks to ~20 lines
scripts/lib/github-coordination.js:
- Split 1041-line monolith into 6 focused sub-modules under
scripts/lib/github-coordination/ (policy, parsing, gh-api, state,
actions, store); index becomes a thin re-export (~55 lines)
- Document ECC_GH_SHIM trust boundary in runGh() (gh-api.js)
- Document applyClaim() read→check→write race condition (actions.js)
tests/lib/github-coordination.test.js:
- Refactor runTests() to data-driven DESCRIPTORS array + runGroup()
helper; runTests() shrinks to ~10 lines
- Add 5 new edge-case tests: normalizeRepo('') and normalizeRepo(' ')
throw, desiredLabelsForState for blocked/ready statuses, and
buildIssueStateFromAction for validate action (15 → 20 tests)
tests/scripts/github-coordination.test.js:
- Replace console.log in test runner with process.stdout.write
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-11 14:05:42 -04:00
..
2026-06-04 21:45:13 +08:00
2026-06-11 14:05:42 -04:00
2026-06-07 13:26:11 +08:00
2026-05-25 14:07:52 -04:00
2026-06-07 13:00:08 +08:00
2026-06-07 13:00:08 +08:00
2026-03-16 14:01:41 -07:00
2026-04-01 16:09:54 -07:00
2026-05-11 12:24:12 -04:00
2026-06-07 13:00:08 +08:00
2026-03-20 03:53:22 -07:00
2026-06-07 13:27:00 +08:00
2026-05-11 23:44:06 -04:00
2026-04-30 02:19:57 -04:00
2026-05-11 02:53:28 -04:00
2026-06-11 14:05:42 -04:00
2026-05-17 20:32:09 -04:00
2026-05-17 07:06:49 -04:00
2026-03-04 14:48:06 -08:00
2026-03-20 01:38:13 -07:00
2026-06-07 13:27:00 +08:00
2026-03-28 11:28:12 +08:00
2026-06-07 13:26:14 +08:00
2026-03-15 21:47:31 -07:00
2026-04-05 14:37:28 -07:00
2026-05-11 03:35:42 -04:00
2026-03-14 12:55:25 -07:00
2026-02-12 15:57:20 -08:00
2026-02-18 08:06:25 +00:00
2026-06-07 13:25:34 +08:00
2026-05-19 05:15:42 -04:00
2026-03-11 10:45:28 +09:00
2026-06-07 13:27:00 +08:00
2026-06-07 13:27:00 +08:00
2026-05-19 04:57:10 -04:00
2026-03-24 23:08:27 -04:00
2026-03-25 04:00:50 -04:00
2026-03-07 14:47:49 -08:00
2026-05-15 01:39:15 -04:00
2026-03-18 03:03:31 -07:00
2026-06-07 13:27:00 +08:00
2026-06-07 13:27:00 +08:00