Skip to content
This repository was archived by the owner on Jul 16, 2026. It is now read-only.

fix(workspace): correct core-status.json and pending-questions.md paths - #44

Merged
jsun-m merged 3 commits into
mainfrom
fix/health-check-core-status-path
May 21, 2026
Merged

jsun-m merged 3 commits into
mainfrom
fix/health-check-core-status-path

Conversation

@jsun-m

@jsun-m jsun-m commented May 21, 2026

Copy link
Copy Markdown

Summary

Two surgical path-resolution fixes for the AG2Platform/stando fork, consolidated onto one branch. Both bugs are post-sonichi#940 relocation misses — fixed long ago on sonichi/sutando upstream, but this fork is ~37 commits behind, so they still bite here. Rather than a full upstream sync, these are the minimal equivalent fixes applied directly.

Commits

  • 88569d0 — fix(health-check): check_core_proactive_loop() read core-status.json from the workspace root, but the proactive loop writes state/core-status.json (PR refactor(workspace): relocate root status files into state/, conversation.log into logs/ sonichi/sutando#940). The check read a stale orphan and emitted a false core-proactive-loop … last heartbeat > 600s warning every pass. Now reads WORKSPACE_DIR / "state" / "core-status.json".
  • 02b5d1b — fix(agent-api): the /status and /answer handlers resolved pending-questions.md via personal_path(..., REPO_DIR). The file lives under the workspace, not the repo, so it resolved to a non-existent path and the web UI Questions panel was always empty. Now resolves the workspace via resolve_workspace() and passes that. Repo-bundled public assets keep REPO_DIR.

Upstream provenance

The equivalent upstream fixes are not cleanly cherry-pickable in isolation: the agent-api change rides in #775 (3 files) and the health-check change rides in #940 (fe006612 — a 24-file, 497-line status-file relocation refactor that depends on a new status_read_path helper). Cherry-picking #940 whole would drag the entire relocation in. These hand-applied minimal fixes achieve the same result — 15 lines, 2 files — without the refactor churn.

Test

  • Both files syntax-checked (ast.parse).
  • Verified the fixed paths resolve to the live <workspace>/state/core-status.json and <workspace>/pending-questions.md.

🤖 Generated with Claude Code

jsun-m and others added 3 commits May 21, 2026 15:33
check_core_proactive_loop() read core-status.json from the workspace
root, but PR sonichi#940 relocated it to state/core-status.json (see CLAUDE.md
"Work Status" and the proactive-loop step-0 instruction). The check
therefore read a stale pre-relocation orphan at the root and emitted a
"core-proactive-loop ... last heartbeat > 600s ago" warning on every
pass — a permanent false positive that masked the real signal.

Point status_path at WORKSPACE_DIR / "state" / "core-status.json".

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The /status and /answer handlers resolved pending-questions.md via
personal_path("pending-questions.md", REPO_DIR). personal_path tries
$SUTANDO_MEMORY_DIR/machine-<host>/<file> then <workspace>/<file> — but
the workspace arg was REPO_DIR (the repo checkout root), not the real
workspace. The file lives at <workspace>/pending-questions.md, so it
resolved to a non-existent path and /status always returned an empty
`questions` array. The web UI Questions panel was therefore always
empty, hiding every pending question from the user.

Resolve the workspace via resolve_workspace() (same as
check-pending-questions.py) and pass it to both call sites. Repo-bundled
public assets (stand-avatar.png, stand-identity.json) keep REPO_DIR.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The core-status.json relocation fix (this branch) made
check_core_proactive_loop read WORKSPACE_DIR/state/core-status.json,
but health-check-stuck-loop.test.py still wrote its fixtures to the
workspace root — so the check saw no file and returned "ok / not yet
written" instead of the expected "warn" (case e failed). Point the
write_status() helper and the malformed-JSON case at state/.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@jsun-m
jsun-m merged commit 31343f4 into main May 21, 2026
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant