Skip to content

fix(scans): retain the reported phase when a Standard scan stops - #2675

Open
mldangelo-oai wants to merge 22 commits into
mainfrom
fix/stopped-scan-phase-observation
Open

mldangelo-oai wants to merge 22 commits into
mainfrom
fix/stopped-scan-phase-observation

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Nov 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Refs #70. A local Standard scan can stop after the primary model reports a phase but before a checkpoint saves it. scans show now displays that last reported phase and the time the SDK received it.

Changes

  • Save accepted coordinator reports as optional progress.lastObservedPhase metadata, separately from the checkpoint phase and saved review counts. Command output and stale reports do not supply this observation.
  • Preserve the observation when session polling precedes live delivery or coordinator cleanup precedes SDK cleanup, including caller cancellation after coordinator failure. Authorized cleanup can fill missing metadata while retaining the first terminal result, timestamps, counts and diagnostic.
  • Share the progress projection across scan details and history. Add migration 79 and repair known preview migration receipts by name while preserving their timestamps.
  • Document the CLI detail output and JSON field. Suggested published-docs update: explain the last reported phase and its receipt time in the scan-history workflow.

Testing

The validation below covers the product and test inputs committed in 2f965da. Merging current main changes only two workflow action pins; all product, test and package inputs remain unchanged. The receiving revision passed the workflow syntax, example, shell and security checks plus 26 release-progress tests.

  • The five ordered portable plugin checks passed. The full Linux/Python 3.12 plugin suite passed: 4,318 parent tests and 422 subtests passed; 150 parent tests and one subtest skipped.
  • The full fixed SDK order passed (13,277 passed, 171 skipped, one existing TODO), followed by pnpm run types and pnpm run format. These used an isolated Linux environment with the repository's supported sandbox policy.
  • The renewed full default randomized pnpm run test:ci order passed with JUnit and LCOV (13,277 passed, 171 skipped, one existing TODO). An earlier default run had eight 30-second timeouts; all eight cases passed in both a focused captured-seed control and the complete renewal. The original failure remains recorded, with no source or timeout change.
  • Both cold MCP workflow shards passed across all 98 files. The selected deterministic eval contracts also passed, including triage retry/resume, secret discovery, dependency reachability, mapping, Standard time budgets and workflow routing.
  • Package source checks, pnpm pack, archive validation and the production-dependency audit passed. Installed-package checks passed under Node 22.13.0, 24.0.0, 24.22.3, 26.0.0 and 26.13.1; the baseline also exercised worker retry. Candidate-package Action integration passed.
  • The standalone host build passed both owning tests and its nested cold-bytecode check.
  • The Linux AMD64 image build and direct runtime/Compose checks passed using the existing supported sandbox profiles. The canonical AppArmor discovery step returned its existing notice; its guarded runtime assertions passed separately. Global policy provisioning was not rerun. The release-index check is carried forward from this PR's earlier successful CI job after verifying its consumed scripts and workflow are unchanged.
  • Earlier failed or interrupted SDK, MCP and eval attempts remain recorded alongside their renewed results. Hosted source CI for 2f965da passed all 65 jobs. Hosted CI for this receiving revision is still required; previous hosted results retain their original revision.

Risk and rollout

The observation is optional and applies to local Standard scans using the default validation workflow. The bundled plugin advertises support; older plugins retain their existing stop arguments, and records without an observation omit the JSON field. The reported phase does not establish completed review coverage.

Migration 79 adds a nullable column and preserves known preview histories. Use the updated plugin when reopening an upgraded database.

Public disclosure review

  • No customer, partner, prospect, or user identities, data, or identifying details are included.
  • No credentials, personal data, private source, scan findings, or nonpublic links or tickets are included.
  • I reviewed the branch name, title, description, commits, changes, comments, logs, screenshots, attachments, and links for public disclosure.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 15, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T22:56:26.800941Z 9c13ba7 New commits
🔒 Security Review ✅ Completed 2026-11-22T22:56:18.687735Z 9c13ba7 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Nov 15, 2026

@zcrab-oai zcrab-oai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Owner-level merge-safety review of 3c174709a9c1c0aeeee3b8ead7e387ed78b658bd.

No P0/P1 findings. Two P2 gaps remain in saving the reported phase: session polling can win before live delivery, and the coordinator can stop the scan before SDK cleanup. Both were reproduced with synthetic local inputs. The separate observation and shared progress projection otherwise fit the intended behavior.

Validation passed: 75 Node database tests, 4 new SDK stop tests, 21 renderer tests, 2 repository-findings tests, Ruff, source checks, type checks, formatting, and benign SQLite/public CLI failure and cancellation checks. Local ownership checks prevented some older Python cases and artifact publication; two inventory fixtures also failed locally. Verified CI reports for this head show those Python and inventory cases passing. No ownership or security checks were bypassed.

Approval remains pending interactive confirmation of this PR and head; this is a COMMENT review.

Comment thread sdk/typescript/src/api.ts Resolved

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants