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

Read session debt from Advance instead of duplicating scan (O4) #25

Description

@JRedeker

Summary

OCA currently has internal/advruntime/session_debt.go (388 LOC) that duplicates Advance's session-debt scan (plugin/src/utils/opencode-session-debt.ts, 237 LOC). Under the cleaner ownership boundary (Advance must work standalone; OCA enhances), Advance owns the scan logic and OCA reads the signal.

Why

  • Advance needs session-debt detection for its own diagnostics (adv_status, agent context)
  • OCA needs the signal for surfacing in oca doctor and oca adv-status, not its own scan
  • Threshold logic should live once

Acceptance Criteria

  • OCA deletes internal/advruntime/session_debt.go
  • OCA reads session-debt signal via Advance's stable read surface (depends on ADV adding adv status --format json per O2)
  • Threshold values live only in Advance
  • oca doctor and oca adv-status continue to surface session-debt info correctly

Dependencies

Blocked by Advance adding stable read surface (new ADV issue tracked in cross-repo boundary audit § O2).

Proposal

docs/proposals/2026-05-08-cross-repo-boundary-audit.md § O4

WSJF Estimate

Value: 5 | TC: 3 | RROE: 5 | Effort: 2 | WSJF: 4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority:mediumMedium prioritytech-debtTechnical debt, refactoring, cleanup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions