feat(agent/pipeline): implement pipeline/budget + pipeline/training (#536)
Replaces the #535 stubs with full impl per RFC.pipeline.md.
Lands:
* pkg/agentic/pipeline_budget.go (extend) — budget/plan reads pool/rate
config, counts logged dispatches from .core/db.duckdb (JSONL fallback),
prints per-pool remaining budget. budget/log appends to
.core/journal/dispatch.jsonl + mirrors to state store.
* pkg/agentic/pipeline_training.go (extend) — training/capture pulls PR
meta via MetaReader, captures PR diff via Forge PR-diff endpoint with
`git show` fallback, records structural CodeRabbit-equivalent finding
counts from review-thread totals, appends to .core/training/journal.jsonl.
training/stats aggregates totals + zero-finding counts by repo.
training/export filters to zero-finding entries → .core/training/export.jsonl
(clean LEM training data).
* pkg/agentic/training_journal.go (NEW) — shared journal helpers
* AX-10 tests replace stubs (pipeline_budget_test.go +
pipeline_training_test.go)
* tests/cli/pipeline/Taskfile.yaml — end-to-end smoke covers all 5
subcommands against isolated temp workspace + local Forge stub
LEM training data pipeline now feedable: merged PRs → training/capture
→ journal.jsonl → training/export (zero-finding filter) → ready for next
LEK iteration.
Sandbox blocked from go test by go.work + private-dep resolution;
gofmt clean. Forge PR diff endpoint shape verified against Gitea API
docs (1.19).
Co-authored-by: Codex <noreply@openai.com>
Closes tasks.lthn.sh/view.php?id=536