Skip to content

Preserve DeepSeek partial sessions and startup failures - #67352

Merged
pelikhan merged 2 commits into
mainfrom
pelikhan-deepseek-session-audit
Oct 10, 2026
Merged

pelikhan merged 2 commits into
mainfrom
pelikhan-deepseek-session-audit

Conversation

@pelikhan

@pelikhan pelikhan commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

DeepSeek's parser discarded observed configuration and startup errors unless stdout contained a completed answer. Existing failing and timed-out Actions runs therefore lost agent evidence during canonical and unified session conversion.

Changes

  • Retain configured provider/model independently of answer completion, and map attributed Node startup errors and harness failures to standard session.error observations with observed execution exits.
  • Preserve exact completed assistant text, exclude wrapper cleanup and diagnostics, and redact registered stdout mask values without interpreting JSON-looking answer text as tool activity.
  • Require terminal failure framing and compatible wrapper outcomes so an assistant's quoted harness-failure line does not fabricate an error or execution exit. Accept Node startup file headers with optional columns.
  • Keep parsing scoped to observed headless output; canonical artifacts use existing shared readers rather than an additional synthetic stdout format.
  • Add sanitized run-shape and persistence regressions, and document the headless profile's evidence limits. Configured provider metadata remains in the canonical trace; the spec intentionally excludes duplicated provider metadata from the essential unified initialization payload.

Evidence and scope

Audited existing runs 33456355349, 37553714211, and 37866549668 read-only. Original stdout replays retain the successful run's exact 577-character answer, the startup failure's initialization/errors, and the timeout's initialization. All 441 agent runtime usage reports in the latest run match their published unified projections.

The captured headless logs do not expose native structured reasoning, tool lifecycles, refusals, or agent accounting. Those observations are not fabricated. Process exit zero and a configured model of auto are not treated as task success or a resolved model. No workflows were triggered; shared normalizers, types, projections, and other engines are unchanged.

Validation

  • 269 focused tests passed across DeepSeek/custom parsing, canonical session consumers, unified persistence, and local session reconstruction, including 46 DeepSeek tests.
  • npm run typecheck and npm run schema:session:check
  • make fmt; all make lint prerequisites passed. The first full-lint attempt encountered a shared golangci-lint lock; the targeted make golint retry returned zero issues and the remaining lint prerequisites passed. JavaScript lint reported existing non-blocking warnings.
  • go test ./actions/setup -run '^TestSessionParserSourcesIncludeLocalDependencies$' -count=1
  • make agent-report-progress using installed Bash 5, including build, formatting/lint and impacted tests. The impacted Go target skipped tests because no Go source changed.

The prior failed CI conclusion in run 38028006701 is the unrelated Impeccable reviewer workflow reporting missing_terminal_safe_output; product build, JavaScript tests, typecheck and lint passed on the earlier revision. CI for the latest pushed revision remains unverified; a maintainer must re-trigger it before merge.

Retain observed headless configuration and attributed startup failures without inferring conversation or accounting. Preserve direct canonical inputs and verify native, canonical, and unified persistence with sanitized CI shapes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan marked this pull request as ready for review October 10, 2026 05:35
Copilot AI balanced review requested due to automatic review settings October 10, 2026 05:35
@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Test Quality Sentinel completed test quality analysis.

Test Quality Sentinel skipped because pre-fetch PR data was unavailable: unable to fetch test file diff

🧪 Test quality analysis by Test Quality Sentinel

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Design Decision Gate 🏗️ completed the design decision gate check. See the comment below for the result and any generated ADR draft.

No ADR enforcement needed for PR #67352: the PR does not carry the 'implementation' label (has_implementation_label=false) and adds 0 new lines in default business logic directories (threshold: 100, no custom .design-gate.yml present). 4 files changed.

🏗️ ADR gate enforced by Design Decision Gate 🏗️

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

🧠 Matt Pocock Skills Reviewer has completed the skills-based review. ✅

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ Ponytail Reviewer completed successfully!

Generated by Ponytail Reviewer for #67352

@github-actions

github-actions Bot commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

✅ PR Code Quality Reviewer completed the code quality review.

🔎 Code quality review by PR Code Quality Reviewer

Comment thread actions/setup/js/parse_deepseek_log.cjs Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

One removable scope expansion found.

net: -100 lines possible.

