Complete SOW-0049 Opencode complexity reduction#60
Merged
Conversation
Reduce Opencode adapter complexity, add deterministic scan and tail benchmarks, harden read-only SQLite source handling, and align source identity and cursor guards.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 220 |
| Duplication | 28 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
No issues found across 48 files
Tip: cubic can generate docs of your entire codebase and keep them up to date. Try it here.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Validation
./scripts/gates.shpassed locally.git diff --check && git diff --cached --checkpassed.scripts/spec-drift.shpassed.scripts/scan-secrets.shpassed.Summary by cubic
Completes SOW-0049 by simplifying the
opencodeadapter and hardening its read‑only SQLite handling. Adds deterministicScan/Tailbenchmarks and raises the performance gate to 11 required benchmarks.opencode: split complex paths into helpers (batch collection, row handlers, WAL watcher, LLM op close) for clearer control flow and fewer branches.TargetHash; scan/tail now guard against DB target changes and reset watermarks when mismatched; snapshot seeds the hash.AdapterOptions.SourceID; all adapters default toformat:locationwhen unset; CLI normalizesopencodelocations to absolute paths and passes a stableSourceID.?/:memory:in filenames; new normalization/validation and tests.opencodeScan/Tailbenchmarks; stabilizedinternal/notifybench; updatedbench/baseline.txt,scripts/check-bench.sh, and CI to enforce 11 benchmarks; docs/specs updated; SOW moved to done.Written for commit 7502ce8. Summary will update on new commits.