Commit graph

765 commits

Author SHA1 Message Date
Athena
69b236e5c7 fix(bugseti): add mutex protection to seeder concurrent access
Add sync.Mutex to SeederService to protect shared state during
concurrent SeedIssue, GetWorkspaceDir, and CleanupWorkspace calls.
Extract getWorkspaceDir as lock-free helper to avoid double-locking.

Closes #63

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Athena
251ce85f20 fix(bugseti): handle silent git fetch failure in submit.go
Capture and log the error from `git fetch origin` in createBranch()
instead of silently ignoring it. Warns the user they may be proceeding
with stale data if the fetch fails.

Fixes #62

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Athena
ded85b081f fix(bugseti): add gh CLI availability check with helpful error
Adds a startup check that verifies gh is in PATH and authenticated
before initializing services. Provides clear install/auth instructions
on failure instead of cryptic exec errors at runtime.

Closes #61

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Athena
fd8360cda8 fix(bugseti): add comprehensive tests for FetcherService (#60)
Add fetcher_test.go covering: service creation, start/pause lifecycle,
calculatePriority scoring for all label types, label query construction
with custom and default labels, gh CLI JSON parsing for both list and
single-issue endpoints, channel backpressure when issuesCh is full,
fetchAll with no repos configured, and missing binary error handling.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Claude (M3 Studio)
a3892209c3 fix(bugseti): add TTL cleanup and max size cap to workspace map (#55)
The workspaces map in WorkspaceService grew unboundedly. Add cleanup()
that evicts entries older than 24h and enforces a 100-entry cap by
removing oldest entries first. Called on each Capture().

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Claude (M3 Studio)
3af5ce687c fix(bugseti): acquire mutex in NewQueueService before load()
q.load() accesses shared state (issues, seen, current) without holding
the mutex, creating a race condition. Wrap the call with q.mu.Lock().

Fixes #52

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 05:53:52 +00:00
Claude
d5771ed817 feat(ethics-ab): LEK-1 ethics kernel A/B testing and LoRA POC
Five-phase ethics kernel testing across 4 local models (Gemma 3 12B,
Mistral 7B, DeepSeek V2 16B, Qwen 2.5 7B) proving that Google's
alignment training creates persistent ethical reasoning pathways in
Gemma that survive distillation.

- Phase 1: LEK-1 signed vs unsigned (Gemma 8.8/10 differential)
- Phase 2: Three-way test (unsigned vs LEK-1 vs Axioms of Life)
- Phase 3: Double-signed/sandwich signing mode comparison
- Phase 4: Multilingual filter mapping (EN/RU/CN bypass vectors)
- Phase 5: Hypnos POC training data + MLX LoRA on M3 Ultra

Key findings: sandwich signing optimal for training, DeepSeek CCP
alignment is weight-level (no prompt override), Russian language
bypasses DeepSeek content filters. LoRA POC mechanism confirmed
with 40 examples — needs 200+ for stable generalisation.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 09:50:08 +00:00
3473d5729e Merge pull request 'feat(agentci): Clotho orchestrator, rate limiting, and security hardening' (#49) from feat/agentci-packaging into new 2026-02-10 03:08:36 +00:00
Claude
e0619280fb fix(agentci): resolve agents by Forgejo username, not config key
Adds FindByForgejoUser() to Spinner so dispatch matches issues
assigned to Forgejo users (Virgil, Claude, Charon) even when the
agent config key differs (e.g. Hypnos → forgejo_user: Claude).

Searches config key first (direct match), then ForgejoUser field.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:17 +00:00
Claude
886c67e560 feat(agentci): rate limiting and native Go dispatch runner
Adds pkg/ratelimit for Gemini API rate limiting with sliding window
(RPM/TPM/RPD), persistent state, and token counting. Replaces the
bash agent-runner.sh with a native Go implementation under
`core ai dispatch {run,watch,status}` for local queue processing.

Rate limiting:
- Per-model quotas (RPM, TPM, RPD) with 1-minute sliding window
- WaitForCapacity blocks until capacity available or context cancelled
- Persistent state in ~/.core/ratelimits.yaml
- Default quotas for Gemini 3 Pro/Flash, 2.5 Pro, 2.0 Flash/Lite
- CountTokens helper calls Google tokenizer API
- CLI: core ai ratelimits {show,reset,count,config,check}

Dispatch runner:
- core ai dispatch run — process single ticket from queue
- core ai dispatch watch — daemon mode with configurable interval
- core ai dispatch status — show queue/active/done counts
- Supports claude/codex/gemini runners with rate-limited Gemini
- File-based locking with stale PID detection
- Completion handler updates issue labels on success/failure

Closes #42

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
Claude
15c3c96fbb feat(agentci): Clotho orchestrator and security hardening
Adds the Clotho dual-run verification system and hardens the entire
agent dispatch pipeline against command injection, token exposure,
and SSH MitM attacks. Breaks the agentci→handlers circular dependency.

Security:
- SanitizePath (regex whitelist + filepath.Base) for all dispatch inputs
- EscapeShellArg for shell argument safety
- SecureSSHCommand (StrictHostKeyChecking=yes, BatchMode=yes)
- ForgeToken removed from ticket JSON, transferred via .env with 0600
- ssh-keyscan on agent add populates known_hosts before first connection

Clotho:
- Spinner orchestrator determines Standard vs Dual execution mode
- Config-driven via ClothoConfig (strategy, validation_threshold)
- Agent runner supports claude/codex/gemini backends with dual-run
- Divergence detection compares thread outputs via git diff

API:
- LoadActiveAgents() returns map[string]AgentConfig (no handlers import)
- LoadClothoConfig() reads clotho section from config
- Forge helpers: AssignIssue, EnsureLabel, AddIssueLabels

32 tests pass (19 agentci + 13 dispatch).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:08:16 +00:00
Claude
294f7814ed feat(agentci): add tests and Gemini 3 tiered batch pipeline
- Add 15 tests for pkg/agentci/config.go (load, save, remove, list, round-trip)
- Extend dispatch_test.go from 4 to 12 tests (match edge cases, ticket JSON
  serialization, model/runner variants, execute error paths)
- Add gemini-batch-runner.sh: rate-limit-aware tiered pipeline using
  Flash Lite → Gemini 3 Flash → Gemini 3 Pro with 80% TPM safety margin
- Generate docs/pkg-batch{1-6}-analysis.md covering all 33 packages
  using ~893K tokens total (vs 5.54M single-shot), zero rate limit hits

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 03:07:52 +00:00
Virgil
63cbe74932 Merge pull request 'feat(agentci): package dispatch for multi-agent deployment' (#39) from feat/agentci-packaging into new 2026-02-09 11:25:48 +00:00
Snider
b72ac61698 fix(agentci): use log.E() error pattern, add Charm SSH TODOs
Replace fmt.Errorf() with structured log.E() errors in agentci, forge,
jobrunner packages. Update PipelineSignal comment to reflect dispatch
fields. Add TODO markers for charmbracelet/ssh migration across all
exec ssh call sites.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 11:15:11 +00:00
Claude
ac587b0c53 feat(agentci): add gemini runner backend
Support gemini -p -y (non-interactive yolo mode) alongside claude
and codex runners. Three AI backends for different cost profiles.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:14:17 +00:00
Claude
82cb877121 fix(agentci): correct codex exec flags for v0.98
Use `codex exec --full-auto` instead of `--approval-mode full-auto`.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 11:02:41 +00:00
Claude
eaed083f9d feat(agentci): add model/runner fields for multi-backend support
Tickets now carry model (sonnet/haiku/opus) and runner (claude/codex)
fields. agent-runner.sh dispatches to the right backend. Defaults to
claude with sonnet model for cost efficiency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:58:46 +00:00
Virgil
199e8f0294 Merge pull request 'fix(tray): replace placeholder icons with actual bug and diamond icons' (#40) from fix/tray-icons into new 2026-02-09 10:40:09 +00:00
Snider
ac19c682b4 fix(tray): replace placeholder icons with actual bug and diamond icons
BugSETI: bug with antennae and legs (black template, white dark, green app)
Core IDE: diamond shape (black template, white dark, blue app)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 10:39:50 +00:00
Claude
d9f3b726f2 feat(agentci): package dispatch system for multi-agent deployment
Config-driven agent targets replace hardcoded map so new agents
can be added via CLI instead of recompiling. Includes setup script
for bootstrapping agent machines and CLI commands for management.

- Add pkg/agentci with config types and CRUD (LoadAgents, SaveAgent, etc.)
- Add CLI: core ai agent {add,list,status,logs,setup,remove}
- Add scripts/agent-setup.sh (SSH bootstrap: dirs, cron, prereq check)
- Headless loads agents from ~/.core/config.yaml
- Dispatch ticket includes forgejo_user for dynamic clone URLs
- agent-runner.sh reads username from ticket JSON, not hardcoded

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:36:23 +00:00
Virgil
03a9640f05 Merge pull request 'feat(bugseti): wire BugSETI into root build system and ship v0.1.0' (#38) from feat/bugseti-launch into new 2026-02-09 10:28:37 +00:00
Snider
c535c5ad2f Merge branch 'new' of https://forge.lthn.ai/host-uk/core into new 2026-02-09 10:24:27 +00:00
Snider
76c731ffb9 chore(bugseti): disable Angular CLI analytics
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 10:24:22 +00:00
Claude
849695fe39 feat(jobrunner): add agent dispatch handler and queue runner
Dispatch handler matches child issues that need coding (no PR yet,
assigned to a known agent) and SCPs ticket JSON to the agent's
queue directory via SSH. Includes dedup across queue/active/done
and posts dispatch comments on issues.

- Extend PipelineSignal with NeedsCoding, Assignee, IssueTitle, IssueBody
- Extend ForgejoSource to emit signals for unstarted children
- Add DispatchHandler with Match/Execute (SCP ticket delivery)
- Add agent-runner.sh cron-based queue runner for agent machines
- Wire dispatch handler into headless mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 10:10:08 +00:00
Snider
1b2866fc17 feat(bugseti): wire BugSETI into root build system and make functional
- Add bugseti:dev, bugseti:build, bugseti:frontend tasks to root Taskfile
- Update Wails v3 config to current dev_mode format (root_path, executes)
- Raise Angular component CSS budget to 6KB (inline styles by design)
- Fix vanity-import Dockerfile typo (---FROM → FROM)
- Verify: Go compiles, tests pass, frontend builds clean, binary runs

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 02:49:01 +00:00
Snider
a668c5ab5a fix(core-ide): use path-based routing for multi-window SPA, clean up formatting
Switch Angular from hash-based to path-based routing so each Wails window
(/tray, /main, /settings) loads its correct route. Archive GitHub Actions
workflows to .gh-actions/, update Forgejo deploy registry to dappco.re/osi,
and apply gofmt/alignment fixes across packages.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-09 01:50:57 +00:00
Snider
0fb9de600d updates 2026-02-09 01:27:40 +00:00
Claude
d32c51d816 feat(jobrunner): port from GitHub to Forgejo using pkg/forge
Replace all GitHub API and gh CLI dependencies with Forgejo SDK via
pkg/forge. The bash dispatcher burned a week of credit in a day due to
bugs — the jobrunner now talks directly to Forgejo.

- Add forge client methods: CreateIssueComment, CloseIssue, MergePullRequest,
  SetPRDraft, ListPRReviews, GetCombinedStatus, DismissReview
- Create ForgejoSource implementing JobSource (epic polling, checklist
  parsing, commit status via combined status API)
- Rewrite all 5 handlers to accept *forge.Client instead of shelling out
- Replace ResolveThreadsHandler with DismissReviewsHandler (Forgejo has
  no thread resolution API — dismiss stale REQUEST_CHANGES reviews instead)
- Delete pkg/jobrunner/github/ and handlers/exec.go entirely
- Update internal/core-ide/headless.go to wire Forgejo source and handlers
- All 33 tests pass with mock Forgejo HTTP servers

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:40:49 +00:00
77adc533fc Merge pull request 'codex/bugseti-mcp' (#36) from codex/bugseti-mcp into new
Reviewed-on: host-uk/core#36
2026-02-08 23:16:41 +00:00
6010931500 Merge branch 'new' into codex/bugseti-mcp 2026-02-08 23:15:35 +00:00
Snider
c494c7b998 feat(core-ide): add MCP bridge (SERVER) and Claude bridge (CLIENT)
SERVER bridge (mcp_bridge.go):
- HTTP server on :9877 exposing 24 MCP tools
- Window management: list, get, position, size, bounds, maximize,
  minimize, restore, focus, visibility, title, fullscreen, create, close
- Webview: eval JS, navigate, list
- System: clipboard read/write, tray control
- Endpoints: /mcp, /mcp/tools, /mcp/call, /health, /ws, /claude

CLIENT bridge (claude_bridge.go):
- WebSocket relay between GUI clients and MCP core on :9876
- Auto-reconnect with backoff
- Bidirectional message forwarding (claude_message type)

Moved HTTP server from IDEService to MCPBridge for unified endpoint.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 23:12:51 +00:00
Snider
dd017288e7 fix(tray-apps): SPA routing, TypeScript fixes, and deferred onboarding
- Add spaHandler() to both BugSETI and Core IDE for Angular client-side
  routing (AssetFileServerFS doesn't fallback to index.html)
- Fix jellyfin.component.ts sanitizer initialization order (both apps)
- Fix chat.component.ts Event/KeyboardEvent type mismatch
- Defer onboarding window to ApplicationStarted event hook

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 23:03:49 +00:00
Snider
5c3b70a1eb fix: resolve conflict markers and remove legacy code after branch consolidation
- Remove conflict markers from 19 files that were accidentally committed
  during merge resolutions (keeping HEAD versions)
- Remove legacy root-level code (core.go, main.go, config/, crypt/,
  display/, filesystem/, workspace/, docs/*.go, cmd/app/) from old
  architecture predating pkg/ restructure
- Remove duplicate pkg/config/loader.go (Load/Save already in config.go)
- Fix import alias in cmd_apply.go (errors -> core)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-08 22:08:35 +00:00
Snider
686b876749 Merge branch 'refactor/core-decomposition' into new 2026-02-08 22:00:38 +00:00
Snider
44c154056f Merge branch 'audit/dependencies-185' into new 2026-02-08 22:00:38 +00:00
Snider
9fd9db8181 Merge branch 'ci/use-build-action' into new 2026-02-08 22:00:38 +00:00
Snider
295f0fca85 Merge branch 'ci/org-wide-workflows' into new 2026-02-08 22:00:38 +00:00
Snider
dac61fc428 Merge branch 'fix/windows-zip' into new 2026-02-08 22:00:30 +00:00
Snider
170da456ae Merge branch 'fix/ssh-security-13442055821003769195' into new 2026-02-08 22:00:30 +00:00
Snider
8066e6cfd7 Merge branch 'fix/release-windows-shell' into new 2026-02-08 22:00:30 +00:00
Snider
18c9f973db Merge branch 'fix/release-go-build' into new 2026-02-08 22:00:30 +00:00
Snider
8e4ab36aa4 Merge branch 'fix/release-build-path' into new 2026-02-08 22:00:30 +00:00
Snider
cbb0f9045c Merge branch 'fix/rag-formatting' into new 2026-02-08 22:00:29 +00:00
Snider
5d38a65bf1 Merge branch 'fix/pr-263-reviews' into new 2026-02-08 22:00:29 +00:00
Snider
1c029e044b Merge branch 'fix/linker-flags-226' into new 2026-02-08 22:00:29 +00:00
Snider
1cf6449602 Merge branch 'fix/homebrew-tap-auth' into new 2026-02-08 22:00:29 +00:00
Snider
f855c45fc8 Merge branch 'fix/gofmt-client' into new 2026-02-08 22:00:29 +00:00
Snider
6064c198eb Merge branch 'fix/gemini-batch' into new 2026-02-08 22:00:29 +00:00
Snider
a3147895c4 Merge branch 'fix/docstrings-exec-logger' into new 2026-02-08 22:00:29 +00:00
Snider
8225812fd2 Merge branch 'fix/disable-dev-release' into new 2026-02-08 22:00:29 +00:00