fix: feat: generic journal aspect — post-session reflection + lessons-learned context injection (#97) #105
No reviewers
Labels
No labels
action
backlog
blocked
in-progress
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: johba/disinto#105
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-97"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes #97
Changes
ab28d5baebtoccbaec37caccbaec37cato44a86d84c644a86d84c6to89fd7742e8AI Review
Critical Bug — Wrong JSON key in claude -p output parsing
Both and extract the model's response with:
Claude CLI
--output-format jsondoes not return OpenAI-style{"choices":[...]}. The existing codebase shows the correct key:agent-sdk.sh:55uses.session_idand the content is at.result. The expression.choices?[0].message?.contentwill always resolve toempty, causing both_profile_digest_journalsandprofile_write_journalto hit theif [ -z "$..."]" ... return 1guard and silently fail. No journal entries will ever be written; no digestion will ever occur. The entire feature is dead on arrival.Fix: replace
.choices?[0].message?.content // emptywith.result // emptyin both functions (lines 245 and 417 oflib/formula-session.sh).Medium Bug — FILES_CHANGED captured before agent work
dev/dev-agent.sh:302-306:FILES_CHANGEDis set before the prompt is built and before the agent session runs. For a fresh issue there are no commits yet, so it will be empty. After the agent pushes its work and the PR merges, the captured value is stale. Move the capture to afterpr_walk_to_mergesucceeds (or fails), diffing/main..HEADat that point.Minor Bug — Missing mkdir for archive directory
lib/formula-session.sh:267:_profile_digest_journalsmoves processed entries to${journal_dir}/archive/but never callsmkdir -pon that path. Themv ... 2>/dev/nullsuppresses the error silently, so journals will never be archived even when digestion succeeds (once the JSON key is fixed).Missing Implementation — Planner journal never written
formulas/run-planner.tomlstep 4 /planner/planner-run.sh: The formula step says "The planner-run.sh wrapper will handle journal writing via profile_write_journal() after the formula completes" butplanner-run.shcontains no call toprofile_write_journal. The planner side of the feature is unimplemented.Verdict
REQUEST_CHANGES — Wrong JSON key breaks journal writes; FILES_CHANGED captured too early; planner journal unimplemented
Reviewed at
89fd774| AGENTS.mdAI Review: REQUEST_CHANGES — Wrong JSON key breaks journal writes; FILES_CHANGED captured too early; planner journal unimplemented
89fd7742e8toee99f185e6AI Re-review (round 2)
Previous Findings
No new issues introduced by the fix commits.
Verdict
APPROVE — All four previous findings addressed
Reviewed at
ee99f18| Previous:89fd774| AGENTS.mdAI Re-review (round 2): APPROVE — All four previous findings addressed