Refactor: strict singleton architecture for TypeScript actions (gforce-gha-src) - #9
Open
gambe94 wants to merge 16 commits into
Open
Refactor: strict singleton architecture for TypeScript actions (gforce-gha-src)#9gambe94 wants to merge 16 commits into
gambe94 wants to merge 16 commits into
Conversation
…github-actions Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…arget validation Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…es/github-actions
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…before dry-run exit) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…utils (Phase 0) Scaffold the strict singleton architecture tree per the 2026-07-14 design spec: clients/github (branches + pull-requests sub-clients, GitHubClient facade, non-singleton core helpers with one shared Octokit), LoggerService, GithubContextService, utils, and the mirrored __tests__ suite (82 tests, 100% coverage, 95% gate). Old packages/* untouched; full repo gate green. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…(Phase 1) Validator + Orchestrator under gforce-gha-src/actions/sync-branches, BranchSyncService holding the sync ladder (throw-based errors, discriminated outcomes), spec-shaped entry at .github/actions/sync-branches/index.ts with a per-action package (esbuild bundle replaces ncc for this action). Tests moved to the new conventions incl. an end-to-end integration suite. Old packages/* sync-branches code removed; action.yml interface unchanged. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ure (Phase 2) Validator + Orchestrator under gforce-gha-src/actions/create-release-pr, ReleasePrService owning body templating and the create/update/labels/reviewers workflow, spec-shaped entry + esbuild bundle. Tests rewritten to the new conventions incl. end-to-end integration. Old packages/* create-release-pr code removed; core's transitional coverage gate relaxed pending Phase 4 teardown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…(Phase 3) Validator + Orchestrator under gforce-gha-src/actions/sf-find-tests; the Salesforce logic moves to libraries/salesforce (ApexTestSelectionService, pure selectors, package.xml member parsing) over a new generic FileSystemService. Spec-shaped entry + esbuild bundle; fixtures moved into gforce-gha-src integration tests. The emptied packages/github-actions adapter workspace is removed; gforce-gha-src sits at 100% coverage on every metric. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…se 4) Delete the dismantled packages/core and packages/github-actions-runtime workspaces (all logic now lives in gforce-gha-src), drop ncc, retarget the pre-commit bundle rebuild + root tsconfig + .gitignore, point CI coverage upload and the sf-find-tests smoke fixtures at the new tree, and rewrite docs/architecture.md, docs/typescript-action-authoring.md, README, and CLAUDE.md for the strict singleton architecture. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates all three TypeScript actions (
sync-branches,create-release-pr,sf-find-tests) to a strict, class-based, singleton, MVC-style architecture. Design record:docs/superpowers/specs/2026-07-14-strict-singleton-actions-architecture-design.md.gforce-gha-src/is the single source of truth: per-actionOrchestrator+Validatorsingletons,clients/github/(branches + pull-requests sub-clients behind aGitHubClientfacade over one shared Octokit), shared services (BranchSyncService,ReleasePrService,LoggerService,FileSystemService,GithubContextService), andlibraries/salesforce/(Apex test selection over pure selectors)..github/actions/<name>/now holds a zero-logicindex.tsentry, a per-action package (esbuild replaces ncc), and the committeddist/index.js.packages/*(core, runtime, adapters) are deleted — logic, tests, and fixtures all moved.method_scenario_expectedResult+ Given/When/Then with singleton-boundary mocking: 164 unit + 8 integration tests, 100% coverage on every metric (95% gate).dist:verify, and all docs updated for the new layout.Behavior
Every
action.ymlinterface (inputs, outputs,dry-run: truedefaults) is unchanged — consumers never notice. The CI smoke job executes each action from its committed bundle to prove it.Validation
npm run all(format + lint + typecheck + bundle + test + dist:verify) green after every phase commit🤖 Generated with Claude Code