No description
Find a file
Snider f3dd8ca0f0 fix(review): address CodeRabbit PR #2 findings
Critical/Major:
- Remove dead functions syncRepoNameFromArg and repoNameFromArg (used url pkg without import, would cause compile error)
- Migrate forge.lthn.ai/core/config → dappco.re/go/core/config in forge/config.go and gitea/config.go
- Propagate ListIssueCommentsIter errors in forge/meta.go and gitea/meta.go (was silently returning truncated count)
- Add RedactedToken() to gitea/client.go to avoid exposing raw API tokens
- Add 30s timeout to http.DefaultClient usage in gitea/prs.go via package-level httpClient
- Fix stringsx.Fields (bufio 64KiB limit), Repeat (wrong for negative/zero), Replace (ignored n param) to match stdlib
- Fix fmtx.Println to use fmt.Sprintln so spaces appear between operands
- Fix filepathx.Abs to use path/filepath for OS-aware path handling; wrap Getwd error
- Fix stdio.Write to return io.ErrShortWrite on partial writes
- Add mutex lock to jobrunner.Journal.Query to prevent data race with Append
- Add sync.RWMutex to ScmProvider; protect p.index reads/writes in pkg/api/provider.go
- Fix cmd/scm/cmd_index.go: append dir to repoPaths only after ReadDir confirms existence
- Fix manifest/compile.go: copy manifest before applying version override to avoid mutating caller
- Fix forge/labels.go: use ListOrgLabelsIter/ListRepoLabelsIter names in iterator error logs
- Wrap single-segment validation error in syncutil.ParseRepoName with function context

Minor:
- Fix import ordering (stdlib → forge.lthn.ai → third-party) in cmd/forge, cmd/collect, repos, cmd/gitea files
- Add t.Setenv("HOME", t.TempDir()) to gitea testhelpers and forge/labels_test.go
- Add iterator yield guard in forge/orgs_test.go
- Convert syncutil/repo_name_test.go to table-driven tests
- Use json.Marshal in pkg/api/provider_test.go instead of string concatenation
- Fix test naming (redundant/conflicting _Good/_Bad suffixes) across 10 test files

Co-Authored-By: Virgil <virgil@lethean.io>
2026-04-07 09:25:42 +01:00
.core chore: add .core/ build and release configs 2026-03-06 18:52:37 +00:00
.forgejo/workflows ci: add Forgejo Actions test and security scan workflows 2026-02-23 03:28:08 +00:00
agentci feat(agentci): honour validation threshold in weave 2026-04-02 13:26:35 +00:00
cmd fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
collect fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
docs Merge github/main into dev — resolve module path conflicts 2026-04-07 08:42:34 +01:00
forge fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
git chore(ax): add usage docs to exported APIs 2026-03-30 14:11:15 +00:00
gitea fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
internal/ax fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
jobrunner fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
locales chore(ax): gofmt exported declaration comments 2026-03-30 05:44:09 +00:00
manifest fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
marketplace fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
pkg/api fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
plugin fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
repos fix(review): address CodeRabbit PR #2 findings 2026-04-07 09:25:42 +01:00
ui feat(ui): polish scm agent views 2026-04-02 07:04:25 +00:00
.editorconfig chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:47 +00:00
.gitignore chore: add .core/ and .idea/ to .gitignore 2026-03-15 10:17:50 +00:00
.golangci.yml chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:47 +00:00
CLAUDE.md chore: migrate to dappco.re vanity import path 2026-03-21 23:54:23 +00:00
CONTRIBUTING.md chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig) 2026-02-23 06:45:47 +00:00
go.mod fix: migrate module paths from forge.lthn.ai to dappco.re 2026-04-04 16:21:13 +01:00
README.md chore: migrate to dappco.re vanity import path 2026-03-21 23:54:23 +00:00

Go Reference License: EUPL-1.2 Go Version

go-scm

SCM integration, AgentCI dispatch automation, and data collection for the Lethean ecosystem. Provides a Forgejo API client and a Gitea client for the public mirror, multi-repo git operations with parallel status checks, the Clotho Protocol orchestrator for dual-run agent verification, a PR automation pipeline (poll → dispatch → journal) driven by epic issue task lists, and pluggable data collectors for BitcoinTalk, GitHub, market data, and research papers.

Module: dappco.re/go/core/scm Licence: EUPL-1.2 Language: Go 1.25

Quick Start

import (
    "dappco.re/go/core/scm/forge"
    "dappco.re/go/core/scm/git"
    "dappco.re/go/core/scm/jobrunner"
)

// Forgejo client
client, err := forge.NewFromConfig("", "")

// Multi-repo status
statuses := git.Status(ctx, git.StatusOptions{Paths: repoPaths})

// AgentCI dispatch loop
poller := jobrunner.NewPoller(jobrunner.PollerConfig{
    Sources:      []jobrunner.JobSource{forgejoSrc},
    Handlers:     []jobrunner.JobHandler{dispatch, tickParent},
    PollInterval: 60 * time.Second,
})
poller.Run(ctx)

Documentation

Build & Test

go test ./...
go test -race ./...
go build ./...

Licence

European Union Public Licence 1.2 — see LICENCE for details.