Skip to content

Fix Windows memory observability for external retention - #554

Merged
lidge-jun merged 10 commits into
devfrom
codex/260727-live-triage
Jul 27, 2026
Merged

Fix Windows memory observability for external retention#554
lidge-jun merged 10 commits into
devfrom
codex/260727-live-triage

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Jul 27, 2026

Copy link
Copy Markdown
Owner

Summary

Verification

  • bun test tests/memory-watchdog.test.ts tests/doctor.test.ts
  • cd gui && bun test tests/memory-observability-card.test.tsx
  • bun x tsc --noEmit
  • cd gui && bun run lint
  • cd gui && bun run build
  • bun run privacy:scan
  • git diff --check

C-gate reviewer: PASS.

Summary by CodeRabbit

  • New Features

    • Improved memory diagnostics across the dashboard, ocx doctor, and management APIs.
    • Reports RSS, external memory, and ArrayBuffers, including the highest observed memory source.
    • Memory watchdog warnings now identify the metric driving elevated usage.
  • Documentation

    • Updated Windows memory troubleshooting guidance and API documentation.
    • Added comprehensive triage plans and status records for outstanding issues and pull requests.
  • Tests

    • Expanded coverage for memory reporting, watchdog behavior, and diagnostic rendering.

lidge-jun added 10 commits July 27, 2026 21:30
Inventory all 23 open issues and 14 open PRs on the axis of decisions only
the maintainer can make, clustered into six bundles for later PABCD cycles.

Live findings:
- anthropics/claude-code#1124, cited as upstream evidence on #543, is CLOSED
- #462/#401/#241 carry upstream-tracking with no upstream ticket at all
- #92's encrypted_content body has no filed upstream issue either
- #527 targets #526's head branch, so enforce-target fails
- #529 is already merged; the earlier triage matrix still lists it in flight
Two read-only audit lenses returned 30 contradictions; the verified ones are
applied here and recorded in 006_corrections.md.

Factual corrections:
- claude-code#1124 closed 2025-05-16, not 2025-08-10
- 13 open enhancement issues, not 11
- #529 is merged, so issue #42 phase 2 is done
- #418 has no PR behind it; it was miscounted as in-flight
- #528 does not contain #424's current head, so it needs a rebase
- #527's retarget is manual and independent of #526

Framing corrections:
- stale-needs-info.yml is absent from the default branch, so bundle C had no
  real deadline
- the debug switch #543's reporter asked for already exists
- whether #545 is our defect is answerable from code, not owner judgment
- #491 is an OAuth credential change, so it is a security boundary rather
  than a warm-up; #533 and #447 keep their security classification too

Structure: bundle G added for roadmap honesty, bundle F rescoped to the
security boundary, #498 split out of bundle B, cycle order rebuilt, and the
loop archetype corrected to decision-elicitation.
@coderabbitai

coderabbitai Bot commented Jul 27, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds extensive live triage plans, manifests, evidence, and decision-ledger documents. It also changes memory diagnostics from RSS-only reporting to maximum-counter observability across RSS, external memory, and ArrayBuffers, updating the server API, watchdog, CLI, GUI, documentation, translations, and tests.

Changes

Live triage artifacts

