These packages are still imported by the CLI. Reverting the premature
extraction so forge consumers can resolve them.
Co-Authored-By: Virgil <virgil@lethean.io>
The git/ package was extracted to the standalone core/go-git repo.
No remaining packages import it. Three packages remain: forge/,
gitea/, collect/.
Co-Authored-By: Virgil <virgil@lethean.io>
Both packages now live in forge.lthn.ai/core/go-agent as a unified
agent orchestration repo. go-scm retains collect/, forge/, git/, gitea/.
Co-Authored-By: Virgil <virgil@lethean.io>
Replace hardcoded "new" target branch with a lookup against the
Forgejo API for the repository's default branch, falling back to
"main" if the API call fails.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace internal task tracking (TODO.md, FINDINGS.md) with structured
documentation in docs/. Trim CLAUDE.md to agent instructions only.
Co-Authored-By: Virgil <virgil@lethean.io>
Extends Phase 3 forgejo source tests with 9 additional scenarios:
multi-epic with multiple children, combined status fetch error
fallback to PENDING, mixed repos with partial failure, Report
comment body format (table-driven), Report posting to correct
epic issue, signal field completeness, all-children-checked
producing zero signals, and NeedsCoding signal field population.
Co-Authored-By: Charon <developers@lethean.io>
- 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>
Add tests for Service lifecycle: NewService factory, OnStartup, and all
handleQuery/handleTask paths (QueryStatus, QueryDirtyRepos,
QueryAheadRepos, TaskPush, TaskPull, TaskPushMultiple, unknown types).
Add integration tests for Push with a real bare remote (push succeeds,
ahead count drops to zero), PushMultiple with multiple paths, empty
paths, and ahead/behind with no upstream tracking branch.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add unit tests for all signal mapping functions (mapPRState, mapMergeable,
mapCombinedStatus with all branches including nil, zero count, error
state). Add tests for parseEpicChildren (all checked, all unchecked,
no checkboxes), findLinkedPR (found, not found, nil), buildSignal
(with and without head SHA), splitRepo table-driven tests.
Add Poll integration tests: multiple repos, NeedsCoding with assignee,
merged PR, no head SHA (PENDING status), API errors (graceful skip),
empty repos list, non-epic issues filtered. Add Report tests: nil
result, failed result with error message.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add HTTP mock tests for BitcoinTalk (fetchPage, Collect with server),
papers (IACR HTML parsing, arXiv XML parsing, PaperSourceAll), market
(historical with FromDate, invalid date, server errors), process
(ordered lists, blockquotes, h4-h6, nested objects, cancelled context),
excavate (resume skips completed, progress events), and state (copy
safety, cursor round-trip, null JSON).
Uses httptest.Server with rewriteTransport to intercept external HTTP
calls without touching the production code.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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>