Skip to content

feat: merge github-authorization-integration — construction complete - #93

Merged
MichielDean merged 1 commit into
mainfrom
feature/github-authorization-integration
Jul 25, 2026
Merged

MichielDean merged 1 commit into
mainfrom
feature/github-authorization-integration

Conversation

@MichielDean

Copy link
Copy Markdown
Owner

Auto-merged from devteam construction phase for feature github-authorization-integration

@MichielDean
MichielDean force-pushed the feature/github-authorization-integration branch 5 times, most recently from fc9e83c to 8d56da7 Compare July 25, 2026 20:17
Add native GitHub App authentication, repo discovery, branch/PR ops,
merge-conflict detection, encrypted credential store, per-repo settings,
audit redaction, and the setup runbook — without gh CLI as a hard runtime
dependency.

New package internal/github/ (ADR-01): the sole GitHub-API boundary.
- GitHubClient interface + domain types (U-01, ADR-04)
- NativeClient: go-github + JWT mint + installation-token cache + PAT fallback (U-02)
- GhCLIClient: byte-identical legacy gh-shelling fallback adapter (U-03, ADR-03)
- Credstore: AES-256-GCM at rest, master key from env-pointed file (U-06, C-04)
- ListRepositories + SettingsReader (U-04, ADR-13)
- CreateBranch/CreatePR/ReadyPR/CommentPR via NativeClient (U-08, ADR-05)
- GetMergeableState poll-with-backoff, bounded (U-09, ADR-07, NFR-PERF-02)
- redactTokenURLs + typed AuthError (U-11, ADR-12, CR-03)

Migrations 018/019/020 (additive, forward-only):
- credentials table (AES-GCM ciphertext + nonce + fingerprint)
- repo_registry (+ managed column per F3 amendment) + repo_settings (MVP fields)
- audit_events.credential_touched column + index (FR-AUDIT-01)

Refactor internal/gitops/client.go (U-05, ADR-14): PR methods delegate to
injected GitHubClient; legacy string-based signatures preserved (C-01).
SSH/git-transport methods unchanged (C-02, FR-PR-06).

Pipeline wiring (FR-IFACE-06): config github: block → NewClient factory →
injection at the three NewGitClient sites. Auth-health check at startup
(main.go) + phase transitions (stage_runner.go, ADR-15).

Config (config.go): GitHubConfig struct + load-time validation
(token_cache_ttl < 60m, poll bounds ceilings, required fields).

CLI: devteam auth health/rotate-key/store-pat, devteam repo list/set/manage
(interaction-spec §3, exit codes 0/1/2).

Runbook: docs/github-app-setup.md (§1..§12, U-12, FR-RUNBOOK-01/02).

Build invariant test (ADR-18): internal/github/ sole importer of go-github
+ oauth2; NativeClient files have no os/exec (NFR-PORT-02).

All existing tests green; 3 new migrations applied to the devteam DB.
@MichielDean
MichielDean force-pushed the feature/github-authorization-integration branch from 8d56da7 to c27df7d Compare July 25, 2026 20:25
@MichielDean
MichielDean merged commit 4b950d8 into main Jul 25, 2026
8 of 12 checks passed
MichielDean added a commit that referenced this pull request Jul 26, 2026
## Summary
Enforces the 4-level testing mandate on recently merged features:
- **E2E**: `providers.spec.ts` covers `AdminProvidersPage`
(multi-provider-llm feature) — page renders, effect-timing banner,
operator section, tier matrix, role overrides, navigation
- **Smoke**: `smoke_test.go` verifies server starts on a random port and
key API endpoints respond (features, repos, settings/defaults,
config/providers)

## Why
Audit of the 5 merged features (#90, #93, #94, #95) showed:
- Unit tests: 543 — good
- Integration tests: handler-level httptest tests — good
- E2E tests: admin.spec.ts covered settings/admin-ui but NOT
multi-provider-llm or github-auth
- Smoke tests: no dedicated smoke test verifying server starts and
responds

This PR closes the e2e and smoke gaps.

Co-authored-by: Lobsterdog Contributors <noreply@lobsterdog.dev>
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.

1 participant