Repository navigation
Description
Problem
ProPR runs the validation commands from .propr/workflow.yml inside the agent container after the agent exits. The per-command outcome is observed in structured form (WorkflowObservation / WorkflowMarkerCollector in packages/core/src/workflow/workflowExecution.ts), but executeWithRepositoryWorkflow only renders it into a markdown string (buildRepositoryValidationReport) and discards the structure. The only thing that survives is AgentExecutionResult.repositoryValidation / ClaudeCodeResponse.repositoryValidation (markdown text).
Several planned features need to read the outcome programmatically (a PR digest section, a base-commit test-strength check, escalation after a failed validation, a validate-before-merge gate). Today nothing can.
Goal
Keep the structured per-command validation result next to the existing markdown, and persist it on the task timeline. No behaviour change: validation still never gates commit or PR creation, and the rendered markdown stays byte-identical.
Acceptance criteria
- A typed, serialisable result exists (for example
RepositoryValidationResult { commands: Array<{ index, command, status, exitCode?, verified }>, overall }) with a closed status vocabulary covering the cases rendered today: passed, failed (with exit code), timed out, killed, not run, not observed, plus the existing "unverified" qualifier. executeWithRepositoryWorkflowreturns the structured result alongside the markdown report; both are derived from the same observation so they cannot disagree.- The structured result is carried on
AgentExecutionResultandClaudeCodeResponseand copied whereverrepositoryValidationis copied today (src/jobs/issueJob/agent.ts,src/jobs/prFileUtils.ts). - For issue runs and PR follow-up/
/fixruns, the structured result is written totask_historymetadata under a stable key, following the existing convention used byrepositoryWorkflowHistoryMetadata,networkEgressandautoMergeDecision. It is therefore visible through the task history API and MCPget_task_eventswithout new endpoints. - Command strings stored in metadata go through the same redaction/bounding already applied to the markdown report.
- The markdown shown in PR bodies and completion comments is unchanged (existing byte-identical tests keep passing).
- A run with no workflow or no validation commands stores nothing (no empty object noise).
- Unit tests cover each status mapping, the structured/markdown parity, and the timeline metadata write for both the issue path and the PR-comment path.
Out of scope
- Making validation gate anything.
- Any UI changes.
- New workflow keys.
Implementation
Key files:
packages/core/src/workflow/workflowExecution.ts:executeWithRepositoryWorkflow(maps marker codes to statuses),buildRepositoryValidationReport,WorkflowObservation,WorkflowMarkerCollector.packages/core/src/agents/types.ts(AgentExecutionResult.repositoryValidation),packages/core/src/claude/claudeService.ts(ClaudeCodeResponse.repositoryValidation).- Copy sites:
src/jobs/issueJob/agent.ts(agentResultToClaudeResponse),src/jobs/prFileUtils.ts. - Callers:
src/jobs/repositoryWorkflow.ts(runRepositoryWorkflow,repositoryWorkflowHistoryMetadata),src/jobs/issueJob/agent.ts,src/jobs/prCommentAgentUtils.ts. - Timeline-event precedents that do not change task state:
recordNetworkEgressEventinsrc/jobs/networkEgress.ts,recordAutoMergeDecisionEventinpackages/core/src/services/autoMergeGate.ts.
Approach: introduce the structured type in core (put the browser-safe type in packages/shared if the UI/API will need it), build it in executeWithRepositoryWorkflow from the same observation used for the report, and render the markdown from the structured value so there is one source of truth. Add the field to the result types and copy sites. Write one non-lifecycle task_history event (or extend the existing workflow metadata) with the structured result after the agent run.
Tests: packages/core/test/repositoryWorkflow.test.ts, test/prCommentAgentUtils.test.ts, test/workflowContainerSmoke.test.ts, test/prTemplateDescription.test.ts (must stay green unchanged).
Verification: npm run test:prepare, npm run typecheck, node scripts/run-test-suite.mjs <changed test files>, and eslint --max-warnings 0 in each touched package (CI enforces max-lines 400 and complexity 20 as errors).
Activity
propr-dev commentedon Nov 11, 2026
🤖 AI processing has started for this issue using claude agent with claude-opus-5-5 model.
I'll analyze the problem and work on a solution. This may take a few minutes.
Processing Details:
claudeclaude-opus-5-53429/claude-opus-5-5-keep-repository-validatio-20261111-1911-dpvmainissue-3429-20261111-1911-claude-opus-5-5-dpv🔍 Track Task Execution