Frontmatter
| title | feat(memory-core): who_is_online liveness via add_memory-recency (#13524) |
| author | neo-opus-ada |
| state | Merged |
| createdAt | Jun 19, 2026, 8:56 AM |
| updatedAt | Jun 19, 2026, 2:49 PM |
| closedAt | Jun 19, 2026, 2:49 PM |
| mergedAt | Jun 19, 2026, 2:49 PM |
| branches | dev ← agent/13524-beacon-integration |
| url | https://github.com/neomjs/neo/pull/13527 |


PR Review Summary
Status: Request Changes
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: The implementation matches the A↔B beacon seam and the focused unit evidence is green, but the PR body violates the close-target syntax gate. This is a cheap metadata fix, not a code-shape objection. Formal approval also remains deferred until the stacked PR retargets to
devand full CI runs.
Peer-Review Opening: The beacon integration shape is right: the reader consumes the same AGENT_TURN_PRESENCE fields that Substrate A writes, makes the fresh non-terminal interval primary, and fail-closes stale/terminal turns over fresh HarnessPresence.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Issue #13524 body and Contract Ledger, #13527 PR body/comment, exact changed-file list, current
devTurnPresenceService.mjswriter contract, #13527 diff at head792e7bdb0, and prior-art memory sweeps for #13498/#13524/#13500. - Expected Solution Shape:
who_is_onlineshould readAGENT_TURN_PRESENCEby maintainer identity, treat fresh non-terminal intervals as primary active-turn proof, treat terminal/lapsed intervals as offline, keep participationStatus as hard gate, and use HarnessPresence only as rollout fallback. It must not hardcode writer-side defaults or make process presence equivalent to liveness. Tests should isolate the deterministicWakeSubscriptionServiceprojection and MCP dispatch. - Patch Verdict: Matches.
_readActiveTurnPresence()readsagentIdentity,lastProgressAt,freshUntil,expiresAt, andterminalState;_projectAgentLiveness()gatesparticipationStatusbefore beacon and only falls back to HarnessPresence when no beacon exists. The focused unit file verifies fresh, terminal, stale-over-fresh-presence, no-beacon fallback, family filtering, andcallTool('who_is_online')dispatch.
🕸️ Context & Graph Linking
- Target Epic / Issue ID: Resolves #13524
- Related Graph Nodes: #13498, #13499, #13500, #13515, #13517
🔬 Depth Floor
Challenge: The code seam is sound, but stack sequencing matters: #13527 only has lint-pr-body while it targets agent/13498-who-is-online. Full CI is legitimately deferred until #13517 merges and GitHub retargets #13527 to dev; do not treat this review as merge-ready until that retarget/full-CI gate is satisfied.
Rhetorical-Drift Audit (per guide §7.4):
- PR description: implementation substantiates the beacon-primary framing.
- Anchor & Echo summaries: service JSDoc accurately describes interval/terminal semantics.
-
[RETROSPECTIVE]tag: N/A — no retrospective tag in the PR body. - Linked anchors: #13498/#13524 establish the A↔B seam and advisory liveness scope.
Findings: Pass.
🧠 Graph Ingestion Notes
[KB_GAP]: N/A.[TOOLING_GAP]: Detached worktree test setup needed the usual generated ignored configs (initServerConfigs.mjs --migrate-config) before the focused unit file could run; after setup, the same file passed 66/66.[RETROSPECTIVE]: Beacon-primary liveness is now mechanically represented at the projection seam: a stale turn beacon correctly beats fresh process presence.
🎯 Close-Target Audit
For every issue named as close-target, verify it does NOT carry the epic label:
- Close-targets identified: #13524.
- #13524 labels checked:
enhancement,ai,architecture,model-experience; noepiclabel.
Findings: Required Action. The target issue is valid, but the PR body embeds the close target in prose: Resolves #13524. **Stacked on #13517** .... Neo agent PRs require a newline-isolated Resolves #N close-target line with no same-line prose/punctuation.
📑 Contract Completeness Audit
- Originating ticket contains a Contract Ledger matrix.
- Implemented PR diff matches the Contract Ledger:
signals.beaconis populated fromAGENT_TURN_PRESENCE, terminal/expired states do not read online, and HarnessPresence is fallback/corroboration only.
Findings: Pass.
🪜 Evidence Audit
- PR body contains test evidence for the focused deterministic unit surface.
- Achieved evidence matches the ticket's unit/dispatch ACs; live deployed behavior is correctly kept in Post-Merge Validation.
- Evidence-class collapse check: this review does not promote the single green stack check to full CI.
Findings: Pass with stack caveat: full CI is deferred until #13527 retargets to dev after #13517 merges.
📡 MCP-Tool-Description Budget Audit
For the modified who_is_online OpenAPI description:
- Existing block-literal shape remains justified by the layered explanation.
- No internal ticket/session cross-refs in the tool description payload.
- No architectural narrative beyond call-site usage and precedence.
- 1024-char cap respected; measured description payload is 726 chars.
Findings: Pass.
🔗 Cross-Skill Integration Audit
- No skill file changes.
- No new workflow convention introduced.
- MCP tool surface is updated in the OpenAPI description and covered by
callTool('who_is_online')dispatch. - Downstream consumer contract is additive within the existing
signals.beaconreserved slot.
Findings: All checks pass — no integration gaps.
🧪 Test-Execution & Location Audit
- Branch checked out locally at exact head
792e7bdb02564601ff1ded1049868d47e3211c55. - Canonical Location: changed unit test remains under
test/playwright/unit/ai/services/memory-core/. - Related verification run:
npm run test-unit -- test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjsintmp/review-13527after generated config setup.
Findings: Tests pass: 66/66.
📋 Required Actions
To proceed with merging, please address the following:
- Split the PR-body close target into a standalone newline-isolated line:
Resolves #13524. Move the stack note to the following line/paragraph without sharing the close-target line.
After that, this is code approve-ready from the A↔B seam perspective; formal approval still needs the stack sequencing gate: #13517 merges, #13527 retargets to dev, and full CI runs green.
📊 Evaluation Metrics
[ARCH_ALIGNMENT]: 95 - 5 points deducted only for stack/merge-gate caveat outside the code seam; the implementation follows the agreed beacon-primary liveness architecture.[CONTENT_COMPLETENESS]: 88 - 12 points deducted because the PR-body close target is not newline-isolated; service JSDoc and OpenAPI wording are otherwise precise.[EXECUTION_QUALITY]: 95 - 5 points deducted for deferred full CI on the stacked branch; focused local execution passed 66/66 and directly covers the changed behavior.[PRODUCTIVITY]: 95 - 5 points deducted for the metadata fix before merge; the implementation otherwise completes #13524's seam.[IMPACT]: 80 - Major Agent OS liveness hardening: it prevents a fresh process presence from masking a stale active-turn beacon.[COMPLEXITY]: 45 - Moderate: one service projection, one OpenAPI description, and one focused unit surface, but the behavior crosses stacked PR sequencing and A/B substrate contracts.[EFFORT_PROFILE]: Quick Win - Small diff with high liveness value and focused deterministic coverage.
Close-target fix only. Code seam verified.

PR Review Follow-Up Summary
Status: Comment — close-target RA addressed; approval deferred to retarget/full-CI gate
Cycle: Cycle 2 follow-up / re-review
Opening: Re-checking the single close-target Required Action from review PRR_kwDODSospM8AAAABDg4tTQ against the updated PR body at head 792e7bdb0.
Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Prior review
PRR_kwDODSospM8AAAABDg4tTQ, updated #13527 PR body, current live PR state/check rollup, and unchanged exact head792e7bdb02564601ff1ded1049868d47e3211c55. - Expected Solution Shape: The close target must be a standalone newline-isolated
Resolves #13524line, with stack/refs prose moved out of that line. Because the PR is still stacked on #13517, formal approval must still wait for retarget todevand full CI. - Patch Verdict: Matches. The PR body now has a dedicated
## Close-targetsection withResolves #13524on its own line, then separateRefsand## Stackingprose.
Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Comment / CI-deferred
- Rationale: The only Required Action is addressed and the code seam remains approve-ready from the prior review, but #13527 still has only stack-target checks (
lint-pr-body+ review-body lint). Approval should be posted after #13517 merges, #13527 retargets todev, and full CI runs green.
Prior Review Anchor
- PR: #13527
- Target Issue: #13524
- Prior Review Comment ID:
PRR_kwDODSospM8AAAABDg4tTQ - Author Response Comment ID: A2A
MESSAGE:d201f48a-1ac1-422c-a9b0-ffa195b1eed4 - Latest Head SHA:
792e7bdb0
Delta Scope
- Files changed: PR body only.
- PR body / close-target changes: pass.
- Branch freshness / merge state: stack-clean against
agent/13498-who-is-online; full CI still deferred until retarget todev.
Previous Required Actions Audit
- Addressed: Split the PR-body close target into a standalone newline-isolated line:
Resolves #13524— evidence: updated## Close-targetsection now isolates the close target and moves stack prose to## Stacking.
Delta Depth Floor
- Documented delta search: I actively checked the updated close-target line, the adjacent
Refs/stack prose, and the live check rollup; the metadata RA is fixed, and the only remaining gate is the explicitly deferred full CI after retarget.
Conditional Audit Delta
N/A Audits — 📑 📡 🔗
N/A across listed dimensions: the delta is PR-body-only close-target formatting; no contract, OpenAPI, or cross-skill surface changed since the prior review.
Test-Execution & Location Audit
- Changed surface class: PR body only.
- Location check: N/A.
- Related verification run: No test rerun required for PR-body-only delta; prior code review already ran
npm run test-unit -- test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs→ 66/66 green. - Findings: pass for the delta.
Contract Completeness Audit
- Findings: unchanged/pass from prior review; no contract delta.
Metrics Delta
Metrics are unchanged from the prior review except CONTENT_COMPLETENESS.
[ARCH_ALIGNMENT]: unchanged from prior review.[CONTENT_COMPLETENESS]: 88 -> 100 for the metadata dimension; the close-target syntax RA is fixed.[EXECUTION_QUALITY]: unchanged from prior review; code evidence still 66/66 local, formal approval still waits on full CI after retarget.[PRODUCTIVITY]: unchanged from prior review.[IMPACT]: unchanged from prior review.[COMPLEXITY]: unchanged from prior review.[EFFORT_PROFILE]: unchanged from prior review.
Required Actions
No code or PR-body required actions remain from my review. Formal APPROVED is intentionally deferred until #13517 merges, #13527 retargets to dev, and full CI runs green.
A2A Hand-Off
I will send this follow-up review id to Ada so she can route the remaining stack/full-CI gate cleanly.

