fix: fix: standardize logging across all agents — capture errors, log exit codes, consistent format (#367) #390
No reviewers
Labels
No labels
action
backlog
blocked
bug-report
in-progress
prediction/actioned
prediction/dismissed
prediction/unreviewed
priority
tech-debt
underspecified
vision
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: disinto-admin/disinto#390
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/issue-367"
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 #367
Changes
AI Review
Summary
This PR standardizes the log format to and captures HTTP status codes / exit codes in error paths. The HTTP code capture pattern in gardener and pr-lifecycle is correct. The exit code and tail-output additions in agent-sdk.sh are correct. The directory additions in env.sh are correct.
Two issues block merge.
Issues
review/review-poll.sh:31:command log "$@"is broken. Thecommandbuiltin bypasses shell function lookup and searches only for external commands and builtins. There is nologbinary on Linux, so everylogcall in review-poll.sh will silently fail — nothing will be written to$LOGFILE. The original intent was to call env.sh'slog()and redirect its stdout to the file; the correct implementation is to inline the format string rather than usecommand:architect/architect-run.sh,planner/planner-run.sh,predictor/predictor-run.sh,supervisor/supervisor-run.sh: All four scripts previously overrodelog()to append to their dedicated log files. After this PR, those overrides are removed and env.sh'slog()is used — which writes only to stdout. TheLOG_FILE/LOGFILEvariables are still set and used by agent-sdk.sh for Claude's stderr, but script-levellog()calls (startup messages, guard checks, preflight output, etc.) no longer reach the dedicated files. The same file-redirecting wrapper fix from the point above should be applied to each of these scripts.Positive changes
HTTP 404instead of a generic FAILED.pr_closein pr-lifecycle.sh now returns 1 on non-2xx rather than silently succeeding.pr_walk_to_mergenow logs exit code and tail of output.Verdict
REQUEST_CHANGES — command log in review-poll.sh calls a non-existent external binary; all agent-level log() output silently moved to stdout
Reviewed at
f8bb7db| AGENTS.mdAI Review: REQUEST_CHANGES — command log in review-poll.sh calls a non-existent external binary; all agent-level log() output silently moved to stdout
f8bb7db1batod653680d64AI Re-review (round 2)
Previous Findings
review/review-poll.sh:31—command logbroken → FIXED: replaced with inlineprintf '[%s] %s: %s\n'matching the standardized format, appending directly to$LOGFILElog()overrides → FIXED: all four scripts now define a properlog()that appends to$LOG_FILEwith the standardized formatVerification
The incremental diff adds identical
log()override blocks to all five affected scripts (architect, planner, predictor, supervisor, review-poll). Each correctly inlines the timestamp format, reads$LOG_AGENT, and redirects to the script-local log file. No new issues introduced.Verdict
APPROVE — both previous findings fixed; logging standardization is correct and complete
Reviewed at
d653680| Previous:f8bb7db| AGENTS.mdAI Re-review (round 2): APPROVE — both previous findings fixed; logging standardization is correct and complete