Skip to content

Add job execution view model - #4470

Merged
rentziass merged 4 commits into
mainfrom
rentziass/job-execution-view
Jun 4, 2026
Merged

Add job execution view model#4470
rentziass merged 4 commits into
mainfrom
rentziass/job-execution-view

Conversation

@rentziass

@rentziassrentziass commented Jun 3, 2026

Copy link
Copy Markdown
Member

Part 1 of 2 of adding a job execution view for the DAP debugger. Followed by #4471.

This PR introduces a typed JobExecutionView model so we can define and review the rendered job view separately from the debugger plumbing that will serve it.

The reason for splitting it this way is that the view has its own behavior and invariants:

  • it needs to render a stable synthetic source for the job
  • it needs to preserve source lines so the debugger can point at the right step later
  • it needs to model pre/main/post sections, predicted post steps, and the synthetic Complete job row consistently

Putting that behavior behind a dedicated type keeps the follow-up DAP integration PR much smaller and lets us validate the output shape directly in focused tests.

Example rendered job view:

pre:
- step: "Setup job"
- step: "Pre cache"main:
- step: "Checkout"
- step: "Build"post:
- step: "Post cache"
- step: "Complete job"

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@rentziass
rentziassforce-pushed the rentziass/job-execution-view branch from e92366a to 2901269CompareJune 3, 2026 12:55
@rentziass
rentziass marked this pull request as ready for review June 3, 2026 13:20
@rentziass
rentziass requested a review from a team as a code ownerJune 3, 2026 13:20
CopilotAI review requested due to automatic review settings June 3, 2026 13:20

CopilotAI 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.

Pull request overview

Introduces an internal JobExecutionView model under Runner.Worker.Dap to render a stable synthetic “job execution” YAML-like source (with deterministic line numbers) that the DAP debugger can later serve and map stack frames/pauses back onto. This is the rendering/model half of the planned 2-part change, with focused L0 tests validating the output shape and line mapping invariants.

Changes:

  • Add JobExecutionView renderer that splits steps into pre/main/post, supports predicted post steps, and tracks per-step line numbers plus a synthetic “Complete job” line.
  • Add L0 tests covering section rendering, predicted post-step claiming without line shifts, and “Complete job” name collision behavior.
  • Normalize InternalsVisibleTo.cs file header/encoding (no functional behavior change).
Show a summary per file
FileDescription
src/Runner.Worker/Dap/JobExecutionView.csNew typed model that renders the synthetic execution view and preserves step→line mappings for later DAP source/stack mapping.
src/Test/L0/Worker/JobExecutionViewL0.csNew L0 tests asserting rendered content and stable line assignments, including predicted post-step claiming behavior.
src/Runner.Worker/InternalsVisibleTo.csMinor file header/encoding change; no behavioral impact.

Copilot's findings

  • Files reviewed: 3/3 changed files
  • Comments generated: 3

Comment threadsrc/Runner.Worker/Dap/JobExecutionView.cs Outdated
Comment threadsrc/Test/L0/Worker/JobExecutionViewL0.cs Outdated
Comment threadsrc/Test/L0/Worker/JobExecutionViewL0.cs Outdated
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Comment threadsrc/Runner.Worker/InternalsVisibleTo.cs
Comment threadsrc/Runner.Worker/InternalsVisibleTo.cs
@rentziass
rentziass enabled auto-merge (squash) June 4, 2026 13:59
@rentziass
rentziass disabled auto-merge June 4, 2026 13:59
@rentziass
rentziass enabled auto-merge (squash) June 4, 2026 13:59
@rentziass
rentziass merged commit 9c2a004 into mainJun 4, 2026
11 checks passed
@rentziass
rentziass deleted the rentziass/job-execution-view branch June 4, 2026 14:03
Sign up for freeto 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.

5 participants

@rentziass@TingluoHuang@salmanmkc@AllanGuigou