Layer / File(s) Summary
Triage workflow and live manifests
.codexclaw/..., devlog/_plan/260727_live_unfinished_triage/*
Defines the armed goalplan, work phases, evidence criteria, live issue/PR manifests, priority table, and PR-specific triage plans.
Owner decision ledger
devlog/_plan/260727_owner_decision_ledger/*
Adds decision bundles, upstream-tracking and enhancement ledgers, PR decision records, open owner questions, and correction history.
Work-phase plans and evidence
devlog/_plan/260727_wp10-*, devlog/_plan/260727_wp11-*, devlog/_plan/260727_wp6-*, devlog/_plan/260727_wp7-*, devlog/_plan/260727_wp8-*, devlog/_plan/260727_wp9-*
Documents Windows path handling, PR rerun/merge, wrong-base triage, issue investigation, heap watchdog work, and gitlink CI remediation.

Observed memory diagnostics

Layer / File(s) Summary
Observed-memory contract and watchdog
src/server/memory-watchdog.ts, src/server/management/system-routes.ts
Computes observed memory as the maximum of RSS, external, and ArrayBuffers, persists the selected metric, and exposes the derived fields through /api/system/memory.
CLI, GUI, documentation, and API consumers
src/cli/doctor.ts, gui/src/components/MemoryObservabilityCard.tsx, gui/src/i18n/*, docs-site/..., structure/...
Updates memory parsing, classification, dashboard rendering, translations, troubleshooting guidance, and API documentation.
Memory regression coverage
tests/*memory*, tests/doctor.test.ts, gui/tests/memory-observability-card.test.tsx
Tests maximum-counter selection, external/ArrayBuffers warnings, endpoint fields, CLI output, and observed dashboard metrics.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related PRs

Suggested labels: bug

Suggested reviewers: ingwannu, wibias

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning The PR adds many unrelated triage/ledger plan docs for other issues and PRs, which are outside the Windows memory-observability scope. Remove or split the unrelated devlog/goalplan/ledger additions into a separate PR focused on the memory observability fix.
Docstring Coverage ⚠️ Warning Docstring coverage is 31.25% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main change: improving Windows memory observability for external retention.
Linked Issues check ✅ Passed The code and docs implement the #509 requirements by exposing observed memory fields and switching watchdog/doctor logic to max(rss, external, arrayBuffers).
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/260727-live-triage

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 331d94bbe1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


## Local branch

- Worktree: `/Users/jun/.codex/worktrees/260727-desktop3p-path/opencodex`

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove ignored task artifacts from this runtime fix

Publishing this commit also force-adds 32 unrelated files from the ignored devlog/ tree plus .codexclaw state, including this absolute local worktree path and username. These generated triage records expose workstation details and permanently couple an otherwise focused memory-observability change to unrelated PR/issue history; remove the ignored artifacts from the commit and retain only the implementation, tests, and relevant documentation.

AGENTS.md reference: AGENTS.md:L21-L23

Useful? React with 👍 / 👎.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 17

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl (1)

25-25: 🎯 Functional Correctness | 🔴 Critical | ⚡ Quick win

Remove the invalid JSONL record.

Line 25 contains only 25, which is not valid JSON. Any parser reading this .jsonl file will fail at the final record, so replace it with a valid event or remove the stray line.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl
at line 25, Remove the stray line containing only 25 from the ledger JSONL file,
or replace it with a valid JSON event record; ensure every remaining line is
valid JSON so parsers can read the complete file.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json:
- Around line 214-231: Synchronize the WP6 status with its tasks and criterion:
use the evidence recorded at Lines 342-343 to mark WP6-T1 and WP6-T2 as done,
keeping WP6.status as done and C-WP6-PR527 as met; otherwise reopen WP6 until
both tasks are completed.
- Around line 254-270: Align the WP8 goal-plan state with the actual `#509`
outcome: update the WP8 phase, WP8-T1, WP8-T2, and C-WP8-ISSUE509 statuses and
populate capturedEvidence with the relevant test and merge evidence if the work
is complete. If implementation has not occurred, explicitly mark WP8 as a
pre-implementation snapshot instead of leaving it as an active in-progress plan.

In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl:
- Around line 5-20: Repair the ledger event sequence for the
`opencodex-live-unfinished-issues-and-prs-triage` slug by removing or
regenerating contradictory `workphase_started` and `workphase_done` records so
every phase has one matching lifecycle pair. Replace the ambiguous `steering`
correction with an explicit cancellation or transition event, ensuring replay
derives a single active workphase and no phase is closed or started more than
once.

In `@devlog/_plan/260727_live_unfinished_triage/002_live_issue_manifest.md`:
- Line 12: Update the manifest entry’s wording to clearly state that the
request/response frames must be redacted, replacing the ambiguous “needs
redacted request/frames” phrase while preserving the existing issue status and
context.

In `@devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md`:
- Around line 7-15: Reconcile the gitlink inventory across all three artifacts
using the canonical three-path list, including devlog/_fin/opencode-cursor.
Update
devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md to
document the third path or explicitly label its list as an initial partial
discovery; update
devlog/_plan/260727_live_unfinished_triage/010_pr526_catalog_write_signal.md to
reference all three paths; retain and consistently reference the complete list
in
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json.

In `@devlog/_plan/260727_owner_decision_ledger/000_scope.md`:
- Around line 3-5: Synchronize the owner-decision ledger with current triage: in
devlog/_plan/260727_owner_decision_ledger/000_scope.md lines 3-5, mark the
c05e88fd baseline as historical/superseded or refresh it; in the same file lines
20-29, update open-item counts and the `#545/`#546 classifications; in
devlog/_plan/260727_owner_decision_ledger/001_decision_bundles.md lines 24-30,
require `#527` to be rebuilt after `#526` and remove the claim that their order is
independent.

In `@devlog/_plan/260727_owner_decision_ledger/001_decision_bundles.md`:
- Line 43: Fix the shared MD018 violations by prefixing bare issue/PR references
with the specified labels: in
devlog/_plan/260727_owner_decision_ledger/001_decision_bundles.md at lines 43,
90, 93, 102, 109, 111, and 147 use “issue”, and at line 51 use “PR”; in
devlog/_plan/260727_owner_decision_ledger/002_upstream_tracking.md at lines 56,
61, and 65 prefix or otherwise format each corresponding issue reference so it
no longer begins the paragraph bare.

In `@devlog/_plan/260727_owner_decision_ledger/003_enhancement_ledger.md`:
- Around line 43-45: The three documents use inconsistent unresolved-roadmap
issue sets. In
devlog/_plan/260727_owner_decision_ledger/003_enhancement_ledger.md lines 43-45,
exclude already-decided `#540` and publish the exact unresolved roadmap IDs; in
devlog/_plan/260727_owner_decision_ledger/005_open_questions.md lines 30-33,
make Q4 reference only that set; and in
devlog/_plan/260727_owner_decision_ledger/006_corrections.md lines 102-108,
update S5 to the same set while removing non-roadmap IDs such as `#386`, `#414`, and
`#415`.

In `@devlog/_plan/260727_wp10-desktop3p-path-windows-ci/011_phase1_evidence.md`:
- Around line 3-9: Replace the machine-specific absolute Worktree value in the
“Local branch” evidence with a repository-relative worktree label or a redacted
path, while preserving the branch, base, commit, and PR metadata.

In `@devlog/_plan/260727_wp11-pr526-final-rerun-merge/010_phase1.md`:
- Around line 26-27: Remove the developer-specific absolute worktree path from
both devlog/_plan/260727_wp11-pr526-final-rerun-merge/010_phase1.md lines 26-27
and devlog/_plan/260727_wp11-pr526-final-rerun-merge/011_phase1_evidence.md line
5. Replace each occurrence with $WORKTREE or a repository-relative placeholder
while preserving the documented commands and evidence.

In `@devlog/_plan/260727_wp6-pr527-wrong-base/000_plan.md`:
- Line 70: Prefix the PR number with ordinary text to prevent malformed Markdown
headings: update devlog/_plan/260727_wp6-pr527-wrong-base/000_plan.md lines
70-70 and devlog/_plan/260727_wp6-pr527-wrong-base/012_phase1_evidence.md lines
51-52 to begin with “PR `#527`”; update
devlog/_plan/260727_wp6-pr527-wrong-base/011_comment_body.md line 1 to use the
valid heading “# PR `#527` follow-up after `#526` landed:”.

In `@devlog/_plan/260727_wp6-pr527-wrong-base/010_phase1.md`:
- Around line 41-45: Update the verification commands in the plan to use an
explicit comma-separated field list with gh pr view instead of the placeholder
“...”. Define a temporary-file variable before the gh pr comment command and
pass it as a quoted argument to --body-file, such as "$tmp_file", so the
commands execute without shell redirection.

In `@devlog/_plan/260727_wp8-issue509-heap-watchdog/010_phase1.md`:
- Around line 38-41: Update the validation commands so the GUI test runs in a
scoped subshell or via Bun’s gui working-directory option, preserving the
repository root. Ensure the subsequent root-level tsc and privacy:scan commands
execute from the original directory rather than gui/.

In `@devlog/_plan/260727_wp9-devlog-gitlink-ci-fix/000_plan.md`:
- Around line 27-39: Align the Loop-spec write scope with the stated objective
by removing devlog/_fin/opencode-cursor from the deletion list, unless the
objective is explicitly expanded to justify deleting that _fin gitlink. Keep
only the accidental devlog/_chase gitlinks in scope.

In `@gui/src/i18n/en.ts`:
- Around line 128-136: Update the dash.mem.storeHint locale string in
gui/src/i18n/en.ts (lines 128-136) to correlate rising store bytes with rising
observed memory, not heap growth. Apply the equivalent German wording change to
gui/src/i18n/de.ts (lines 118-126), preserving the existing
conversation-retention meaning.

In `@src/cli/doctor.ts`:
- Around line 539-540: Update the parser around the external and arrayBuffers
fields to preserve missing values as unavailable rather than converting them to
zero, and adjust doctor rendering/health evaluation to report that only RSS was
observable without treating those counters as measured. Add a regression test
covering a legacy response that omits both fields.

In `@structure/05_gui-and-management-api.md`:
- Line 27: Update the GET /api/system/memory documentation to explicitly list
observedBytes, observedMetric, and responseState in the top-level response, and
identify the corresponding observed fields within each watchdog snapshot entry.
Keep the scalar-only payload, authentication, and existing memory semantics
unchanged.

---

Outside diff comments:
In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl:
- Line 25: Remove the stray line containing only 25 from the ledger JSONL file,
or replace it with a valid JSON event record; ensure every remaining line is
valid JSON so parsers can read the complete file.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 4033d827-2d02-4148-90c4-1f47dfab6ce6

📥 Commits

Reviewing files that changed from the base of the PR and between 9dd3c42 and 331d94b.

📒 Files selected for processing (49)
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl
  • devlog/_plan/260727_live_unfinished_triage/000_plan.md
  • devlog/_plan/260727_live_unfinished_triage/001_live_pr_manifest.md
  • devlog/_plan/260727_live_unfinished_triage/002_live_issue_manifest.md
  • devlog/_plan/260727_live_unfinished_triage/003_priority_table.md
  • devlog/_plan/260727_live_unfinished_triage/010_pr526_catalog_write_signal.md
  • devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md
  • devlog/_plan/260727_live_unfinished_triage/020_pr528_image_bridge_p2.md
  • devlog/_plan/260727_owner_decision_ledger/000_scope.md
  • devlog/_plan/260727_owner_decision_ledger/001_decision_bundles.md
  • devlog/_plan/260727_owner_decision_ledger/002_upstream_tracking.md
  • devlog/_plan/260727_owner_decision_ledger/003_enhancement_ledger.md
  • devlog/_plan/260727_owner_decision_ledger/004_pr_decision_ledger.md
  • devlog/_plan/260727_owner_decision_ledger/005_open_questions.md
  • devlog/_plan/260727_owner_decision_ledger/006_corrections.md
  • devlog/_plan/260727_wp10-desktop3p-path-windows-ci/000_plan.md
  • devlog/_plan/260727_wp10-desktop3p-path-windows-ci/010_phase1.md
  • devlog/_plan/260727_wp10-desktop3p-path-windows-ci/011_phase1_evidence.md
  • devlog/_plan/260727_wp11-pr526-final-rerun-merge/000_plan.md
  • devlog/_plan/260727_wp11-pr526-final-rerun-merge/010_phase1.md
  • devlog/_plan/260727_wp11-pr526-final-rerun-merge/011_phase1_evidence.md
  • devlog/_plan/260727_wp6-pr527-wrong-base/000_plan.md
  • devlog/_plan/260727_wp6-pr527-wrong-base/010_phase1.md
  • devlog/_plan/260727_wp6-pr527-wrong-base/011_comment_body.md
  • devlog/_plan/260727_wp6-pr527-wrong-base/012_phase1_evidence.md
  • devlog/_plan/260727_wp7-issue418-v2-custom-delegation/000_plan.md
  • devlog/_plan/260727_wp7-issue418-v2-custom-delegation/010_phase1.md
  • devlog/_plan/260727_wp7-issue418-v2-custom-delegation/011_noop_evidence.md
  • devlog/_plan/260727_wp8-issue509-heap-watchdog/000_plan.md
  • devlog/_plan/260727_wp8-issue509-heap-watchdog/010_phase1.md
  • devlog/_plan/260727_wp8-issue509-heap-watchdog/011_verification.md
  • devlog/_plan/260727_wp9-devlog-gitlink-ci-fix/000_plan.md
  • devlog/_plan/260727_wp9-devlog-gitlink-ci-fix/010_phase1.md
  • docs-site/src/content/docs/troubleshooting/windows-memory.md
  • gui/src/components/MemoryObservabilityCard.tsx
  • gui/src/i18n/de.ts
  • gui/src/i18n/en.ts
  • gui/src/i18n/ja.ts
  • gui/src/i18n/ko.ts
  • gui/src/i18n/ru.ts
  • gui/src/i18n/zh.ts
  • gui/tests/memory-observability-card.test.tsx
  • src/cli/doctor.ts
  • src/server/management/system-routes.ts
  • src/server/memory-watchdog.ts
  • structure/05_gui-and-management-api.md
  • tests/doctor.test.ts
  • tests/memory-watchdog.test.ts

Comment on lines +214 to +231
"id": "WP6",
"title": "PR #527 wrong-base handling",
"status": "done",
"tasks": [
{
"id": "WP6-T1",
"title": "Re-check #527 after #526 decision",
"status": "pending"
},
{
"id": "WP6-T2",
"title": "Retarget/request rebase or leave blocker; do not merge in same phase as #526",
"status": "pending"
}
],
"criteriaIds": [
"C-WP6-PR527"
]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Synchronize WP6’s phase and task statuses.

WP6.status is done and C-WP6-PR527 is met, but WP6-T1 and WP6-T2 remain pending. Consumers of this goalplan can therefore report the phase as incomplete or rerun already-completed work. Mark both tasks done using the evidence recorded at Lines 342-343, or keep the parent phase open until they are actually completed.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
around lines 214 - 231, Synchronize the WP6 status with its tasks and criterion:
use the evidence recorded at Lines 342-343 to mark WP6-T1 and WP6-T2 as done,
keeping WP6.status as done and C-WP6-PR527 as met; otherwise reopen WP6 until
both tasks are completed.

Comment on lines +254 to +270
"id": "WP8",
"title": "Issue #509 JS heap watchdog investigation",
"status": "in_progress",
"tasks": [
{
"id": "WP8-T1",
"title": "Trace RSS/heap watchdog logic and issue evidence",
"status": "pending"
},
{
"id": "WP8-T2",
"title": "Fix or comment with code pointers and blocker",
"status": "pending"
}
],
"criteriaIds": [
"C-WP8-ISSUE509"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

file=".codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json"

echo "== file stats =="
wc -l "$file"

echo
echo "== lines 240-280 =="
sed -n '240,280p' "$file" | cat -n

echo
echo "== lines 340-370 =="
sed -n '340,370p' "$file" | cat -n

echo
echo "== search for WP8 / `#509` / evidence fields =="
rg -n '"WP8"|`#509`|C-WP8-ISSUE509|evidence|merge|test|snapshot|pre-implementation|in_progress|pending|completed' "$file"

Repository: lidge-jun/opencodex

Length of output: 17096


🏁 Script executed:

#!/bin/bash
set -euo pipefail

file=".codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json"

echo "== surrounding object keys near WP8 =="
python3 - <<'PY'
import json, pathlib
p = pathlib.Path(".codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json")
data = json.loads(p.read_text())
# Walk to locate WP8 and print its parent structure succinctly.
def walk(obj, path="root"):
    if isinstance(obj, dict):
        if obj.get("id") == "WP8":
            print("PATH", path)
            print(json.dumps(obj, indent=2))
            return True
        for k,v in obj.items():
            if walk(v, f"{path}.{k}"):
                return True
    elif isinstance(obj, list):
        for i,v in enumerate(obj):
            if walk(v, f"{path}[{i}]"):
                return True
    return False
walk(data)
PY

Repository: lidge-jun/opencodex

Length of output: 637


Align WP8 state with the actual #509 outcome
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json still marks WP8 as in_progress, leaves both tasks pending, and keeps C-WP8-ISSUE509 open with empty capturedEvidence at lines 254-270 and 353-357. If this is meant to reflect the finished #509 work, update the work phase, task, and criterion statuses and add the test/merge evidence; otherwise mark it explicitly as a pre-implementation snapshot so automation does not treat it as the active plan state.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json
around lines 254 - 270, Align the WP8 goal-plan state with the actual `#509`
outcome: update the WP8 phase, WP8-T1, WP8-T2, and C-WP8-ISSUE509 statuses and
populate capturedEvidence with the relevant test and merge evidence if the work
is complete. If implementation has not occurred, explicitly mark WP8 as a
pre-implementation snapshot instead of leaving it as an active in-progress plan.

Comment on lines +5 to +20
{"ts":"2026-07-27T11:01:22.413Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP2"}
{"ts":"2026-07-27T11:11:58.894Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_done","detail":"closed WP9"}
{"ts":"2026-07-27T11:11:58.894Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP2"}
{"ts":"2026-07-27T11:46:27.214Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_done","detail":"closed WP10"}
{"ts":"2026-07-27T11:46:27.214Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP2"}
{"ts":"2026-07-27T11:47:00.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP11"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"task_done","detail":"WP11-T1 rebased codex/catalog-written-signal onto origin/dev@7c74e0a22ec96dd5849d3d7253758f0ab15d9737"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"task_done","detail":"WP11-T2 verified locally and pushed ce716cc117ab23e4420c8c9fe860959968f66cdc"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"task_done","detail":"WP11-T3 hosted checks passed and PR #526 squash-merged as 9dd3c42dae2e7feda3581c6d477cf5a0d6e646bf"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"criterion_met","detail":"C-WP11-PR526-FINAL evidence in devlog/_plan/260727_wp11-pr526-final-rerun-merge/011_phase1_evidence.md"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_done","detail":"closed WP11"}
{"ts":"2026-07-27T12:05:44.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP2"}
{"ts":"2026-07-27T12:08:50.093Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_done","detail":"closed WP11"}
{"ts":"2026-07-27T12:08:50.093Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP3"}
{"ts":"2026-07-27T12:09:30.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"steering","detail":"corrected next active work-phase from WP3 to WP6 because PR #527 explicitly depends on the PR #526 decision; WP2 and WP3 remain pending"}
{"ts":"2026-07-27T12:09:30.000Z","slug":"opencodex-live-unfinished-issues-and-prs-triage","event":"workphase_started","detail":"started WP6"}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift

Repair the workphase event sequence before merging.

The ledger cannot be deterministically replayed: Line 5 starts WP2 but Line 6 closes WP9; WP2 is then started repeatedly on Lines 7 and 9; Line 8 closes WP10 without a corresponding start; and WP11 is closed twice on Lines 15 and 17. The steering event on Line 19 records a correction but does not remove the contradictory lifecycle events.

Regenerate these records with matching workphase_started/workphase_done pairs, and represent corrections with an explicit cancellation or transition event so consumers can derive one unambiguous active workphase.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
@.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/ledger.jsonl
around lines 5 - 20, Repair the ledger event sequence for the
`opencodex-live-unfinished-issues-and-prs-triage` slug by removing or
regenerating contradictory `workphase_started` and `workphase_done` records so
every phase has one matching lifecycle pair. Replace the ambiguous `steering`
correction with an explicit cancellation or transition event, ensuring replay
derives a single active workphase and no phase is closed or started more than
once.

| # | labels | last update | bucket | rationale |
| --- | --- | --- | --- | --- |
| 547 | bug | 2026-07-27T10:38:50Z | comment/request-changes | new Windows Claude Desktop custom-model visibility report; needs exact generated config/profile path, `ocx claude desktop` output, and Desktop dev-mode/API-key shape |
| 545 | bug, needs-info | 2026-07-27T10:22:15Z | takeover-fix/investigate | logging sub-bug fixed in `7fcaa9119`; remaining 64-token classifier behavior needs redacted request/frames or code isolation |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Clarify the redaction requirement.

“Needs redacted request/frames” is grammatically ambiguous. Use “needs request/frames to be redacted” or “needs redacted request/response frames.”

🧰 Tools
🪛 LanguageTool

[style] ~12-~12: The double modal “needs redacted” is nonstandard (only accepted in certain dialects). Consider “to be redacted”.
Context: ...ning 64-token classifier behavior needs redacted request/frames or code isolation | | 54...

(NEEDS_FIXED)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@devlog/_plan/260727_live_unfinished_triage/002_live_issue_manifest.md` at
line 12, Update the manifest entry’s wording to clearly state that the
request/response frames must be redacted, replacing the ambiguous “needs
redacted request/frames” phrase while preserving the existing issue status and
context.

Source: Linters/SAST tools

Comment on lines +7 to +15
- `origin/dev@7fcaa9119253d010393cb457427a2868cd935718` contains gitlinks at:
- `devlog/_chase/_cca`
- `devlog/_chase/_litellm`
- `.gitmodules` does not contain mappings for those paths.
- GitHub Actions checkout fails before the issue-quality script can run because
`actions/checkout` executes submodule cleanup and Git exits with:
`fatal: No url found for submodule path 'devlog/_chase/_cca' in .gitmodules`.
- This failure reproduced on PR #526 head
`43d0efff4569711ed192e09d4d87b62fc803153c`; recent `dev` runs are also red.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Reconcile the gitlink inventory across all repair artifacts. The blocker plans list two paths, while the final goalplan evidence records three. This prevents an audit from proving that every checkout-breaking gitlink was addressed.

  • devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md#L7-L15: document devlog/_fin/opencode-cursor or mark the list as an initial partial discovery.
  • devlog/_plan/260727_live_unfinished_triage/010_pr526_catalog_write_signal.md#L71-L77: align the execution update with the complete three-path inventory.
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json#L290-L294: retain the canonical final list and reference the same paths everywhere.
📍 Affects 3 files
  • devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md#L7-L15 (this comment)
  • devlog/_plan/260727_live_unfinished_triage/010_pr526_catalog_write_signal.md#L71-L77
  • .codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json#L290-L294
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md`
around lines 7 - 15, Reconcile the gitlink inventory across all three artifacts
using the canonical three-path list, including devlog/_fin/opencode-cursor.
Update
devlog/_plan/260727_live_unfinished_triage/015_devlog_gitlink_ci_blocker.md to
document the third path or explicitly label its list as an initial partial
discovery; update
devlog/_plan/260727_live_unfinished_triage/010_pr526_catalog_write_signal.md to
reference all three paths; retain and consistently reference the complete list
in
.codexclaw/goalplans/opencodex-live-unfinished-issues-and-prs-triage/goalplan.json.

Comment on lines +38 to +41
bun test tests/memory-watchdog.test.ts tests/doctor.test.ts
cd gui && bun test tests/memory-observability-card.test.tsx
bun x tsc --noEmit
bun run privacy:scan

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Preserve the repository root for subsequent checks.

After cd gui, the following bun x tsc --noEmit and bun run privacy:scan commands also execute from gui/ when copied as one shell block. Use (cd gui && bun test ...) or bun --cwd gui test ..., then run the root-level checks from the original directory.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@devlog/_plan/260727_wp8-issue509-heap-watchdog/010_phase1.md` around lines 38
- 41, Update the validation commands so the GUI test runs in a scoped subshell
or via Bun’s gui working-directory option, preserving the repository root.
Ensure the subsequent root-level tsc and privacy:scan commands execute from the
original directory rather than gui/.

Comment on lines +27 to +39
Outcome:

- Remove only the accidental devlog `_chase` gitlinks from a dev-target branch.
- Restore checkout/submodule commands to non-erroring state.
- Land this baseline CI repair before rerunning/merging PR #526.

## Loop-spec

- Loop archetype: verifier-defined.
- Write scope:
- DELETE gitlink `devlog/_chase/_cca`.
- DELETE gitlink `devlog/_chase/_litellm`.
- DELETE gitlink `devlog/_fin/opencode-cursor`.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick win

Make the deletion scope explicit.

The objective says “remove only the accidental devlog _chase gitlinks,” but the write scope also deletes devlog/_fin/opencode-cursor. Either explain why that _fin gitlink is part of the same repair, or remove it from the scope; the plan must not authorize a broader metadata deletion than its objective describes.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@devlog/_plan/260727_wp9-devlog-gitlink-ci-fix/000_plan.md` around lines 27 -
39, Align the Loop-spec write scope with the stated objective by removing
devlog/_fin/opencode-cursor from the deletion list, unless the objective is
explicitly expanded to justify deleting that _fin gitlink. Keep only the
accidental devlog/_chase gitlinks in scope.

Comment thread gui/src/i18n/en.ts
Comment on lines +128 to +136
"dash.mem.hint": "Read-only runtime diagnostics. Observed memory is max(RSS, external, ArrayBuffers) so Windows working-set trimming does not hide committed retention.",
"dash.mem.rss": "Resident set (RSS)",
"dash.mem.jsHeap": "JS heap (used / total)",
"dash.mem.jscHeap": "JSC heap",
"dash.mem.growth": "RSS drift / hour",
"dash.mem.external": "External",
"dash.mem.arrayBuffers": "ArrayBuffers",
"dash.mem.observed": "Observed",
"dash.mem.runtime": "Runtime counters",
"dash.mem.growth": "Observed drift / hour",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Update continuation-store attribution to use observed memory, not heap.

The new diagnostics correctly center on observed memory, but both locale files still tell users that response-state growth must correlate with heap growth. That misattributes the exact external-retention scenario this PR adds.

  • gui/src/i18n/en.ts#L128-L136: revise dash.mem.storeHint to say that rising store bytes alongside rising observed memory indicates conversation retention.
  • gui/src/i18n/de.ts#L118-L126: make the equivalent German dash.mem.storeHint change, using observed memory rather than heap.

As per path instructions, GUI user-visible strings must be maintained through locale files.

📍 Affects 2 files
  • gui/src/i18n/en.ts#L128-L136 (this comment)
  • gui/src/i18n/de.ts#L118-L126
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@gui/src/i18n/en.ts` around lines 128 - 136, Update the dash.mem.storeHint
locale string in gui/src/i18n/en.ts (lines 128-136) to correlate rising store
bytes with rising observed memory, not heap growth. Apply the equivalent German
wording change to gui/src/i18n/de.ts (lines 118-126), preserving the existing
conversation-retention meaning.

Source: Path instructions

Comment thread src/cli/doctor.ts
Comment on lines +539 to +540
external: typeof body.external === "number" ? body.external : 0,
arrayBuffers: typeof body.arrayBuffers === "number" ? body.arrayBuffers : 0,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Do not report unavailable counters as measured zero.

Older services omit these newly added fields, but this parser converts absence to 0. ocx doctor then prints external=0MB/arrayBuffers=0MB and can say memory is normal based only on RSS—misleading precisely on the Windows retention path this change addresses. Preserve absence, render it as unavailable, and state that only RSS was observable; add a legacy-response regression test.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/cli/doctor.ts` around lines 539 - 540, Update the parser around the
external and arrayBuffers fields to preserve missing values as unavailable
rather than converting them to zero, and adjust doctor rendering/health
evaluation to report that only RSS was observable without treating those
counters as measured. Add a regression test covering a legacy response that
omits both fields.

| Logs & Debug | One sidebar entry (`/#logs`) with two tabs. Logs tab: request/runtime logs for local diagnosis. Debug tab (`/#logs/debug`; legacy `/#debug` deep links redirect there): provider + usage toggles, refresh/follow log viewer. `GET/PUT /api/debug`; `GET /api/debug/logs` and `GET /api/debug/usage-logs` (monotonic `after` cursor, legacy `since` accepted). CLI: `ocx debug provider|usage …` (both streams via running proxy API). |
| Usage | `GET /api/usage` aggregate read-only summary derived from `~/.opencodex/usage.jsonl`; measured / reported / unreported / unsupported / estimated counts, daily zero-filled grid, model and provider breakdowns. Never exposes prompts. |
| System | `GET /api/system/memory` — service-process runtime/memory identity (pid, Bun version/revision, platform, RSS/heap scalars, `bun:jsc` heap discriminator, streamMode + eager-relay gate decision, watchdog snapshot sliced to the last 60 samples). Scalar-only payload; rides the standard management auth gate and must never move to unauthenticated `/healthz`. Consumed by `ocx doctor`'s Memory/runtime section. |
| System | `GET /api/system/memory` — service-process runtime/memory identity (pid, Bun version/revision, platform, RSS/heap/external/ArrayBuffers scalars, observed memory = max(RSS, external, ArrayBuffers), `bun:jsc` heap context, streamMode + eager-relay gate decision, watchdog snapshot sliced to the last 60 samples). Scalar-only payload; rides the standard management auth gate and must never move to unauthenticated `/healthz`. Consumed by `ocx doctor`'s Memory/runtime section and the dashboard Memory observability card. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

Document the concrete observed-memory response keys.

The endpoint now returns observedBytes, observedMetric, and responseState, with observed fields also present in the watchdog snapshot, but this SOT only describes “observed memory” conceptually. Name these fields and their locations so API consumers can implement the documented contract rather than infer it.

As per path instructions, user-facing docs must stay in sync with actual CLI/API behavior.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@structure/05_gui-and-management-api.md` at line 27, Update the GET
/api/system/memory documentation to explicitly list observedBytes,
observedMetric, and responseState in the top-level response, and identify the
corresponding observed fields within each watchdog snapshot entry. Keep the
scalar-only payload, authentication, and existing memory semantics unchanged.

Source: Path instructions

@lidge-jun
lidge-jun merged commit 261abb7 into dev Jul 27, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant