Flow B: coder PR change-description + faster security review - #44
Closed
elamaran11 wants to merge 2 commits into
Closed
Flow B: coder PR change-description + faster security review#44elamaran11 wants to merge 2 commits into
elamaran11 wants to merge 2 commits into
Conversation
Per reviewer request: the coder now writes a concise, reviewer-facing description of WHAT it changed (and why) to artifacts/description.md as part of its run, and the PR body renders it as a '### 📝 Changes' section ABOVE the existing verification block. Falls back to a neutral line if absent so the body is never empty. - claude path: description instruction appended to the prompt. - kiro path: same instruction appended to SPEC.md (kiro reads --spec). - PR body: new Changes section placed before the <!-- dark-factory:status --> marker, so status.js (which rewrites from the marker down) preserves it on every update. node --check passes.
Two fixes for the 'security review waits ~15 min while the PR already shows a result' problem: 1. Early-exit: the code-review job's status field flips to COMPLETED long AFTER the AWS Security Agent App bot has already posted its findings on the PR. So in addition to polling status, each iteration now probes list-findings; the moment it returns a well-formed result (findingsSummaries present) we proceed — no waiting for the status flip. Reuses those findings for the report (no re-fetch). 2. Graceful timeout: this step is advisory (the App bot posts the authoritative result regardless), so exceeding the poll timeout now posts a neutral 'pending' status + a pointer to the bot comment, instead of a misleading red 'error'. This also fixes the stale sticky board: the sticky-status step depends on security-agent (runs once, after it), so a fast security step means the board is rewritten with accurate rows within seconds instead of ~15 min later. sh -n passes.
Contributor
Author
|
Consolidated into #41 (flow-d-lambda-microvm-sandbox) per request — the coder PR-description + security-agent early-exit commits are cherry-picked there. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flow B improvements: PR change-description + faster security review
Two Dark Factory (Flow B) improvements, both requested during the live dry-run.
1. Coder emits a PR change-description (reviewer request)
The coder now writes a concise, reviewer-facing description of what it changed (and why) to
artifacts/description.mdas part of its run, and the PR body renders it as a### 📝 Changessection above the existing verification block.SPEC.md.<!-- dark-factory:status -->marker, sostatus.js(which rewrites from the marker down) preserves it on every status update.2. Security review no longer blocks ~15 min after the result is known
Observed in the dry-run: the AWS Security Agent App bot posts "No issues identified" on the PR, but our headless
security-agent.shstep kept pollingIN_PROGRESSfor the full timeout because the job'sstatusfield flips to COMPLETED long after findings are ready.list-findings; the moment it returns a well-formed result, we proceed — no waiting for the status flip. (Reuses those findings; no re-fetch.)pendingstatus + a pointer to the bot comment, instead of a misleading rederror.Note on rollout
Change #1 is in the coder image (
entrypoint.js) → takes effect once the coder image is rebuilt/pushed. Change #2 is a hub-side ConfigMap script → live on ArgoCD sync ofdark-factory-hub.Verification
node --checkonentrypoint.js+status.js;sh -nonsecurity-agent.sh.status.js).Generated with Claude Code.