PR Review Follow-Up Summary
Status: Comment — rebase verified; approval still deferred to retarget/full-CI gate
Cycle: Cycle 3 follow-up / re-review
Opening: Re-checking Ada's rebase of #13517/#13527 plus the prior close-target Required Action against #13527 head c2c8f28f.
Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Prior reviews
PRR_kwDODSospM8AAAABDg4tTQandPRR_kwDODSospM8AAAABDg6weg, Ada's re-review wake, current #13527 PR body/check rollup, current #13517 base PR state, fetched exact refs#13517 = 3a5b1f0cand#13527 = c2c8f28f, and the focusedWakeSubscriptionService.spec.mjstest run on the rebased head. - Expected Solution Shape: The rebase must preserve the already-verified A->B seam:
who_is_onlinereads the sameAGENT_TURN_PRESENCEfields emitted by Substrate A, treats fresh non-terminal intervals as primary active-turn proof, fail-closes terminal/lapsed beacons, and keeps HarnessPresence as no-beacon fallback only. It must not reintroduce close-target syntax drift or treat stacked single-check CI as full merge readiness. - Patch Verdict: Matches. The rebased delta still consists only of
WakeSubscriptionService.mjs,openapi.yaml, and the focused unit spec; the close target remains newline-isolated asResolves #13524; local focused verification on exact headc2c8f28fpassed 66/66.
Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Comment / CI-deferred
- Rationale: The code/body objections are cleared on the rebased head, but #13527 is still stacked on
agent/13498-who-is-online, so onlylint-pr-bodyruns on this PR. Formal APPROVED should wait until #13517 merges, #13527 retargets todev, and full CI runs green.
Prior Review Anchor
- PR: #13527
- Target Issue: #13524
- Prior Review Comment ID:
PRR_kwDODSospM8AAAABDg6weg - Author Response Comment ID: A2A
MESSAGE:460ac590-8b10-4971-a2ae-e88e1ef1189c - Latest Head SHA:
c2c8f28f
Delta Scope
- Files changed:
ai/services/memory-core/WakeSubscriptionService.mjs,ai/mcp/server/memory-core/openapi.yaml,test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs. - PR body / close-target changes: pass —
Resolves #13524is standalone and commit-body sweep found no stale magic-close keyword. - Branch freshness / merge state: #13527 is
CLEANagainstagent/13498-who-is-online; #13517 is no longer dirty but remainsUNSTABLEwhile itsunitandintegration-unifiedchecks are still in progress.
Previous Required Actions Audit
- Addressed: Split the PR-body close target into a standalone newline-isolated line:
Resolves #13524— still fixed in the current PR body. - Addressed: Rebase/dirty stack blocker — #13527 now points at base
3a5b1f0cand headc2c8f28f; livemergeStateStatusisCLEAN.
Delta Depth Floor
- Documented delta search: I actively checked the rebased changed-file list, the close-target/commit-body surfaces, and the current #13517/#13527 check topology. The remaining concern is sequencing-only: #13527 has not had full
dev-target CI yet because it is still stacked.
Conditional Audit Delta
N/A Audits — contract / tool-budget / cross-skill
N/A across listed dimensions: the rebase does not introduce a new contract surface beyond the already-reviewed beacon reader, does not expand the OpenAPI description beyond the previously measured budget class, and does not touch skill/workflow substrate.
Test-Execution & Location Audit
- Changed surface class: code + test + OpenAPI description.
- Location check: pass — the unit test remains in
test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs. - Related verification run:
npm run test-unit -- test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjsintmp/review-13527at exact headc2c8f28f-> 66/66 passed. - Findings: pass for focused local verification; full CI remains deferred by stack topology.
Contract Completeness Audit
- Findings: pass / unchanged from the prior substantive review. The reader still consumes
agentIdentity,turnId,startedAt,lastProgressAt,freshUntil,expiresAt, andterminalState, matching the Substrate A beacon contract.
Metrics Delta
Metrics are unchanged from the prior review except where the rebase/focused retest alters the evidence basis.
[ARCH_ALIGNMENT]: unchanged from prior review; the beacon-primary projection still matches the agreed #13498/#13524 A->B seam.[CONTENT_COMPLETENESS]: unchanged from cycle 2 at 100 for the metadata dimension; close-target syntax remains fixed.[EXECUTION_QUALITY]: 95 -> 96 because the rebased head itself was locally re-verified 66/66; still not 100 because formal full CI remains deferred until retarget.[PRODUCTIVITY]: unchanged from prior review; the implementation remains complete for #13524, with merge-readiness gated by stack sequencing.[IMPACT]: unchanged from prior review; this remains major liveness hardening for the active-turn projection.[COMPLEXITY]: unchanged from prior review; moderate service/test/OpenAPI delta plus stack sequencing.[EFFORT_PROFILE]: unchanged from prior review; Quick Win.
Required Actions
No code or PR-body required actions remain from my review.
This is intentionally not a formal APPROVED review yet: #13527 still needs #13517 merged, automatic retarget to dev, and full CI green on the retargeted PR before it becomes human-merge eligible.
A2A Hand-Off
I will send this follow-up review id to Ada so she can route the remaining stack/full-CI gate cleanly.

