Skip to content

Expose browser pool Chrome policy - #79

Open
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-data-source-viewportfrom
hypeship/browser-pool-data-source-chrome-policy
Open

Expose browser pool Chrome policy#79
IlyaasK wants to merge 2 commits into
hypeship/browser-pool-data-source-viewportfrom
hypeship/browser-pool-data-source-chrome-policy

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • expose computed normalized chrome_policy JSON on kernel_browser_pool
  • confine map[string]any to the raw SDK response boundary
  • canonicalize key order and API-style numeric values without HTML escaping
  • treat omission and explicit null as absent policy for managed-resource compatibility
  • reject non-object response values
  • update generated Registry docs

Scope

Additive v1 durable read state only. No runtime/session fields. Live acceptance remains separate.

Tests

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

Coverage includes Framework state roundtrip, deterministic nested JSON, HTML-sensitive characters, numeric canonicalization, omission/null, and non-object rejection.

Additional quality verification

  • Gremlins: 44/44 mutants killed; targeted semantic mutations: 2/2 killed
  • browser-pool data-source coverage: 93.8%; maximum CRAP score: 15.0
  • Godog stack suite: 7 scenarios / 21 steps passed, including the @pr79 Chrome-policy normalization scenario

Note

Low Risk
Additive computed read-only attribute on a data source with no write or auth paths; behavior is covered by focused tests.

Overview
Adds a computed read-only chrome_policy string on the kernel_browser_pool data source so Terraform can surface Chrome enterprise policy overrides from pool config.

API policy JSON is unmarshaled and re-encoded into canonical JSON (sorted keys, integers normalized from floats, SetEscapeHTML(false) so URLs and markup stay literal). Missing field and explicit null both map to null in state; arrays or scalar values produce invalid-response diagnostics.

Registry docs and unit tests cover schema wiring, end-to-end read, normalization, and rejection of non-object policies.

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

@IlyaasK
IlyaasK requested review from Sayan- and tnsardesai July 11, 2026 11:50

@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.

Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit af40ac2. Configure here.

Comment thread internal/datasources/browserpool/datasource.go
@IlyaasK
IlyaasK removed request for Sayan- and tnsardesai July 13, 2026 13:25
@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-chrome-policy branch 2 times, most recently from a9c7241 to dfdb402 Compare July 13, 2026 14:32
@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-chrome-policy branch from dfdb402 to 20fff2e Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-chrome-policy branch from 20fff2e to f470d3d Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch 2 times, most recently from da6aac2 to 330ef3e Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-chrome-policy branch 2 times, most recently from 2905808 to c9a8321 Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 7c63d7e to 38e7266 Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-chrome-policy branch 2 times, most recently from 220e141 to a0a227d Compare July 21, 2026 20:15
@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-chrome-policy branch from a0a227d to 95039fa Compare July 31, 2026 19:30
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from 3825585 to f479654 Compare August 3, 2026 14:21
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-chrome-policy branch from 95039fa to df69375 Compare August 3, 2026 14:23
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-viewport branch from f479654 to c851e41 Compare August 3, 2026 14:53
IlyaasK added 2 commits August 3, 2026 10:53
Normalize SDK Chrome-policy JSON into stable Terraform string state. Keep loose maps at the response boundary and preserve absent or null policy compatibility.
@IlyaasK
IlyaasK force-pushed the hypeship/browser-pool-data-source-chrome-policy branch from df69375 to 42dcc73 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