Commit graph

7 commits

Author SHA1 Message Date
Virgil
f2c9cb39d0 fix(agentci): split path sanitising and validation
Some checks are pending
Security Scan / security (push) Waiting to run
Test / test (push) Waiting to run
Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 07:09:27 +00:00
Virgil
2e188e346a feat(agentci): add context-aware ssh command helper
Some checks failed
Security Scan / security (push) Failing after 11s
Test / test (push) Successful in 2m15s
Thread dispatch SSH subprocesses through the caller context so cancellation applies to ticket transfer, remote cleanup, and existence checks.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-01 06:53:33 +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
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
Snider
10c9e23e04 fix(dx): repair build, update CLAUDE.md, add tests for untested paths
Some checks failed
Security Scan / security (pull_request) Failing after 9s
Test / test (pull_request) Successful in 1m44s
- Fix cmd/forge build failure: remove extra locales.FS arg from
  RegisterCommands (signature takes single CommandRegistration)
- Update CLAUDE.md error handling section to document coreerr.E()
  pattern (was outdated log.E/fmt.Errorf reference)
- Add security_test.go for agentci: SanitizePath, EscapeShellArg,
  SecureSSHCommand, MaskToken (coverage 56% → 68%)
- Add provider_handlers_test.go for pkg/api: category filter, nil
  guards, manifest/verify/sign bad requests (coverage 31% → 52%)
- Audit confirms: no fmt.Errorf or os.ReadFile/WriteFile in production
  code (only in test files)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:49:55 +00:00
Snider
c95aefed94 refactor: extract agentci + jobrunner to core/go-agent
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>
2026-02-21 17:13:26 +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