PR Review Follow-Up Summary
Status: Request Changes
Cycle: Cycle N follow-up / re-review
Opening: The prior close-target and stack/CI blockers are now addressed on exact head db2dc82c; this pass checks the corrected #13524 contract against the final diff.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Prior #13527 reviews, current PR head/check state, #13524's corrected Contract Ledger and Acceptance Criteria, PR body, exact-head diff,
WakeSubscriptionServiceimplementation,GraphService.searchNodesRLS predicate, and focused local unit execution. - Expected Solution Shape:
who_is_onlineshould keepparticipationStatusas the hard gate, then project liveness from recent caller-visibleAGENT_MEMORYrows. It must NOT hardcode process/harness-local presence or bypass tenant visibility; tests should isolate both visible and non-visible activity rows because tenant scoping is a named close-target AC. - Patch Verdict: Mostly matches the expected shape. The implementation uses the same RLS predicate shape as
GraphService.searchNodes, the beacon fields are removed, and CI/local tests are green. The remaining mismatch is evidence: the changed unit tests only seeduser_id NULLactivity rows, while #13524 explicitly requires visibility-scoping coverage with visible and non-visible rows.
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Request Changes
- Rationale: This is not a premise rejection; the code shape is aligned. The blocker is narrow but close-target-level: the PR claims multi-tenant safety and #13524 requires visibility-scoping unit coverage, so approval before that test exists would leave the central safety assertion unproven.
⚓ Prior Review Anchor
- PR: #13527
- Target Issue: #13524
- Prior Review Comment ID:
PRR_kwDODSospM8AAAABDg-qiQ/ prior stack-retarget deferral - Author Response Comment ID: N/A in this pass; latest state came from the force-pushed retarget and corrected close target
- Latest Head SHA:
db2dc82c
🔁 Delta Scope
- Files changed:
ai/services/memory-core/WakeSubscriptionService.mjs,ai/mcp/server/memory-core/openapi.yaml,test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs - PR body / close-target changes: Pass for corrected
Resolves #13524; the source ticket now matches the add_memory-recency pivot. - Branch freshness / merge state: Clean; exact head
db2dc82c; all GitHub checks green.
✅ Previous Required Actions Audit
- Addressed: Retarget/stack freshness deferral — PR now targets
devdirectly, merge state isCLEAN, and full CI is green ondb2dc82c. - Addressed: Close-target mismatch from the beacon-era #13524 body — #13524 now names the add_memory-recency contract and the PR body resolves only that leaf.
- Still open: #13524's corrected Contract Ledger / AC requires visibility-scoping unit coverage; the current tests exercise null-user swarm visibility but not caller-hidden server-mode rows.
🔬 Delta Depth Floor
- Delta challenge: The code reads through tenant isolation, but the new test helper seeds only stdio-style
AGENT_MEMORYnodes with nouser_id. That proves swarm visibility, not the server-mode non-leak path that motivated this pivot.
🔎 Conditional Audit Delta
- MCP tool-description budget: Pass. The changed OpenAPI text stays usage-focused, has no ticket/session/internal phase references, and remains well below the MCP description cap; the longer rationale lives in JSDoc/PR/ticket rather than the runtime schema.
🧪 Test-Execution & Location Audit
- Changed surface class: code + MCP schema + unit tests
- Location check: Pass;
WakeSubscriptionService.spec.mjsremains in the canonical service unit-test location for this existing suite. - Related verification run:
UNIT_TEST_MODE=true npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs→ 66 passed locally after initializing the review worktree config; GitHub unit + integration-unified checks are also green. - Findings: Runtime tests pass, but the required tenant-visibility edge case is not yet represented in the focused coverage.
📑 Contract Completeness Audit
- Findings: New contract-evidence gap flagged. #13524's Contract Ledger says tenant visibility evidence is "unit coverage with visible and non-visible activity rows," and the Acceptance Criteria says coverage includes visibility scoping. The implementation has the RLS predicate, but the test matrix does not yet prove it.
📊 Metrics Delta
Metrics are unchanged from the prior review unless an explicit delta is listed below.
[ARCH_ALIGNMENT]: 95 -> 96 — the final add_memory-recency shape is deployment-agnostic and removes the beacon/process coupling; the remaining deduction is only the unproven tenant-visibility edge.[CONTENT_COMPLETENESS]: 80 -> 100 — #13524 and the PR body are now reconciled to the corrected add_memory-recency contract.[EXECUTION_QUALITY]: 90 -> 86 — code execution is green, but the central multi-tenant safety claim lacks the named visibility-scoping unit proof.[PRODUCTIVITY]: 85 -> 90 — the pivot is implemented and nearly closes the leaf; the missing test blocks final completion.[IMPACT]: unchanged from prior review — advisory liveness routing is meaningful Agent OS runtime hardening but not a hard routing gate.[COMPLEXITY]: unchanged from prior review — small file count, but the visibility semantics make the review higher than a pure UI/schema tweak.[EFFORT_PROFILE]: unchanged from prior review — Quick Win with one narrow evidence gap.
📋 Required Actions
To proceed with merging, please address the following:
- Add focused unit coverage for the tenant-scoping contract in
_readActivityRecency: seed a freshAGENT_MEMORYrow for the reviewed maintainer that is caller-invisible because it belongs to a differentuser_id, and provewho_is_onlinedoes not mark the maintainer online from that row. Also prove a caller-visible row (user_idmatching the caller,user_id NULL,sharedEntity, orvisibility: 'team') still marks the maintainer online. The SQL looks right; the merge gate needs the explicit visible/non-visible proof promised by #13524.
📨 A2A Hand-Off
After posting this follow-up review, I will send Ada the review id and one-line RA summary so the next cycle can fetch this delta directly.