Generated by ✂️ Ponytail Reviewer for #67352 · codex · gpt56 · 13.4 AIC · ⌖ 7.5 AIC · ⊞ 13.5K
Comment /ponytail to run again

Comment thread actions/setup/js/parse_deepseek_log.cjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The configured provider is still discarded by unified-session projection.

1 open finding
What changed in this PR

Extends DeepSeek parsing to retain partial-session evidence and startup failures.

Changes:

  • Preserves configuration, errors, exits, and completed assistant output.
  • Adds sanitized regressions for real run shapes and canonical persistence.
  • Documents headless parsing limits.
File Description
docs/​src/​content/​docs/​reference/​engines.md Documents DeepSeek evidence handling.
actions/​setup/​js/​parse_deepseek_log.cjs Expands parsing and redaction behavior.
actions/​setup/​js/​parse_deepseek_log.test.cjs Adds parsing and persistence regressions.
actions/​setup/​js/​fixtures/​deepseek_ci_logs.cjs Adds sanitized run fixtures.

🧠 Review effort: Balanced


💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.

Comment thread actions/setup/js/parse_deepseek_log.cjs
@github-actions

Copy link
Copy Markdown
Contributor

Comment Memory

Peek at saved memory (pr-code-quality-reviewer)
reviewed_at: 2026-10-10T05:37:50.821+00:00
review_event: REQUEST_CHANGES
top_themes:
  - masked-secret redaction bypass in canonical fallback
  - brittle Node startup-stack detection
files_reviewed:
  - actions/setup/js/parse_deepseek_log.cjs
  - actions/setup/js/parse_deepseek_log.test.cjs
  - actions/setup/js/fixtures/deepseek_ci_logs.cjs
  - docs/src/content/docs/reference/engines.md
comment_count: 2

Note

This comment is managed by comment memory.

Expand the saved memory block to view or edit the persistent context for this thread.
Edit only the text inside the backtick fences; workflow metadata and the footer are regenerated automatically.

Learn more about comment memory

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 55.5 AIC · ⌖ 6.73 AIC · ⊞ 19.9K · ◷
Comment /review to run again

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🔎 Code quality review by PR Code Quality Reviewer · copilot · gpt54 · 55.5 AIC · ⌖ 6.73 AIC · ⊞ 19.9K
Comment /review to run again

Comment thread actions/setup/js/parse_deepseek_log.cjs Outdated

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Skills-Based Review 🧠

Applied /diagnosing-bugs and /tdd — this is a well-evidenced data-loss fix with real Actions-run fixtures and a thorough new test suite (267 passing locally per the PR description). One correctness/security issue in the new harness-failure detection could cause legitimate assistant answers to be discarded or replaced by a spoofed failure if the answer text happens to contain the exact harness-failure log line (e.g. quoted logs or injected content) — see inline comment.

📋 Key Themes & Highlights

Key Themes

  • Unscoped failure-line match: extractHeadlessErrors searches the whole body for the harness-failure sentinel line without the same exclusion logic extractHeadlessAnswer uses to distinguish genuine answer content from infrastructure output, so an answer that merely quotes/mentions that exact line gets misclassified as a real failure (loses the real answer, fabricates session.error/agent.execution).

Positive Highlights

  • ✅ Real, sanitized Actions-artifact fixtures (deepseek_ci_logs.cjs) ground the new startup-failure and timeout paths in actual observed behavior rather than invented shapes.
  • ✅ Extensive regression coverage for ambiguous/partial/injected content (mask redaction, quoted errors, JSON-looking answers, repeated envelopes) shows careful attention to not over-claiming evidence.
  • ✅ Clear doc update in engines.md explicitly scoping what this headless profile does and does not expose.

🧠 Reviewed using Matt Pocock's skills by Matt Pocock Skills Reviewer · copilot · sonnet50 · 95.4 AIC · ⌖ 14.5 AIC · ⊞ 10.1K
Comment /matt to run again

Comment thread actions/setup/js/parse_deepseek_log.cjs Outdated
Keep native parsing scoped to observed headless output, removing the generic canonical fallback and its redaction bypass. Corroborate startup failure framing and wrapper outcomes so quoted harness lines remain assistant text. Support Node file headers with columns and clarify intentional provider projection.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@pelikhan
pelikhan merged commit 47a51a1 into main Oct 10, 2026
51 checks passed
@pelikhan
pelikhan deleted the pelikhan-deepseek-session-audit branch October 10, 2026 10:25
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.

3 participants