Repository navigation
[3429 by Claude Opus 5.5] Keep repository validation results in structured form on the run result and task timeline - #3432
Conversation
…wn report and written to the task timeline. Commit and PR gating are unchanged, and the markdown report is still byte-identical.
What was added
- The type: `RepositoryValidationResult` lives in a new file, `packages/core/src/workflow/repositoryValidationResult.ts`, exported from `@propr/core`. It holds `{ commands: [{ index, command, status, exitCode?, reason?, verified }], overall }`.
- `status` is one of `passed`, `failed`, `timed_out`, `killed`, `not_run` or `not_observed`.
- `exitCode` is set for `failed` and `killed`. For `not_run`, `reason` says why: `execution_ended` or `time_limit_reached`.
- `verified: false` stands for the existing "unverified" qualifier.
- `overall` is `failed` if any command failed, timed out or was killed; `passed` if all passed; otherwise `incomplete`.
- `index` counts from 0, matching the workflow's `validation` list; the markdown keeps showing `index + 1`.
- One source for both forms: `executeWithRepositoryWorkflow` builds the structured result from the observation, then renders the markdown from that result, so the two can't disagree. The stored command strings are the same redacted, shortened text shown in the report. `buildRepositoryValidationReport` and `REPOSITORY_VALIDATION_REPORT_MAX_LENGTH` moved into the new file and are still exported under the old paths.
- Carried through: a new `repositoryValidationResult` field on `AgentExecutionResult` and `ClaudeCodeResponse`, copied in `src/jobs/issueJob/agent.ts` and `src/jobs/prFileUtils.ts`.
- Timeline write: a new `src/jobs/repositoryValidationEvent.ts` adds one `task_history` row that repeats the task's current state, so it doesn't change the task's state. That follows the `recordNetworkEgressEvent` pattern. The metadata is `{ event: 'repository.validation', repositoryValidation: <result> }`, and the reason reads like "Repository validation failed: 1 passed, 1 failed, 1 not run".
- It is called from `runRepositoryWorkflow`, after the capacity slot is released. Both issue runs and PR follow-up/`/fix` runs go through that function, so both are covered.
- The write is best effort: a failure is logged and never fails the run.
- Nothing is written when there is no workflow, no validation commands, or no task row.
Tests
- `packages/core/test/repositoryValidationResult.test.ts` (new) covers every status mapping, including exit 124 counting as failed, not timed out. It also checks that the new markdown matches the old renderer byte for byte, the unverified and not-observed qualifiers, redaction and length limits in what gets stored, and that a run without validation carries no result.
- `test/repositoryValidationEvent.test.ts` (new) checks the row's metadata and repeated state, that nothing is written without validation or a task, and that a failed write is only logged.
- Issue path: a new case in `test/repositoryWorkflowAdmission.test.ts` checks that `runRepositoryWorkflow` records the result after the slot is released.
- PR path: a new case in `test/prCommentAgentUtils.test.ts` checks that `resolveAndExecuteAgent` carries the result through and records it.
Checks run
- `npm run typecheck` passes.
- ESLint with `--max-warnings 0` reports no errors in the changed source files. The test files are outside both lint configs, so those runs only printed "file ignored" warnings, which is how the existing test files behave too.
- The new and edited test files pass, and 13 related existing suites pass unchanged, including `packages/core/test/repositoryWorkflow.test.ts`, `test/workflowContainerSmoke.test.ts` and `test/prTemplateDescription.test.ts`. `test/workflowContainerSmoke.test.ts` finished in about a second, so its container test probably skipped here; I didn't confirm that.
There's nothing to see in the UI, so I didn't make any previews.
|
/ultrafix goal=8 max=10 |
|
🔄 Ultrafix loop started (goal: 8/10, max cycles: 10) First action:
|
|
✅ AI Code Review Complete requested by @propr-ultrafix Posted 1 review: |
🔍 AI Code Review — codex:gpt-6-astraOverall EvaluationThe PR implements structured validation outcomes alongside the existing markdown and persists them on the task timeline. It is merge-ready within the reviewed scope, conditional on the four pending test shards completing successfully. ✅ Consistent representations — Command outcomes are mapped once, and the markdown renders from the same structured entries while preserving existing status text. ✅ Safe persistence — Timeline recording skips absent validation and missing tasks, preserves the current task state, and catches persistence errors without failing the run. ✅ Result propagation — Both response adapters preserve the structured result, with coverage for issue execution and PR follow-ups. This is a static review of the supplied code; no commands were run. The issue description is truncated, so requirements beyond its visible portion could not be assessed. Merge blockersNo merge blockers. SuggestionsThese are optional follow-ups and are not sent to S1: 🟢 Test database insertion failuresThe failure test in ScoreThe implementation is focused, preserves existing validation behavior, and includes useful mapping, propagation, and persistence coverage. No verified blockers or current check failures were identified; four test shards remain pending. Score: 9/10 🤖 Review Details
Copy and edit to choose records from this review: 🤖 Review by ProPR |
AI Implementation Summary
Closes #3429
Branch:
3429/claude-opus-5-5-keep-repository-validatio-20261111-1911-dpvCommits: ✅ Changes committed (797e93d)
AI Processing Completed
Execution Details:
Summary:
Validation results are now kept in structured form next to the markdown report and written to the task timeline. Commit and PR gating are unchanged, and the markdown report is still byte-identical.
What was added
RepositoryValidationResultlives in a new file,packages/core/src/workflow/repositoryValidationResult.ts, exported from@propr/core. It holds{ commands: [{ index, command, status, exitCode?, reason?, verified }], overall }.statusis one ofpassed,failed,timed_out,killed,not_runornot_observed.exitCodeis set forfailedandkilled. Fornot_run,reasonsays why:execution_endedortime_limit_reached.verified: falsestands for the existing "unverified" qualifier.overallisfailedif any command failed, timed out or was killed;passedif all passed; otherwiseincomplete.indexcounts from 0, matching the workflow'svalidationlist; the markdown keeps showingindex + 1.executeWithRepositoryWorkflowbuilds the structured result from the observation, then renders the markdown from that result, so the two can't disagree. The stored command strings are the same redacted, shortened text shown in the report.buildRepositoryValidationReportandREPOSITORY_VALIDATION_REPORT_MAX_LENGTHmoved into the new file and are still exported under the old paths.repositoryValidationResultfield onAgentExecutionResultandClaudeCodeResponse, copied insrc/jobs/issueJob/agent.tsandsrc/jobs/prFileUtils.ts.src/jobs/repositoryValidationEvent.tsadds onetask_historyrow that repeats the task's current state, so it doesn't change the task's state. That follows therecordNetworkEgressEventpattern. The metadata is{ event: 'repository.validation', repositoryValidation: <result> }, and the reason reads like "Repository validation failed: 1 passed, 1 failed, 1 not run".runRepositoryWorkflow, after the capacity slot is released. Both issue runs and PR follow-up//fixruns go through that function, so both are covered.Tests
packages/core/test/repositoryValidationResult.test.ts(new) covers every status mapping, including exit 124 counting as failed, not timed out. It also checks that the new markdown matches the old renderer byte for byte, the unverified and not-observed qualifiers, redaction and length limits in what gets stored, and that a run without validation carries no result.test/repositoryValidationEvent.test.ts(new) checks the row's metadata and repeated state, that nothing is written without validation or a task, and that a failed write is only logged.test/repositoryWorkflowAdmission.test.tschecks thatrunRepositoryWorkflowrecords the result after the slot is released.test/prCommentAgentUtils.test.tschecks thatresolveAndExecuteAgentcarries the result through and records it.Checks run
npm run typecheckpasses.--max-warnings 0reports no errors in the changed source files. The test files are outside both lint configs, so those runs only printed "file ignored" warnings, which is how the existing test files behave too.packages/core/test/repositoryWorkflow.test.ts,test/workflowContainerSmoke.test.tsandtest/prTemplateDescription.test.ts.test/workflowContainerSmoke.test.tsfinished in about a second, so its container test probably skipped here; I didn't confirm that.There's nothing to see in the UI, so I didn't make any previews.
Detailed Logs:
ddb4c26f-8a73-47dd-a9ee-9e273578f35dLog files stored at:
/usr/src/app/logs/executions/issue-3429-2026-11-11T19-27-09-055Z-conversation.json/usr/src/app/logs/executions/issue-3429-2026-11-11T19-27-09-055Z-output.txtLatest Conversation Messages
This PR was created automatically by ProPR after processing issue #3429.
💡 Need changes?
Comment on this PR to request refinements — the AI agent monitors comments and will update the implementation based on your feedback. Keep iterating until you're satisfied!