Commit graph

22 commits

Author SHA1 Message Date
Virgil
d852087c45 feat(forge): add org iterator
Some checks failed
Security Scan / security (push) Failing after 11s
Test / test (push) Successful in 2m16s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 08:47:55 +00:00
Virgil
b94caf0a9d feat(forge): add PR review iterator
Some checks failed
Security Scan / security (push) Failing after 11s
Test / test (push) Failing after 51s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 08:18:36 +00:00
Virgil
94c5870c46 feat(forge): add repo webhook iterator
Some checks failed
Security Scan / security (push) Failing after 13s
Test / test (push) Successful in 2m27s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 07:35:26 +00:00
Virgil
0193bd50ea feat(scm): add issue iterators
Some checks failed
Security Scan / security (push) Failing after 11s
Test / test (push) Successful in 2m18s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 07:23:21 +00:00
Virgil
8021e5e2cb fix(scm): paginate issue listings
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Successful in 2m13s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 06:47:34 +00:00
Virgil
5a53d244cc feat(forge): aggregate org labels across repos
Some checks failed
Security Scan / security (push) Failing after 9s
Test / test (push) Successful in 2m17s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 05:11:34 +00:00
Virgil
976d20c02f feat(jobrunner): resolve dispatch target branch
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Successful in 2m12s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 04:45:40 +00:00
Virgil
a0fac1341b chore(ax): add usage docs to exported APIs
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Successful in 2m11s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 14:11:15 +00:00
Virgil
dd59b177c6 chore(ax): normalise test naming and usage annotations
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Successful in 2m2s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 06:37:20 +00:00
Virgil
c42cc4a6ce chore(ax): gofmt exported declaration comments
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Successful in 2m4s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-30 05:44:09 +00:00
Virgil
305aa0da6f chore(ax): normalize SPDX header identifier
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Successful in 4m12s
2026-03-30 00:54:20 +00:00
Virgil
5f73d41184 chore(ax): add SPDX headers to remaining Go files
Some checks failed
Security Scan / security (push) Failing after 15s
Test / test (push) Failing after 29s
2026-03-30 00:19:43 +00:00
Virgil
d5f98c1341 refactor(ax): align code with AX principles
Some checks failed
Security Scan / security (push) Failing after 10s
Test / test (push) Failing after 25s
2026-03-29 23:59:48 +00:00
Claude
2dcb86738a
chore: migrate to dappco.re vanity import path
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Failing after 22s
Change module path from forge.lthn.ai/core/go-scm to dappco.re/go/core/scm.
Update all Go source imports for migrated packages:
- go-log  -> dappco.re/go/core/log
- go-io   -> dappco.re/go/core/io
- go-i18n -> dappco.re/go/core/i18n
- go-ws   -> dappco.re/go/core/ws
- api     -> dappco.re/go/core/api

Non-migrated packages (cli, config) left on forge.lthn.ai paths.
Replace directives use local paths (../go, ../go-io, etc.) until the
dappco.re vanity URL server resolves these modules.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 23:54:23 +00:00
Snider
e9fc6902b1 refactor: replace fmt.Errorf/errors.New with coreerr.E()
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Successful in 1m57s
Replace all remaining fmt.Errorf and errors.New calls in production
code with coreerr.E("caller.Method", "message", err) from go-log.
This standardises error handling across 23 files using the structured
error convention already established in the plugin package.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 20:37:25 +00:00
Snider
e7db4b163f refactor: update import path from go-config to core/config
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Failing after 1m19s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-14 10:26:01 +00:00
Snider
fa0beae5c8 feat: add manifest, marketplace, plugin, repos subpackages
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Failing after 27s
Extracted from core/go pkg/{manifest,marketplace,plugin,repos}.
Also swapped agentci/forge/gitea config imports to go-config.

These packages handle package manifests, marketplace installation,
plugin lifecycle, and multi-repo registry management.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 13:20:12 +00:00
Snider
89cedeac62 refactor: swap pkg/{io,log,i18n} imports to go-io/go-log/go-i18n
Some checks failed
Security Scan / security (push) Failing after 6s
Test / test (push) Successful in 2m4s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 12:35:42 +00:00
Snider
a315c3894e refactor: modernise to Go 1.26 — iterators, slices, maps
Some checks failed
Security Scan / security (push) Failing after 8s
Test / test (push) Failing after 23s
- Add StatusIter, DirtyReposIter, AheadReposIter on git.Service
- Add StatusIter, PushMultipleIter on git package functions
- Add ListOrgReposIter, ListUserReposIter on forge/gitea clients
- Add ListPullRequestsIter on forge/gitea clients
- Add extractIACRPapersIter, extractPostsIter iterators
- Replace manual map-key-sort with slices.Sorted(maps.Keys(...))
- Modernise range-over-int in excavate_test.go

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:23:45 +00:00
Snider
3ba8fbb8fb fix: Phase 2 — error wrapping, context audit, rate limiting review
- Standardise all fmt.Errorf calls to "package.Func: context" pattern
  across jobrunner/journal.go, agentci/config.go, agentci/security.go,
  handlers/dispatch.go, and forge/labels.go (15 bare errors fixed)
- Add SecureSSHCommandContext with context propagation for cancellable
  SSH operations; update dispatch handler to use it
- Add CheckGitHubRateLimitCtx for context-aware rate limit checking
- Document Forgejo/Gitea SDK v2 context limitation in FINDINGS.md
  (SDKs do not accept context.Context — adding ctx to 66 wrappers
  would be ceremony without real propagation)
- Review and document rate limiter: handles all edge cases, adaptive
  throttling at 75% GitHub usage, SDK header parsing not feasible

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 05:42:02 +00:00
Claude
9db37c6fb3
test: add comprehensive unit tests for forge/, gitea/, git/, agentci/
Phase 1 test coverage for the three 0% packages plus agentci/ improvement:

- git/ (0% -> 79.5%): RepoStatus methods, status parsing with real temp
  repos, multi-repo parallel status, Push/Pull error paths, ahead/behind
  with bare remote, context cancellation, GitError, IsNonFastForward,
  service DirtyRepos/AheadRepos filtering

- forge/ (0% -> 91.2%): All SDK wrapper functions tested via httptest mock
  server — client creation, repos, issues, PRs, labels, webhooks, orgs,
  meta, config resolution, SetPRDraft raw HTTP endpoint

- gitea/ (0% -> 89.2%): All SDK wrapper functions tested via httptest mock
  server — client creation, repos, issues, PRs, meta, config resolution

- agentci/ (56% -> 94.5%): Clotho DeterminePlan all code paths, security
  helpers (SanitizePath, EscapeShellArg, SecureSSHCommand, MaskToken)

Key findings documented in FINDINGS.md:
- Forgejo SDK validates token via HTTP on NewClient()
- SDK route patterns differ from public API docs (/org/ vs /orgs/)
- Gitea SDK requires auth token for GitHub mirror creation
- Config resolution priority verified: config file < env vars < flags

Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 00:59:46 +00:00
Claude
3e883f6976
feat: extract SCM/forge integration packages from core/go
Forgejo and Gitea SDK wrappers, multi-repo git utilities, AgentCI
dispatch, distributed job orchestrator, and data collection pipelines.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 15:25:58 +00:00