fix(meetings,agent): abort ModelPort signal on summary deadline and test probe audit (#2907) #5398
All Vouch review confidence checks passed
Residual risk 0.39 = Change Risk (0.52) × (1 − Review Confidence (0.24)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 43% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.388
Shallow Review Depth
shallow_review_depth
0.344
Real PR Conversation Timeline
1 comments
"Review active on #5398"
general
weight: 0.35
claude[bot]
Refs #2907 (follow-up from #2899).
Status of #2907 items on
origin/dev1. (d) Abort signal (implemented):
withDeadlineinapps/kernel/src/member-vy-ports.tsnow creates anAbortController, threads itsAbortSignalthroughsummarizeMeeting,enhanceNotes,runFeature,BoundPorts.generate, andModelPort.generate(packages/agent/src/member-vy/{ports,run-feature,meeting-summary}.ts), and aborts it at the deadline.summaryModelPortandgenerateMeetingSummaryText(packages/agent/src/summary-model.ts) also accept and link the callerAbortSignal. Added unit and DB tests covering customModelPortabort behavior, fast completion without abort,BoundPortsforwarding, andgenerateMeetingSummaryTextprompt abort.2. (g) Status probe audit (already resolved in #2899, regression-tested here):
meetings.summary.status(modules/meetings/src/summary-run.ts) is a non-sensitive query returning{ enabled, reason }, andrunRecorderVymapsreasondirectly toFORBIDDEN/SUMMARY_OFFwithout executingmeetings.summary.start. Added unit and DB tests confirming repeated probes and refusals never invokemeetings.summary.startand write zeroaudit_eventrows.3.
MEMBER_VY_SINKS(verified, no change):meetings.summary.copy_resultis already registered inMEMBER_VY_SINKS(packages/kernel/src/member-vy-sinks.ts).meetings.result.publish(modules/meetings/src/results.ts) does not read private member-Vy rows (member_vy_result/member_vy_memory) and only publishes already-reviewed (tainted = false) drafts with nosource_ref/source_run_id; registering it inMEMBER_VY_SINKSwould conflict withapps/kernel/test/invariant/member-vy-sinks.test.ts(sinkProblems()).Protected paths and shared-core check
node tools/ci/protected-paths.mjs origin/dev HEAD:No protected paths changed.docs/product-owner-config.md#shared-core-review): none changed.Local static checks (#5020)
Per
#5020, no localtsc,typecheck,vitest,knip, Postgres, or Playwright runs were executed on JOY's Mac; full typecheck and test execution rely on GitHub Actions CI. Local instant static checks on862652e1fed7e7d841c013a38a61e5b48da675da:node tools/ci/pii-scan.mjs <9 touched files>:pii-scan: 9 path(s), 0 skipped, no personal data foundpnpm exec oxlint --deny-warnings <9 touched files>:Found 0 warnings and 0 errors.node tools/ci/protected-paths.mjs origin/dev HEAD:No protected paths changed.node tools/ci/spdx-header.mjs origin/dev:spdx header OK: 1 new source file(s) checkedgit diff --check origin/dev...HEAD: passed (exit 0)Acceptance
ModelPortsummary/notes-enhance calls are now aborted viaAbortSignalat the request deadline instead of continuing in the background;SUMMARY_TIMEOUTbehavior and status-probe refusal behavior remain unchanged.packages/agent/test/meeting-summary.test.ts,packages/agent/test/summary-model.test.ts,apps/kernel/test/meetings-summary-ports.test.ts,apps/kernel/test/meetings-summary-run.db.test.ts), pending GitHub Actions CI execution.meetings.summary.statusandrunRecorderVystill checkROLES,openMeeting, andrecorder_user_idbefore any run or model call;AbortSignalcancellation fails closed asSUMMARY_TIMEOUT.org_idscoping preserved).ai_meteradmission/recording andDraftBudgetremain intact).AbortSignalrather than continuing until provider timeout, and repeated status probes write zero audit rows.---
<!-- dos-pr-summary -->
📌 TL;DR
This PR implements cooperative cancellation for meeting summary and notes enhancement workflows by propagating
AbortSignalthrough theModelPortinterface andrunFeaturepipeline. It ensures that when a deadline is exceeded, the underlying AI provider request is actively aborted rather than just racing against a timeout, preventing resource leaks and allowing for cleaner error handling.🎯 Type of Change
🔍 Changes Walkthrough
| File | Summary of Changes |
| :--- | :--- |
|
apps/kernel/src/member-vy-ports.ts| UpdatedwithDeadlineto accept a factory function that receives anAbortSignal. ModifiedsummaryModelPortandrunRecorderVyto pass this signal down togenerateMeetingSummaryTextandenhanceNotes. ||
apps/kernel/test/meetings-summary-ports.test.ts| New file. Added unit tests verifying thatAbortSignalis passed toModelPort.generateand that the signal is aborted when the deadline is hit. Also tests that refused status checks do not trigger summary start events. ||
apps/kernel/test/meetings-summary-run.db.test.ts| Updated integration tests to verify signal propagation and abort behavior in the database-backed runtime. Added a test ensuring no audit rows are written for refused status probes. ||
packages/agent/src/member-vy/meeting-summary.ts| Added optionaloptionsparameter (containingsignal) tosummarizeMeetingandenhanceNotes, forwarding it torunFeature. ||
packages/agent/src/member-vy/ports.ts| ExtendedModelPort.generateandBoundPorts.generateinterfaces to accept an optionaloptionsobject containing anAbortSignal. UpdatedbindPortsto forward these options. ||
packages/agent/src/member-vy/run-feature.ts| UpdatedrunFeatureto accept and forward theAbortSignalto theports.generatecall. ||
packages/agent/src/summary-model.ts| ModifiedgenerateMeetingSummaryTextto accept an externalAbortSignal. It now creates an internalAbortControllerthat listens to the external signal and the timeout, ensuring the provider request is aborted if either condition is met. Improved error detection for timeouts. ||
packages/agent/test/meeting-summary.test.ts| Added tests to verify thatAbortSignalis correctly forwarded fromsummarizeMeeting/enhanceNotesthroughBoundPortstoModelPort.generate. ||
packages/agent/test/summary-model.test.ts| Added a test using a local HTTP server to verify thatgenerateMeetingSummaryTextaborts the HTTP request promptly when the caller's signal is aborted, resulting in aSummaryModelErrorwith kindtimeout. |📊 Architectural Flow
<!-- /dos-pr-summary -->