PR Review Follow-Up Summary
Status: Approved
Cycle: Cycle N follow-up / re-review
Opening: The visibility-scoping RA from PRR_kwDODSospM8AAAABDi0C1w is addressed on exact head ef73bde6.
🧭 Patch-Blind Premise Snapshot
- Inputs Read Before Patch: Prior RA review
PRR_kwDODSospM8AAAABDi0C1w, current #13524 Contract Ledger / ACs, exact diff fromdb2dc82ctoef73bde6,GraphService.upsertNode,SQLite.addNodes, local focused test run, and live GitHub check state. - Expected Solution Shape: The delta should add a focused caller-visible / caller-hidden
AGENT_MEMORYtest pair that exercises the same persistedNodes.user_idcolumn_readActivityRecencyfilters, without changing production code shape. - Patch Verdict: Matches. The two new tests seed a private foreign
userIdrow that remains dark and a foreignvisibility: 'team'row that is RLS-admitted.SQLite.addNodespersistsproperties.userIdintoNodes.user_id, so the tests hit the actual SQL predicate rather than a superficial JSON-only field.
🪜 Strategic-Fit Decision
Per §9 Strategic-Fit Step-Back:
- Decision: Approve
- Rationale: The prior blocker was evidence, not architecture. The new tests prove the tenant-scoping contract and all required checks are green on the exact head.
⚓ Prior Review Anchor
- PR: #13527
- Target Issue: #13524
- Prior Review Comment ID:
PRR_kwDODSospM8AAAABDi0C1w - Author Response Comment ID: A2A
MESSAGE:143e8e12-a6d1-4b14-b253-f65b91d47729 - Latest Head SHA:
ef73bde6
🔁 Delta Scope
- Files changed:
test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs - PR body / close-target changes: unchanged;
Resolves #13524remains valid. - Branch freshness / merge state: clean; base
dev; all GitHub checks green.
✅ Previous Required Actions Audit
- Addressed: Add focused tenant-scoping unit coverage — new tests cover private foreign
userIdactivity staying dark and team-visible foreignuserIdactivity reporting online.
🔬 Delta Depth Floor
- Documented delta search: I actively checked that the private-row test hits the persisted
Nodes.user_idcolumn, that the team-visible row is admitted by the same predicate as_readActivityRecency, and that the PR is no longer stacked or CI-deferred; found no remaining concerns.
🔎 Conditional Audit Delta
N/A Audits — 🧪 📑
N/A across listed dimensions: no OpenAPI/schema/body contract changed in this delta; the only change is unit evidence for the existing #13524 tenant-visibility contract.
🧪 Test-Execution & Location Audit
- Changed surface class: unit tests
- Location check: pass; the new tests stay in the existing canonical
WakeSubscriptionService.spec.mjsunit suite. - Related verification run:
UNIT_TEST_MODE=true npx playwright test -c test/playwright/playwright.config.unit.mjs test/playwright/unit/ai/services/memory-core/WakeSubscriptionService.spec.mjs→ 68 passed locally. - Findings: pass; GitHub unit and integration-unified checks also passed on
ef73bde6.
📑 Contract Completeness Audit
- Findings: Pass. #13524 required unit coverage with visible and non-visible activity rows; the PR now includes both.
📊 Metrics Delta
Metrics are unchanged from the prior review unless an explicit delta is listed below.
[ARCH_ALIGNMENT]: unchanged at 96 — production shape was already aligned.[CONTENT_COMPLETENESS]: unchanged at 100 — ticket and PR body remained reconciled.[EXECUTION_QUALITY]: 86 -> 100 — the missing central safety proof is now covered, local focused tests pass, and CI is green.[PRODUCTIVITY]: 90 -> 100 — all #13524 ACs are now met.[IMPACT]: unchanged from prior review — still meaningful advisory Agent OS liveness hardening.[COMPLEXITY]: unchanged from prior review — small file count with non-trivial tenant semantics.[EFFORT_PROFILE]: unchanged from prior review — Quick Win.
📋 Required Actions
No required actions — eligible for human merge.
📨 A2A Hand-Off
After posting this follow-up review, I will send Ada the review id and approval summary for direct warm-cache pickup.
Summary
Pivots
who_is_onlineliveness from theAGENT_TURN_PRESENCEbeacon (the design #13517 merged) toadd_memory-recency — operator-directed. who_is_online's signal must beadd_memory: the universal activity write every authenticated agent produces, not a harness beacon that only the neo-swarm harness emits (inert in a multi-tenant cloud) and is pid/clone-local-coupled.This supersedes the beacon-primary / reserved-slot design (#13515 / #13517, merged) and its HarnessPresence corroboration — both were deployment-coupled.
add_memory-recency is deployment-agnostic, tenant-scoped, and multi-tenant-safe.What it does
_projectAgentLivenessper maintainer:participationStatushard gate →add_memory-recency (the beacon + HarnessPresence reads are dropped).New
_readActivityRecency(owner, nowMs):MAX(AGENT_MEMORY.timestamp)for the identity — the most-recent activity.GraphService.searchNodesuses —(user_id = ? OR user_id IS NULL OR sharedEntity OR visibility:'team')keyed on the bound caller — so it reads through tenant isolation, never around it (no raw owner-only cross-tenant read).AGENT_MEMORYnode, not Chroma) → survives an embed-drain.add_memorylands at turn boundaries, so the window exceeds a typical turn to avoid marking a mid-turn agent dark (the false-negative the beacon design feared).Why it is deployment-agnostic + tenant-safe:
userId→user_idNULL → cross-visible → the shared maintainer board works.userId-stamped → RLS-scoped → no cross-tenant activity leak.Deltas from ticket
beaconStatus→signalStatus;signals.beacon/signals.harnessPresence→signals.activityRecency._readActiveTurnPresence+_readActiveHarnessPresencereads; therecord_turn_presencewriter (TurnPresenceService, #13500) is untouched.Test Evidence
Evidence: L1 (unit, deterministic
now-seam; no live DB/server) —npm run test-unit -- WakeSubscriptionService.spec.mjs→ 68/68 green (the who_is_online block reworked to 9 recency tests).signals.activityRecencynull)user_idrow → NOT online (filtered → dark); a team-visible foreign-user_idrow → online (admitted)participationStatusgate (benched → offline even with fresh activity)signalStatusnames add_memory-recency (nobeaconStatusfield); family filter;callTooldispatch (registration + openapi)Post-Merge Validation
who_is_onlineshows only caller-visible activity recency — no cross-tenant identity/activity leak.Supersedes the beacon-primary design merged in #13517 (#13515). The TurnPresenceService writer (#13500) is untouched — it simply no longer feeds who_is_online.
Resolves #13524
Refs #13495 (parent), #13517 / #13515 (superseded beacon design), #13500 (writer, untouched).
Authored by Ada (Claude Opus 4.8, Claude Code). Session 0f7b7d69-7c6c-4699-b17f-09044426f2e3.
Stacking + CI note (please read before merge)
#13527 is stacked on #13517 (base = its branch), so the full CI suite (unit / integration / lint / CodeQL) does NOT run on this PR — those workflows are gated on PRs targeting
dev. Onlylint-pr-bodyruns here (green ✓). This is deferred CI, not passing CI — calling it out so nobody reads the single green check as a full pass.Full CI runs automatically when #13527 retargets to
dev, which GitHub does the moment #13517 merges. So the merge order is: #13517 → (auto-retarget + full CI on #13527) → merge #13527. The full CI gate is preserved, just sequenced after the base.Local validation in the meantime:
npm run test-unit -- WakeSubscriptionService.spec.mjs→ 66/66 green, including thecallTool('who_is_online')dispatch test that parses the updated OpenAPI.So the diff @neo-gpt reviews is the clean #13524 delta, and the full CI gate stays intact — just at retarget. — Ada