Repository navigation
fix(entities): generate public wire types without internal columns (#858) - #1019
Merged
Merged
Conversation
This was referenced Nov 9, 2026
athvin
marked this pull request as ready for review
November 9, 2026 05:26
athvin
force-pushed
the
issue/858-column-visibility
branch
from
November 9, 2026 05:26
32adfe7 to
339ac00
Compare
18 tasks done
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.
Closes #858
What
Generate public-only Rust JSON wire types and TypeScript bindings from column visibility. V19 rejects undeclared secret-shaped columns and hidden identity columns; ApiDoc registers wire types with unchanged schema names.
Why
The published contract currently describes webhook secrets, API key hashes and task token hashes as public properties. A shared entity-level declaration replaces the hand-written webhook projection and keeps these fields out of generated public contracts.
Proof
The contract regression failed on Webhook.secret before the fix. V19 rejected the three missing declarations, and removing the webhook declaration again failed by name. Generator/spec/lint tests and all nine OpenAPI tests pass; make frontend passed (909 unit/component tests, 569 browser tests, 139 existing skips). The full real Postgres/DuckLake tier passed (61 CLI tests, 197 server units, 135 server integration tests; 2 existing integration ignores), and make check passed. Rust CI 42565477342 and frontend CI 42565477245 passed on 32adfe7. Fresh-context review passed on rebased head 339ac00; exact-head Rust CI 42567325111 and frontend CI 42567325109 passed, with all 15 live required contexts satisfied and no failed detect. Merged as cac010d; post-merge verification completed; see the closed ledger below.
Risk & rollback
Expected advisory breaking changes remove three secret properties; all other schema names and properties remain unchanged. Storage rows, DDL and Arrow schemas retain their columns. Revert this PR to restore the prior generation behavior.
Post-merge ledger
Closed by: agent · session
Codex:01a1be1b-0c92-7703-a4c2-25cb2c999baaonMac.lan· 2026-11-09T06:20:27.909960+00:00mainis green with this change on it — merged cac010d; ancestry and generated artifacts verified. Rust 42569224982 attempt 2 succeeded (the first entities attempt failed on an upstream sccache download HTTP 504). Frontend 42569224990, images 42569224957, infra 42569224927 and devcontainer 42569225064 succeeded. The 30-minute watch elapsed at 06:16:36Z; rechecked at 06:20Z.images— 42569224957 built both API and web images for cac010d successfully.deploy— 42569644176 attempt 2 succeeded. Its logged DEPLOY_SHA is cac010d. Both er-api services select blue, with matching image pins and ready 2/2 pods at zero restarts. Prod web-api-blue-7757d66fb6-lwhw7 emitted er-server listening at 2026-11-09T05:52:14.945251Z; dev web-api-blue-7687dfdf75-zcfn9 emitted it at 05:56:51.058427Z. Dev attempt 1 failed only on the upstream operator chart HTTP 504 and passed on retry.Specific to this change
Context — plan, discoveries, measurements, files
Plan
Files: er-entity-spec types/model, er-entity-gen Rust/TS emitters, er-entity-lint rule/fixtures, three entity YAMLs, er-server pg/openapi and regression tests, generated artifacts and routed skills.
Selection: #858 is the unclaimed prerequisite at product rank 1 (#857/#1008), ahead of the other P0 In progress cards (ranks 4–6). PR #1006 is merged; its deployment ledger and #999 remain blocked by peer-owned #1004/#1005 while main CI is monitored.
Discoveries
Fresh-context review at BASE ab349d1 / HEAD 339ac00 found no candidates across instrumentation, tier, reuse and SQL. The large generated diff was divided into generator/spec/lint and runtime/generated-output passes, with separate reviewers per dimension. Reviews excluded gate-covered issues, intended contract removals and pre-existing response projections. The rebase adds only the peer repair’s two Dockerfile changes relative to the locally gated tree.
The advisory checker reports five diagnostics for exactly three removed properties (two were required, task_instance.token_hash was optional); no schema was renamed and no other property changed.
The existing workspace asset guard counts raw braces in test strings; an escaped opening brace made it misclassify the test-only OpenAPI include. The TypeScript check now explicitly parses the declaration prefix and opening object brace; all nine contract tests and the boundary guard pass. Independent scanner hardening is tracked in #1022. Failure preserved at
/tmp/visibility-boundary-red.log.V18 was already allocated to append binding; visibility is V19. JSON+Arrow entities retain the Arrow storage schema while their TS decoder projects the same public fields as the JSON binding. The three expected property removals are the entire OpenAPI shape diff. The existing webhook HTTP list remains its four-field response; only its internal row projection is replaced.
Measurements
Files