Skip to content

Expose browser pool viewport - #78

Open
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-data-source-warmup-configfrom
hypeship/browser-pool-data-source-viewport
Open

Expose browser pool viewport#78
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-data-source-warmup-configfrom
hypeship/browser-pool-data-source-viewport

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose computed nested viewport on kernel_browser_pool
  • preserve omitted viewport as a typed null object
  • require positive width/height and optional positive refresh rate
  • reject explicit null, malformed objects, missing dimensions, and invalid child values
  • update generated Registry docs

Scope

Additive v1 durable read state only. Chrome policy and live acceptance remain separate; no runtime/session fields are exposed.

Tests

Ran focused tests repeatedly, race tests, full short suite, vet, gofmt, module checks, Terraform example fmt, docs drift, and diff checks.

Coverage includes Framework nested-state roundtrip, typed-null omission, omitted refresh rate, malformed/null viewport, missing and non-positive dimensions, invalid refresh rate, and wrong JSON types.

Acceptance not run; live viewport payload behavior remains for the opt-in acceptance slice.

Additional quality verification

  • Gremlins: 40/40 mutants killed after adding the minimum-positive viewport regression test; targeted semantic mutations: 5/5 killed
  • browser-pool data-source coverage: 94.3%; maximum CRAP score: 15.0
  • Godog stack suite: 7 scenarios / 21 steps passed, including the @pr78 minimum-viewport scenario

Note

Low Risk
Additive read-only computed state on an existing data source with validation and broad unit tests; no write paths or auth changes.

Overview
Adds a computed nested viewport attribute to the kernel_browser_pool data source so Terraform can read pool browser window settings from the API.

When the API omits viewport, state uses a typed null object (not unknown). When present, width and height must be positive integers; refresh_rate is optional and must be positive when the field is present. Malformed or invalid API payloads (null viewport, wrong types, missing dimensions, zero/negative values) surface as invalid-response diagnostics instead of silent bad state.

Registry docs for the data source are updated to document the nested schema. Unit tests cover schema semantics, read roundtrip, omission, optional refresh rate, minimum values, and rejection cases.

Reviewed by Cursor Bugbot for commit c851e41. Bugbot is set up for automated code reviews on this repo. Configure here.

@IlyaasK
IlyaasK requested review from Sayan- and tnsardesai and removed request for Sayan- and tnsardesai July 11, 2026 11:28
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 027d9e8 to a2270fa Compare July 13, 2026 13:35
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from deb65f4 to df3b49e Compare July 13, 2026 13:35
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from a2270fa to a60a6b4 Compare July 13, 2026 14:32
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from df3b49e to 16097b4 Compare July 13, 2026 14:32
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from a60a6b4 to 9699f7f Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 16097b4 to 8a4fc9c Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 9699f7f to de2d434 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 8a4fc9c to da6aac2 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from de2d434 to cd0ea6e Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch 3 times, most recently from 7c63d7e to 38e7266 Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 0ac42d2 to 1bcac42 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 38e7266 to 1b81db1 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 1bcac42 to 9396869 Compare July 31, 2026 19:26
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 1b81db1 to 3825585 Compare July 31, 2026 19:28
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 9396869 to 755b731 Compare August 3, 2026 14:18
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 3825585 to f479654 Compare August 3, 2026 14:21
@IlyaasK

IlyaasK commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator Author

@cursor review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit f479654. Configure here.

@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-warmup-config branch from 755b731 to 52a37ce Compare August 3, 2026 14:53
IlyaasK added 2 commits August 3, 2026 10:53
Read viewport configuration into a typed Terraform object. Reject malformed dimensions and preserve omitted viewport and refresh-rate values without partial state.
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from f479654 to c851e41 Compare August 3, 2026 14:53
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