Commit graph

38 commits

Author SHA1 Message Date
Virgil
a7772087ae test(conventions): harden import and test checks
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:26:45 +00:00
Virgil
af4e1d6ae2 test(conventions): enforce AX review rules
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-26 11:14:35 +00:00
7c85a9c21d Merge pull request '[agent/claude] Update go.mod require lines from forge.lthn.ai to dappco.re ...' (#4) from agent/update-go-mod-require-lines-from-forge-l into main
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 41s
2026-03-22 01:37:27 +00:00
Snider
7f2fd424cf refactor(module): migrate module paths from forge.lthn.ai to dappco.re
All checks were successful
Security Scan / security (pull_request) Successful in 12s
Test / test (pull_request) Successful in 1m18s
Update module path to dappco.re/go/core/session, dependency to
dappco.re/go/core/log v0.1.0, all Go import paths, and documentation
references. Remove duplicate test functions found during migration.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-22 01:37:11 +00:00
fb672f3b3a Merge pull request '[agent/claude:sonnet] Fix CodeRabbit findings. These are mostly markdown linting i...' (#3) from agent/fix-coderabbit-findings--these-are-mostl into main
Some checks failed
Security Scan / security (push) Successful in 8s
Test / test (push) Failing after 21s
2026-03-17 14:12:34 +00:00
Snider
73e627f0c4 fix(coderabbit): address markdown linting findings
Some checks failed
Security Scan / security (pull_request) Successful in 8s
Test / test (pull_request) Failing after 28s
- Add 'text' language specifier to fenced code blocks in RECENT.md,
  kb/Rendering.md, and specs/TASK_PROTOCOL.md
- Fix heading hierarchy in CONTEXT.md (H1→H3 jump resolved to H1→H2)

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 13:55:52 +00:00
66fbb42f3a Merge pull request '[agent/claude:opus] DX audit and fix. 1) Review CLAUDE.md — update any outdate...' (#2) from agent/dx-audit-and-fix--1--review-claude-md into main
Some checks failed
Security Scan / security (push) Successful in 8s
Test / test (push) Failing after 26s
2026-03-17 08:50:12 +00:00
Snider
7f0a7edf44 fix(dx): audit and fix error handling, SPDX headers, coverage, and CLAUDE.md
All checks were successful
Security Scan / security (pull_request) Successful in 9s
Test / test (pull_request) Successful in 40s
- Fix coreerr.E() calls missing third arg in FetchSession and RenderMP4
- Add SPDX-Licence-Identifier headers to parser.go, html.go, video.go, search.go
- Add tests for PruneSessions, IsExpired, and FetchSession (coverage 87.7% → 92.1%)
- Document coreerr.E() error handling convention in CLAUDE.md
- No fmt.Errorf or os.ReadFile/os.WriteFile violations found in source files

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:49:46 +00:00
11e3bb3bae Merge pull request '[agent/claude:opus] DX audit and fix. 1) Review CLAUDE.md — update any outdate...' (#1) from agent/dx-audit-and-fix--1--review-claude-md into main
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 28s
Reviewed-on: #1
2026-03-17 08:11:59 +00:00
Snider
c7696920e0 fix(dx): fix coreerr.E() signatures, add SPDX headers and tests
All checks were successful
Security Scan / security (pull_request) Successful in 7s
Test / test (pull_request) Successful in 1m6s
Fix two coreerr.E() calls missing the required third (error) argument,
add SPDX-Licence-Identifier headers to all source files, and add tests
for PruneSessions, IsExpired, and FetchSession (coverage 88.1% → 92.1%).

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-17 08:03:31 +00:00
Snider
55ceab4a0d refactor(error-handling): replace fmt.Errorf and errors.New with coreerr.E()
Some checks failed
Security Scan / security (push) Successful in 8s
Test / test (push) Failing after 1m8s
Replace all 8 instances of fmt.Errorf across parser.go, html.go, and video.go
with coreerr.E() from forge.lthn.ai/core/go-log for consistent error handling.
Add dependency on go-log v0.0.4.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-16 20:38:07 +00:00
Snider
a07e41a42a chore: add .core/ and .idea/ to .gitignore
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 46s
2026-03-15 10:17:50 +00:00
Snider
50d1c3ff7b docs: add CLAUDE.md project instructions
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 35s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-13 13:38:02 +00:00
Snider
bc3cc42cae docs: add human-friendly documentation
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 1m15s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 13:02:40 +00:00
Snider
ad28c85c89 fix: improve HTML escaping and modernise sort/search helpers
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 37s
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-09 08:30:01 +00:00
Snider
724d122fbe chore: add .core/ build and release configs
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 25s
Add go-devops build system configuration for standardised
build, test, and release workflows across the Go ecosystem.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 18:52:37 +00:00
Snider
6ffafd856f chore: remove boilerplate Taskfile
All checks were successful
Security Scan / security (push) Successful in 7s
Test / test (push) Successful in 1m16s
All tasks (test, build, lint, fmt, vet, cov) are handled natively
by `core go` commands. Taskfile was redundant wrapper.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-03-06 14:45:49 +00:00
Snider
53d3bd978d chore: add Go repo norms (badges, contributing, lint, taskfile, editorconfig)
All checks were successful
Security Scan / security (push) Successful in 10s
Test / test (push) Successful in 37s
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 06:45:48 +00:00
Snider
89a431c1b9 feat: modernise to Go 1.26 iterators and stdlib helpers
All checks were successful
Security Scan / security (push) Successful in 11s
Test / test (push) Successful in 1m58s
Add ListSessionsSeq, EventsSeq, SearchSeq iterators for streaming.
Use slices.SortFunc, slices.Sorted(maps.Keys()), slices.Collect
in ListSessions, Search, FormatAnalytics, extractToolInput.

Co-Authored-By: Gemini <noreply@google.com>
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-23 05:25:55 +00:00
Claude
049df373de
ci: add Forgejo Actions test and security scan workflows
Some checks failed
Security Scan / security (push) Successful in 10s
Test / test (push) Failing after 25s
Uses reusable workflows from core/go-devops for Go testing
(with race detector and coverage) and security scanning
(govulncheck, gitleaks, trivy).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-23 03:28:08 +00:00
Claude
cb7b5deda9
chore: sync workspace dependency versions
Run go work sync to align dependency versions across workspace.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-22 21:42:02 +00:00
Snider
14586940fe refactor: apply go fix modernizers for Go 1.26
Automated fixes: interface{} → any, range-over-int, t.Context(),
wg.Go(), strings.SplitSeq, strings.Builder, slices.Contains,
maps helpers, min/max builtins.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 21:00:17 +00:00
Snider
5dc4078611 chore: bump go directive to 1.26.0
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-22 20:33:48 +00:00
Snider
325fddd09c docs: add README with quick start and docs links
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 15:11:20 +00:00
Snider
91e7cdb888 Merge remote-tracking branch 'origin/main'
# Conflicts:
#	FINDINGS.md
2026-02-20 15:03:07 +00:00
Snider
3e00791c2f docs: graduate TODO/FINDINGS into production documentation
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>
2026-02-20 15:01:55 +00:00
Claude
1031905018
feat(parser): add robustness for truncated JSONL and malformed lines
Phase 1: graceful error recovery, streaming parse, skip malformed lines.

- Add ParseTranscriptReader for io.Reader-based streaming (pipes, buffers)
- Refactor to shared parseFromReader, eliminating code duplication
- Bump scanner buffer to 8 MiB for very large tool outputs
- 18 new tests: streaming, custom MCP tools, binary garbage, edge cases
- Coverage: 93.0% (up from 90.9%), 104 total tests

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 14:34:43 +00:00
Snider
8e9162631e docs: mark Phase 3 timeline UI as complete
All 4 Phase 3 items already implemented in html.go (commit 9b32678):
- RenderHTML() with dark theme, search/filter, keyboard shortcuts
- Colour-coded events by type with CSS classes
- Collapsible detail panels with toggle() JS
- Self-contained HTML export with XSS protection

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 08:34:02 +00:00
Snider
9b32678c41 docs(todo): mark Phase 1+2 complete with commit hash a6fb934
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 07:41:30 +00:00
Snider
a6fb93408b feat(parser): Phase 1+2 — parse stats, truncation detection, session analytics
Phase 1: ParseTranscript now returns (*Session, *ParseStats, error).
ParseStats tracks TotalLines, SkippedLines, OrphanedToolCalls, and
Warnings (line numbers + previews for bad JSON, orphaned tool IDs,
truncated final line detection). All call sites updated.

Phase 2: New analytics.go with Analyse() and FormatAnalytics().
SessionAnalytics computes Duration, ActiveTime, ToolCounts, ErrorCounts,
SuccessRate, AvgLatency, MaxLatency, and token estimation.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 07:40:52 +00:00
Snider
c798d9d5a6 docs: flesh out Phase 1+2 task specs for parser robustness and analytics
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 07:35:23 +00:00
Snider
ca2fd3f2ec docs(todo): update Phase 0 with commit hash f40caaa
Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 05:02:03 +00:00
Snider
f40caaa593 test: add comprehensive Phase 0 test suite — 67 tests, 90.9% coverage
Add parser_test.go (22 tests), search_test.go (9 tests), html_test.go (6 tests),
video_test.go (12 tests), and bench_test.go (4 benchmarks) covering all Phase 0
TODO items:

- ParseTranscript: minimal JSONL, all 7 tool types, errors, truncated/malformed
  input, large sessions (1100+ events), nested array/map results, mixed content
- ListSessions: empty dir, single/multi sorted, non-JSONL ignored, modtime fallback
- extractToolInput: all tool types plus nil, invalid JSON, unknown tool fallback
- extractResultContent: string, array, map, and other types
- Search: empty dir, no matches, multi-match, case insensitive, output matching
- RenderHTML: basic, empty, errors, XSS escaping, label types, invalid path
- generateTape/extractCommand: all event types, empty/failed commands, truncation
- Benchmarks: 2.2MB and 11MB ParseTranscript, ListSessions, Search with b.Loop()

go vet ./... clean, go test -race ./... clean.

Co-Authored-By: Virgil <virgil@lethean.io>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-20 05:01:28 +00:00
Claude
b620417ef0
docs(todo): mark Phase 0 tasks complete with commit hashes
Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 00:42:34 +00:00
Claude
7771e64e07
test(phase0): add comprehensive test suite — 51 tests, 90.9% coverage
Parser, HTML renderer, video/tape generator, and search function tests
with table-driven subtests and inline JSONL fixtures. Adds testify for
assertions. go vet clean.

Co-Authored-By: Charon <developers@lethean.io>
2026-02-20 00:42:11 +00:00
Snider
0dc21a21d4 docs: enrich TODO.md with Phase 0 hardening tasks
Add Phase 0: ParseTranscript tests, ListSessions tests,
tool extraction coverage, parsing benchmarks.

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-20 00:28:46 +00:00
Virgil
d29a76a443 docs: add TODO.md and FINDINGS.md for fleet delegation
Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 21:36:16 +00:00
Snider
474b0861e1 feat: extract go-session from core/go pkg/session
Session parsing, timeline generation, HTML/video rendering.
Zero external dependencies (stdlib only).
Module: forge.lthn.ai/core/go-session

Co-Authored-By: Virgil <virgil@lethean.io>
2026-02-19 16:09:12 +00:00