Repository navigation
feat(health): ask whether the GitHub Release exists - #868
developerz-ai[bot] merged 5 commits into
Conversation
A release-tag.yml cut can fail after the annotated tag exists: the tag lands, then `gh release create` fails, and the tag is left with no Release. No health row asked about the Release, so a half-cut release stayed invisible after ordinary pushes. Adds a ninth health row that reads `gh release view v<tag> --json tagName,isDraft,publishedAt` for the last tag — the command PUBLISHING.md already documents — and judges it three ways: Release missing (unhealthy), isDraft true (unhealthy), published (healthy). An answer it cannot read is X_HEALTH_ROW_UNREADABLE, never a silent green. The brief gains the matching row, and the guard page is regenerated because scripts/health.ts's header states the row count. Dz-Task-Id: tsk_1ec4a6537237ffa2e2f1824d37a335a1
|
Resolve merge conflict on #868
Work landed on #868 — watching it toward merge. 2h13m · 26 tool calls · 17 messages Sessions: coding run · review 1 🤖 developerz.ai, an automated agent, not a human — hv-dedicated-1 (developerz-ai[bot]) · model |
|
A fix round is resolving this pull request's merge conflict with
Status for head 🤖 Posted by developerz.ai — an automated agent, not a human. |
|
File fence widened for a merge conflict resolution. The
Why: The merged scripts/health.ts imports './lib/health-release' (lines 22-23, context lines vs the branch tip — the PR's own module), but the merge never brought that file into the tree. Typecheck fails: "scripts/health.ts(22,40): error TS2307: Cannot find module './lib/health-release' or its corresponding type declarations." and the same at (23,55); the unit step reds on the same missing module. The module must be restored (it holds row 9's read/verdict; health.ts and health-rule.ts are both against the 500-line filesize ceiling that also failed), with its test beside it per the repo's tests-next-to-source rule. The platform granted it under the same area lock a new task takes (no other in-flight task holds these files), after checking the path is not a secret, CI configuration or a human-merge path. Posted automatically by the developerz bot (AI-authored). |
🟡 Reviewed2 actionable comment(s) · grounded on your code ⏱ 2m 13s wall clock · 🤖 developerz.ai — automated review, running on your model and your box. |
There was a problem hiding this comment.
Review summary — 6 file(s), 1 finding(s).
Critical 0 · Major 0 · Minor 1 · Nit 0
completed · reviewer[bot]: Adds a ninth health row for the last tag's GitHub Release. The required orchestrator regression test for an unhealthy Release is missing.
1 non-blocking finding (1 minor; not posted inline)
scripts/health.ts.test.ts:84test reviewer[bot]: The only new Release fixture is published, so forcing the release-exists verdict to healthy still passes this suite, contrary to the acceptance criterion. Add missing-Release and draft-Release cases asserting an unhealthy row and data.healthy false, plus an unreadable-answer case ass…
- CI checks were not shown to the reviewer — GitHub reported no checks on the commit under review, so this review judged the diff without a build result
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/gpt-6.1-sol on box hv-dedicated-5 — 175k in / 680 out over 3 calls; cost unknown: no price on record for router/gpt-6.1-sol.
|
File fence widened for a merge conflict resolution. The
Why: Merged scripts/health.ts has nine rows (this PR adds 'release-exists'), but main's auto-merged scripts/health-dependabot.test.ts was written against main's eight-row health script: its healthyReaders fixture (lines 23-56) pins rows 1-8 only. Every healthAt-based test in it now runs the ninth row's DEFAULT reader (git describe + gh release view subprocesses); when gh refuses in CI the row is unreadable and healthAt returns ok:false with no data.rows — 14 tests fail with "UnreachableError: ok:true always carries data.rows" (health-dependabot.test.ts:136, :215, :238; verify unit step red, 14 failed). The fixture must agree with the merged file: adding the same 'release-exists' override the branch's health.ts.test.ts already pins (tag + found release). I cannot fix this from health.ts or health-release.ts without weakening the unreadable refusal the repo's own brief mandates. The platform granted it under the same area lock a new task takes (no other in-flight task holds these files), after checking the path is not a secret, CI configuration or a human-merge path. Posted automatically by the developerz bot (AI-authored). |
…ithub-release-existence-row-to-health-md--1ec4a653 # Conflicts: # scripts/health.ts.test.ts
…ithub-release-existence-row-to-health-md--1ec4a653
Follow-up intent: Fix failing CI on #868 Dz-Task-Id: tsk_519faf3d2e84fdc95aa357e25ee65f42
|
File fence widened for a merge conflict resolution. The
Why: Resolving scripts/health.ts requires both files. (1) The ours side of the conflict imports ./lib/health-release (row 9's read/judge/command, per health-rule.ts's header), but that module was never committed to the PR branch — the gate now fails with The platform granted it under the same area lock a new task takes (no other in-flight task holds these files), after checking the path is not a secret, CI configuration or a human-merge path. Posted automatically by the developerz bot (AI-authored). |
…ithub-release-existence-row-to-health-md--1ec4a653 # Conflicts: # scripts/health.ts
There was a problem hiding this comment.
Review summary — 7 file(s), 2 finding(s).
Critical 0 · Major 0 · Minor 2 · Nit 0
[bot] Completed review: adds a ninth health row for missing, draft, and published GitHub Releases. Malformed publication metadata is classified as unhealthy instead of refusing the unreadable result. [bot] completed: The missing-Release test does not exercise the required failing subprocess result.
2 non-blocking finding(s) below major (no thread on a re-review — only blocking findings open threads)
scripts/lib/health-release.ts:66minor · bug [bot] A document withpublishedAt: 42becomes an unhealthy verdict rather than X_HEALTH_ROW_UNREADABLE because narrowRelease (scripts/lib/health-narrow.ts:216) converts invalid types to undefined. Validate publishedAt as string or null before accepting the document, preserving null as the unpubli…scripts/lib/health-release.ts.test.ts:131minor · test [bot] The missing-Release test uses stubRunner(), which returns ok:true and code:0, so it passes even if a non-zero gh exit is incorrectly refused before its output is classified. Make this stub return ok:false and code:1 withrelease not found, and retain the missing-lookup assertion.
🤖 developerz.ai review — automated, running on your model and your box. What is this? · Reviewed by router/gpt-6.1-sol on box hv-dedicated-ci-1 — 155.4k in / 872 out over 3 calls; cost unknown: no price on record for router/gpt-6.1-sol.
What
A release-tag.yml cut can fail after the annotated tag exists: the tag lands,
then
gh release createfails, and the tag is left with no Release. No healthrow asked about the Release, so a half-cut release stayed invisible after
ordinary pushes.
Adds a ninth health row that reads
gh release view v<tag> --json tagName,isDraft,publishedAtfor the last tag — the command PUBLISHING.mdalready documents — and judges it three ways: Release missing (unhealthy),
isDraft true (unhealthy), published (healthy). An answer it cannot read is
X_HEALTH_ROW_UNREADABLE, never a silent green.
The brief gains the matching row, and the guard page is regenerated because
scripts/health.ts's header states the row count.
Acceptance
bun run scripts/health.ts --jsonreturns a ninth row in data.rows, in the same order as.dz/briefs/health.md's table, and data.healthy is true only when all nine read healthygh release view v<tag> --json tagName,isDraft,publishedAtfor the last tag, the taggit describe --tags --abbrev=0 --match 'v[0-9]*' origin/mainnames.dz/briefs/health.mdcarries the new row, cites PUBLISHING.md's documented command for the same fact, and its two 'eight rows' statements now say ninebun run scripts/guards-doc.ts --check --jsonreports no drift: docs/architecture/guards.md matches the regenerated health.ts headerbun test scripts/health.ts.test.tspasses, and a new case proves the row can go unhealthy (a missing or draft Release) — the test fails if the row's verdict is forced back to healthybun run scripts/gate-codes.tsstay as they areChanges
scripts/lib/health-rule.ts(edit) — Add the ninth row: extend ROW_IDS with 'release-exists' (append at the end so the existing eight keep their order), add areleaseExistsVerdict(input)pure function returning one RowVerdict that distinguishes three states — Release missing (unhealthy: a tag with no Release is the half-cut release release-tag.yml leaves when itsgh release createstep fails), Release exists and is published (healthy), and Release exists but is a draft (unhealthy:isDraft: trueis not a published Release). Add the fields the verdict needs to RowVerdict (e.g. tagName, isDraft, publishedAt) so the a [trimmed]scripts/lib/health-narrow.ts(edit) — Add the narrowing for the new row'sgh release viewdocument: a function that reads a parsedunknowninto a small shape carrying tagName (string), isDraft (boolean) and publishedAt (string|undefined). It must never throw and never invent a field: a document that is not an object, or one whose isDraft is not a boolean, comes back undefined so scripts/health.ts can refuse the row with X_HEALTH_ROW_UNREADABLE. Note the missing-Release case is signalled by gh exiting non-zero with no JSON document, NOT by a field — the reader must carry that distinction to the judge.scripts/health.ts(edit) — Wire the ninth row: add its entry to the ROW_COMMANDS map (the command it runs, for the X_HEALTH_ROW_UNREADABLE cause), its read interface and reader in defaultReaders (resolve the last v* tag withgit describe --tags --abbrev=0 --match 'v[0-9]*' origin/main— the same tag row 2 uses — then rungh release view <tag> --json tagName,isDraft,publishedAtthrough the existing gh() helper), its judge, and one judge() call in healthAt. The judge must treat a gh non-zero exit with no JSON document as Release-missing (the half-cut release), and an unreadable tag as an unreadable row, neve [trimmed]docs/architecture/guards.md(edit) — Regenerate this page from the guard headers after scripts/health.ts's header changed — runbun run scripts/guards-doc.ts --writeand commit the result, so the health.ts row reads 'nine rows' and X_GUARDS_DOC_DRIFT stays green (scripts/guards-doc.test.ts asserts the committed page matches). Do not hand-edit any other row: this page is generated, never hand-edited.scripts/health.ts.test.ts(edit) — Pin the new row: add its reader to the healthyReaders fixture (a published Release: tagName present, isDraft false, publishedAt non-null) so the existing 'all rows read healthy' case still passes with nine rows; add cases proving the three states — Release missing is unhealthy, a draft Release is unhealthy, a published Release is healthy — and that an unreadable gh answer (no JSON document) is X_HEALTH_ROW_UNREADABLE with ok:false and no data, never healthy. Use expect.unreachable() for a verdict the test cannot see, and make sure each new case can FAIL (a test that cannot fail is a [trimmed].dz/briefs/health.md(edit) — Add the ninth row to the brief's check table, in the same order as ROW_IDS in scripts/lib/health-rule.ts: a signal like 'the GitHub Release exists', whose Command cell isgh release view v<tag> --json tagName,isDraft,publishedAtfor the last tag (the taggit describe --tags --abbrev=0 --match 'v[0-9]*' origin/mainnames), and whose Healthy cell states the three readings — Release missing (unhealthy: the half-cut release release-tag.yml leaves when its Release step fails), isDraft true (unhealthy), published (healthy: isDraft false and publishedAt non-null). Cite PUBLISHING.md's d [trimmed]Verification
bun run verifypassed (exit 0) in 14m 17s.🤖 Opened by developerz.ai for task
tsk_1ec4a6537237ffa2e2f1824d37a335a1on developerz-ai/ultimate.Raised automatically by the
raw_task_triagelane.