Skip to content

test: gate TypeScript fixture freshness in CI - #18

Merged
shivros merged 1 commit into
mainfrom
runner/COD-522-ts-fixture-freshness
Sep 23, 2026
Merged

shivros merged 1 commit into
mainfrom
runner/COD-522-ts-fixture-freshness

Conversation

@shivros

@shivros shivros commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add the existing examples/ts-client check:generated freshness command to GitHub CI before strict TypeScript checks.
  • Extend codegen determinism assertions to read and compare all four generated artifacts, including ts-client/index.ts.
  • Add a committed Iris fixture freshness test that loads its hydra.yaml, verifies the on-disk fixture, compares two independent writes, rejects a stale same-typed TypeScript value in a temporary copy, and verifies the restored copy.

Linear: https://linear.app/codefold/issue/COD-522/hydra-gate-typescript-fixture-freshness-and-byte-identical

Verification

All commands passed on the signed commit:

cargo build --all-targets
cargo test --all-targets       # 60 codegen tests, 14 Notes surface tests, 6 Security Scan tests
cargo clippy --all-targets -- -D warnings
cargo fmt --all -- --check
cargo run -p hydra-codegen --bin hydra-codegen -- check  # examples/notes
cargo run -p hydra-codegen --bin hydra-codegen -- check  # examples/security-scan
cargo run -p hydra-codegen --bin hydra-codegen -- check  # examples/ts-client
npm run check:generated
npm run typecheck
npm run build
npm run test:nested-schema
creed diff
git diff --check

The TypeScript fixture test includes the intentional stale-copy failure and restored verification; no committed generated artifacts changed.

Review panel

  • Reviewer A (GPT-5.6): second-pass APPROVE after fixing the missing TypeScript determinism assertion and changing the stale-copy mutation to a same-typed value.
  • Reviewer B (Gemini 3 Flash): APPROVE; no concrete blockers.

No production emitter/model/runtime, schema, consumer pin, release, publication, credential, deployment, or live behavior changes.

@shivros

shivros commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated Review Panel

Reviewer A — delegated Codex

Second-pass verdict: APPROVE.

The first pass identified two concrete acceptance gaps: the stale-copy test changed only a comment rather than a generated value, and the existing cursor-pagination determinism test still omitted ts_client_ts. Both were fixed before this second pass:

  • the temporary copy now changes the same-typed generated string value ApiError → ApiErrorV2, then restores and re-verifies the copy;
  • unary_cursor_pagination_projects_deterministically_across_surfaces now compares TypeScript output as well.

The updated change correctly wires CI freshness, covers all four artifacts in independent byte-identical writes, exercises the committed Iris fixture with its own config, and preserves the test/CI-only scope. Full Cargo, TypeScript, Creed, and diff gates passed.

Reviewer B — Gemini 3 Flash

Second-pass verdict: APPROVE.

The change meets COD-522: CI runs the existing TypeScript freshness check before strict tsc; codegen tests cover all four artifacts, the Iris fixture, independent deterministic writes, and stale same-typed TypeScript rejection in a temporary directory. No production emitter/model/runtime or committed fixture changes were introduced. The only observation was that the test assumes the current generated ApiError string as its mutation target, which is acceptable for this fixture and scope.

@shivros
shivros marked this pull request as ready for review September 23, 2026 09:41
@shivros

shivros commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Auto-Merge Gate

Confidence: 0.96

Rationale: COD-522 is a tightly scoped CI/test hardening change. The diff wires the existing TypeScript fixture freshness command into CI and adds real on-disk four-artifact determinism plus stale-copy rejection coverage; it does not alter runtime, schemas, generated artifacts, release, deployment, or credentials.

Checks observed: CI Test and Creed context drift completed successfully. The PR is open, non-draft, cleanly mergeable, and both review-panel passes approved the final diff.

Scope limits: This approval covers only the stated test/CI acceptance criteria.

@shivros
shivros merged commit 9ba6885 into main Sep 23, 2026
2 checks passed
@shivros
shivros deleted the runner/COD-522-ts-fixture-freshness branch September 23, 2026 20:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant