Repository navigation
readiness: date the Falco run from its first target; look up the drill, incident and canary runs - #268
Draft
ErenAri wants to merge 5 commits into
Draft
readiness: date the Falco run from its first target; look up the drill, incident and canary runs#268ErenAri wants to merge 5 commits into
ErenAri wants to merge 5 commits into
Conversation
production-readiness-report.sh required the Falco report's run.started_at to postdate the candidate's generated_at. The runner writes run.started_at when it assembles the report, after every target ran (runner.go:308-311); in each preserved real report it is minutes later than the first target's start. A run that began before the candidate was built could therefore be accepted as starting after it, contradicting the written rule that the Falco run must start after the candidate was built. The run now starts at the earliest of run.started_at and every target's started_at, and a report with a target that records no start time is refused. The manifest still names the report's run.started_at, unchanged. Signed-off-by: ErenAri <erenari27@gmail.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Review of the previous commit: the runner writes no started_at for a target it never runs, such as an optional profile the default runner cannot boot (status unsupported; fail in v0.3.7), and the shipped expanded matrix has three. Refusing every target without started_at would refuse such a legitimate report. Now every required or passing target must record started_at, and the earliest recorded start is the run's start. The runbook describes the rule, and the test gains a positive case shaped like a real report (targets start before run.started_at) with an unbooted optional profile. Signed-off-by: ErenAri <erenari27@gmail.com>
Written policy requires the rollback evidence to be the note rollback-drill.yml writes and the incident note to link the deliberately rejected promote-release run. The readiness report checked only that each was a well-formed run ID, so (verified by reproduction) a run ID that does not exist, or a successful ci.yml run, was accepted with attestations verified. With attestation verification on, the drill run must now be a successful rollback-drill.yml run on main and the incident run a completed promote-release.yml run that did not succeed; an unreadable run fails. Which rejection qualifies stays the operator's choice; a successful or unrelated run never does. The test-only bypass is unchanged. Signed-off-by: ErenAri <erenari27@gmail.com>
…and time Review of e033fe6: the drill lookup accepted a fork's pull-request run from a branch named main, any old rollback-drill run, and a note whose Completed time was unrelated to the run (2099). The drill run must now be a dispatched run of this repository that started after the candidate was built, with the note's Completed time inside it; the incident run must be a dispatched promote-release run of this repository. The runbook says the lookups need the network and an authenticated gh. Signed-off-by: ErenAri <erenari27@gmail.com>
Written policy says a canary is a run of the temporary release-candidate-canary workflow, the timed ones from its dated schedule, and that its plan job admits T+24h only 20-30 and T+72h only 68-78 whole hours after publication. Readiness checked only fields the canary evidence reports about itself and made no run lookup. A ci.yml, branch, fork, dispatched, failed or nonexistent run was accepted, and a partial re-run of a failed in-window run, which keeps the plan job's earlier decision, could write evidence long after the window closed (F6). With attestation verification on, readiness now reads publication (T0) from the candidate release, which must be published, not a draft, and not before generated_at. For each canary it reads the run, its attempts and the chosen attempt's jobs: - the run is a successful release-candidate-canary.yml run of this repository from workflow_dispatch (manual) or schedule (timed, on main); - the evidence's completed_at falls inside a successful attempt, in which the "Assemble RC canary evidence" job itself ran and succeeded; - that attempt started at or after T0, and a timed attempt started before its window closed (T0+31h, T0+79h); a first attempt, which ran its own plan job, also completed after the window opened (T0+20h, T0+68h). The attempt, its start, the run's branch and T0 are recorded in the JSON and Markdown. No written rule names the manual dispatch's branch, so it is recorded, not enforced. A re-run started inside the window is accepted, as the windows are written; whether re-runs should count stays an open operator decision. The bypass mode is unchanged. The test's gh stub answers the new lookups in this same commit, because the test runs in ci.yml and in the release quality gates. The runbook no longer says the plan job alone bounds re-runs and describes the new checks. Signed-off-by: ErenAri <erenari27@gmail.com>
This branch has not been deployed
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.
Draft. Merge only on an exact-head operator decision. Release-tooling fix: the readiness report enforces rules that written policy already states and the script did not. No new policy: no new threshold, no shortened window, no re-run policy chosen.
Head:
fdae550d4d24c920f19e7f6f3a26290bcdc184d1(pushed 2026-10-19; its independent review is in progress, so treat this head as under review). Previous head:7f7a4effe2860cc4ee4219b5641d14635afc7b8d.Defect (TD3)
Written policy and
production-readiness-report.shrequire the Falco expanded run to start after the candidate was built:run.started_at> the candidate evidence'sgenerated_at(G). But the runner writesrun.started_atwhen it assembles the report, after every target ran (internal/runner/runner.go:308-311).In every preserved real report,
run.started_atis later than the first target's start, for example:So a run that began before the candidate was built could be accepted as starting after it.
The consumer-evidence analysis found this; its reproduction table is in the task records.
Fix
run.started_atand every target'sstarted_at, and that must be after G.started_at, or the report is refused. An optional profile the runner never booted (unsupported, orfailin v0.3.7, with nostarted_at) does not count. This follows the independent review of425335b; the expanded matrix has three such optional profiles.run.started_at, so its format does not change.Target times are written in UTC by every VM backend (
time.Now().UTC()), the formatiso_epochrequires. The upstream v0.3.7 report carries them too.The second commit makes this change and updates the runbook (
docs/production-release-process.md, Falco bullet) to describe the rule. That bullet no longer says "as for the campaigns": campaigns are dated by their own metadata, and the review found that gap covered in practice by the campaign workflow's publication check.Second defect (F3): drill and incident runs were never checked
Written policy (
docs/production-release-process.md) says the rollback evidence is theevidence.mdthatrollback-drill.ymlwrites, and the incident note links the deliberately rejectedpromote-releaserun. The script checked only that each was a well-formed run ID.A test specialist confirmed by reproduction that all of these were accepted (the first two with attestations verified):
1(404 on GitHub);38446833676, a successfulci.ymlpull-request run;Commits
e033fe6and7f7a4effix this. With attestation verification on, both runs are looked up withgh api, and an unreadable run fails:rollback-drill.ymlrun of this repository onmain, started after the candidate was built, with the note'sCompleted:time inside the run.promote-release.ymlrun of this repository that did not succeed.Which rejection qualifies stays the operator's choice; a successful, unrelated or forked run never does. An old drill run is refused. An old rejected incident run is still accepted by design, because policy accepts an earlier candidate's incident. The test-only bypass is unchanged.
Third defect (F6, T5): canary runs were never looked up
Written policy says a canary is a run of the temporary
release-candidate-canaryworkflow, the timed ones from its dated schedule, with components from that run, and that its plan job admits T+24h only 20-30 and T+72h only 68-78 whole hours after publication (T0), so that "any out-of-window invocation exits after the planning job" (docs/production-release-process.md:62-71, 180-191at7f7a4ef;.github/workflows/release-candidate-canary.yml:47-61). The readiness report made noghcall for canaries, even in attested mode. It checked only fields the evidence reports about itself.Reproduced against
7f7a4efin attested mode (all accepted):ci.ymlrun, a run on a branch, a run from a fork, a dispatched run labelled T+24h, a failed run, or a run that does not exist;Commit
fdae550fixes this. With attestation verification on, readiness now:GET releases/tags/<candidate tag>. The release must exist, not be a draft, and havepublished_atat or after G;GET actions/runs/<id>). It must be a completed, successful.github/workflows/release-candidate-canary.ymlrun ofKernel-Guard/bpfcompat, fromworkflow_dispatch(manual) orschedule(timed). Timed runs must be onmain;GET .../attempts/<n>, n = 1 torun_attempt) and selects the successful attempt whose[run_started_at, updated_at]contains the evidence'scompleted_at. A failed attempt never counts;GET .../attempts/<n>/jobs). ItsAssemble RC canary evidencejob must have succeeded and started at or after the attempt'srun_started_at. This proves the job ran in that attempt and was not carried over or skipped: an out-of-window or late "Re-run all jobs" attempt also concludessuccess, with every job skipped;completed_atat or after T0+20h (T0+68h).The output records
workflow_run_attempt,attempt_started_atandhead_branchfor each canary, andcandidate.published_at. The Markdown table gains Attempt, Attempt started and Branch columns. Bypass output records them asnull/ "not looked up". The new keys are additive; the stable gate reads only.canaries | length == 3.What this does not choose (open operator decision, D-CAN-2): a re-run that started inside the window is accepted, because that is what the windows as written imply. The alternatives stay with the operator:
This should be answered before the rc.5 T+24h window opens (T0+20h): under "no re-runs", an in-window re-run is futile.
Two readings, recorded rather than enforced:
docs/production-release-process.md:62-71). The branch-shakeout rule indocs/engineering/orchestration.md:79covers three other workflows. Sohead_branchis recorded for the manual canary, not enforced. Requiringmainis a one-condition change if the operator wants it.Assemble RC canary evidence(release-candidate-canary.yml:388-389). A renamed job fails closed. The test checks that, while the temporary workflow exists, it still uses that name.The runbook (
docs/production-release-process.md) now says that a partial re-run is not a new invocation and that the plan job alone does not bound it. It no longer says "The plan job itself enforces the upper bounds", and it describes the new checks and the open decision. The test's gh stub answers the release, runs, attempts and jobs in the same commit as the script change. The test runs inci.ymland in the release quality gates of every main push andv*tag build, so it must be green at every commit.Validation
Evidence labels: LOCAL = run on the maintainer host; hosted = GitHub Actions. PR CI is not qualification.
7f7a4ef: 12 of 12 check runs succeeded (re-read by GET 2026-10-19T18:23Z). Hosted CI for this head has not run (account billing lock; see the note at the top).fdae550:scripts/production-readiness-report_test.shPASS. It now has 26 new canary cases (22 refusals, 4 acceptances) plus lookup and record assertions:completed_at, a late re-run whosecompleted_atwas edited into the window;7f7a4effails at the first new assertion. In a report-mode copy, all 39 new assertions fail: the 26 cases, the 10 lookups, the 2 record checks and the re-run Markdown row.<to<=, 31→32, 79→80), attempt-1 floor (removed, 20→19, 68→67), T0 ≥ G, release not draft, unreadable run or release tolerated, attempt fields not recorded, manual branch enforced, and the workflow renaming its evidence job.completed_atwas approximated by the real evidence step's start, because the artifacts were not downloaded. On real data, the margin betweencompleted_atand the attempt'supdated_atis 3-8 s, and between the attempt's start and the evidence job's start, minutes.ci.yml's test and build steps onfdae550: 40 steps ran, 0 failed, 1 skipped (go mod download, by design of the vendored offline replay); shellcheck clean at warning severity, and at default severity apart from one pre-existing SC2015 info; a trial merge with release: let the stable PR and tag build pass the stable canary-pin and doc-pin checks #266 (4cb4516) merges cleanly, and the test passes on the merge.425335bande033fe6(no blocker; their should-fixes are addressed);make check-release-consistencyand the freeze check.Not changed (verified, left as decisions or residuals)
head_shanames the candidate, is a possible hardening.published_at; the plan job uses the designation'sCANDIDATE_PUBLISHED_AT. The window rules are exact necessary conditions only if the two are equal. Only release: prepare v0.4.0-rc.5 metadata and an offline, AST-based RC preflight (replaces #264) #265's read-only preflight compares them.completed_at(runner clock) must fall inside the attempt span (GitHub clock), with no tolerance. A runner clock running several seconds fast could refuse a genuine canary. This fails closed, like the drill check.updated_atstays at its own end after a re-run (observed on run 38446833676; not documented). Re-run behaviour itself is from GitHub docs and one observation; no canary run has ever been re-run.<check>.jsonrecords are still not checked on disk, yetcomponents_verified: trueis written (READINESS-CLAIMS F6-C6). The external-consumer run is not looked up.release-artifacts.yml, not changed here): it does not require the new fields, so a readiness file made with an old checkout would still pass it. The readinessrollbacksection check (R07 F1) is being handled on a separate branch.release-candidate-canary.yml:3-5, corrected in the rc.5 designation PR) and the preflight comment in release: prepare v0.4.0-rc.5 metadata and an offline, AST-based RC preflight (replaces #264) #265 (scripts/rc-preflight.sh:33-34).incident.candidate_bound: a text match (F2), informational only.workflow_run_idandcommit_sharemain operator-asserted.candidate_bound), not enforced.