fix: 5 bugs (B53-B57), CI SAST/attribution, tmux tests verified#32
Merged
Conversation
added 3 commits
March 22, 2026 03:48
The merge of PR #31 lost the CI workflow updates and kept stale hook patterns. This commit restores: - CI workflow: SAST check + AI attribution check steps (with fetch-depth: 0) - commit-msg hook: verified real patterns (Cursor, Claude, Aider, Copilot) - pre-push hook: same verified patterns + PR body stripping - pre-commit hook: removed staged file stripping (commit-msg only)
Bug fixes (found via deep code analysis): - B53: CAS.deleteBySession() race → Database.transaction() - B54: CAS.deleteOrphans() shared entry deletion → EditGraphNode ref check - B55: EditGraph.checkout() partial failure → Database.transaction() - B56: EditGraph.deleteBySession() not atomic → Database.transaction() - B57: filterEdited() synthetic ID collision → PartID.ascending() False positives verified and documented (E2-E6): - getHead() undefined vs null → correct TS idiom - First commit branch init → intentional DAG initialization - Objective.extract() concurrency → prompt loop serializes - SideThread duplicate ID → fail loudly is correct - SHA-256 collision → intentional (B43 fix) CI workflow restored with SAST + AI attribution checks. tmux TUI tests: all 3 flows pass (home, command-palette, agent-cycle).
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.
QA Deep Dive: Bug Hunt + tmux Testing + CI Hardening
5 Bugs Fixed (B53-B57)
Found via deep code analysis of Frankencode modules (CAS, EditGraph, filterEdited):
CAS.deleteBySession()race conditionDatabase.transaction()CAS.deleteOrphans()deletes shared entriesEditGraphNodeTablereference check before deletingEditGraph.checkout()partial failureDatabase.transaction()EditGraph.deleteBySession()not atomicDatabase.transaction()filterEdited()synthetic placeholder ID collisionfirstPart.idtoPartID.ascending()for unique ID5 False Positives Verified (E2-E6)
getHead()returns undefined vs null!headmain → first_nodeObjective.extract()concurrent raceSideThread.create()duplicate IDIdentifier.ascending()is unique; DB error on collision is correct (fail loudly)onConflictDoNothing()was explicitly chosen in B43 fixCI Restored
.github/workflows/test.ymlupdated with:fetch-depth: 0for full commit history in attribution checktmux TUI Tests
All 3 provider-independent flows verified:
Edge Case Kept Open (E1)
sweep()clock skew (turnWhenSet > currentTurn) — negative elapsed means part is never swept. Only possible from an upstream bug (turn counter is monotonic). Documented, not fixed.Test plan
bun run typecheck(tsgo) — 0 errorsbun test— 1512 pass, 0 failscripts/sast-check.sh— passes