Skip to content

Document extension upload and import - #72

Open
IlyaasK wants to merge 1 commit into
hypeship/extension-acceptancefrom
hypeship/extension-example
Open

Document extension upload and import#72
IlyaasK wants to merge 1 commit into
hypeship/extension-acceptancefrom
hypeship/extension-example

Conversation

@IlyaasK

@IlyaasK IlyaasK commented Jul 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add a runnable kernel_extension example
  • require Terraform 1.11+, matching the resource's write-only archive path
  • track exact archive changes with filesha256
  • publish the same usage and both import forms in generated Registry docs
  • update the examples index without adding a binary fixture

Why this is v1 work

The durable extension lifecycle is implemented and acceptance-covered in the preceding stack. This small PR makes that surface usable and documents the required content-addressed workflow before v1 release.

Resource scope

Documentation and examples for kernel_extension only. Provider behavior is unchanged.

API contract notes

The example uploads a caller-supplied extension ZIP. It does not download Chrome Web Store archives or invoke any browser/session operation.

Terraform state semantics

  • source_path is write-only and requires Terraform 1.11+
  • source_sha256 = filesha256(source_path) is the durable signal for archive replacement
  • the archive path is a variable, so static validation needs no committed binary ZIP

Sensitive fields

No secret values are introduced. The archive path is write-only; the checksum is non-sensitive durable state.

Import behavior

Generated docs show both supported forms:

  • <extension-id> for provider/API-key project resolution
  • <project-id>/<extension-id> for explicit project scope

Tests run

  • gofmt -l cmd internal
  • go test -short -timeout=2m ./...
  • go vet ./...
  • go mod verify
  • go mod tidy -diff
  • terraform fmt -check -recursive examples
  • bash scripts/check-examples.sh (all six examples validated)
  • bash scripts/check-docs.sh
  • bash scripts/check-markdown-links.sh
  • non-live terraform plan for the extension example
  • git diff --check

Acceptance status

No live API operation is needed for this docs-only PR. The preceding acceptance PR contains the guarded real upload, import, replacement, and delete lifecycle test; it remains a required pre-tag run with credentials.

Deferred concerns

  • no binary extension fixture is committed
  • no live API apply runs in this PR
  • profile resource work remains blocked on a tagged SDK with update support
  • no proxy, deployment, API key, app invocation, session, log, screenshot, live-view, force-destroy, or runtime-state functionality is added

GitHub issues

This PR does not resolve an issue. #24 and #25 remain handled by the existing v1 architecture decisions.


Note

Low Risk
Documentation and example Terraform only; no runtime or provider logic changes.

Overview
Documents the kernel_extension content-addressed upload workflow for v1 without changing provider behavior.

Registry docs (docs/resources/extension.md) now include a full example usage block (Terraform >= 1.11.0, variable for the ZIP path, source_path + source_sha256 = filesha256(...)) and an Import section for <extension-id> and <project-id>/<extension-id>.

Adds a runnable extension example and matching examples/resources/kernel_extension snippets (resource.tf, import.sh). The examples index lists the new example and clarifies that examples do not download extensions (wording tweak from “upload”).

Reviewed by Cursor Bugbot for commit 0e38db9. 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 09:10
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from 6c048e0 to 4764988 Compare July 13, 2026 13:34
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch 2 times, most recently from 12a1136 to bf17fc0 Compare July 13, 2026 14:32

@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 bf17fc0. Configure here.


variable "extension_zip_path" {
type = string
description = "Path to a Chrome extension ZIP with a Manifest V3 manifest."

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Chrome brand in example text

Low Severity

The new extension_zip_path variable description names Chrome and Manifest V3. Public examples in this repo are expected to use generic wording instead of product or brand names, matching other examples that avoid company-specific references.

Additional Locations (2)
Fix in Cursor Fix in Web

Triggered by learned rule: Examples must use generic names and URLs — no company-specific references

Reviewed by Cursor Bugbot for commit bf17fc0. Configure here.

@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from 6d28e8a to d50f6f7 Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch from bf17fc0 to 11a1872 Compare July 13, 2026 15:39
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from d50f6f7 to 979a552 Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch from 11a1872 to 210546c Compare July 20, 2026 19:38
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from 979a552 to 24bb022 Compare July 21, 2026 14:46
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch 2 times, most recently from 1207b12 to a7a7a38 Compare July 21, 2026 18:10
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from 54324d8 to d4303ee Compare July 21, 2026 19:51
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch from a7a7a38 to df9604e Compare July 21, 2026 19:51
Add a Terraform 1.11-compatible extension example that tracks exact archive bytes with filesha256, publish the same snippet and import forms in generated Registry docs, and update the example index. This gives users a validated durable upload workflow without bundling a binary archive.
@IlyaasK
IlyaasK force-pushed the hypeship/extension-acceptance branch from d4303ee to 88438e4 Compare July 21, 2026 20:15
@IlyaasK
IlyaasK force-pushed the hypeship/extension-example branch from df9604e to 0e38db9 Compare July 21, 2026 20:15
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