Gooo service-grant assessment

Gooo-generated, read-only grant assessment: one request by default; optional ordered requests.

OtherGov0.1.0-preview.15

Gooo Go Ports

Gooo is an experimental language for describing program behavior and retaining how a program was built and run. This repository provides independently checked Go ports and original Gooo compositions. Start with one source change and an observable result.

First task for a coding agent

Open this checkout in Codex, Cursor or Claude Code and ask:

Follow .agents/skills/gooo-first-program/SKILL.md. Run the Gooo example, change its score threshold from 60 to 80, then save and replay a new execution. Show the actual changed result and keep my existing files.

With the supplied inputs, score 75 changes from sensor: high to sensor: low; its other three returned fields stay unchanged. The first-program skill and setup guide use compiler 83928fa and Go 1.27.2 on macOS or Linux. Reuse matching tools or follow the optional prebuilt setup. Initial source setup may download and build them. A source edit needs native execution. Saving generated Go alone is not a run. For an existing Tessl setup, use the project-local source installation to give the same first-program task to your coding agent.

Gemini CLI users can load the same instructions through the optional context extension.

If setup or execution fails, report the first failed step and diagnostic. An incomplete attempt is useful feedback. Share public source and inputs only.

Choose the next useful task

Your taskEntryObservable result
Assess a service-grant changeNative first call or MCP host setupCheck a supported narrowing while preserving one required request; no grant is applied.
Preserve every required request when narrowing a grantOrdered service requirementsInspect the first request that would break, with original order and all 12 Gooo decision fields.
Edit an API policy in GoooEditable policy comparisonCompare edited rules on the same facts and replay each policy. A separate opt-in compiler profile supports extracting helpers.
Check an API policy change in CIExisting policy ActionCompare the same nine facts under two sealed profiles; inspect newly denied requests and optionally fail CI.
Inspect fixed API decisions without a toolchain (optional)Native preview.11 bundlesRun the supplied read/write batch on Linux amd64 or macOS arm64, try synthetic copies and replay the saved comparison. This does not edit Gooo source.
Use Gooo from an existing Go programFour-file Go quickstartRun generated Go with Go 1.27.2; inspect input refusal, policy differences and a widening witness.
Edit an importing Gooo projectSeparate ETag projectExport three source files, edit supported bodies and compare 247 supplied inputs with Go.
Explain a version upgrade decisionVersion eligibilityUse Gooo to explain minimum-version or stable same-major update eligibility, with replayable inputs and refusal reasons.
Edit a patch-line update rule with Gooo 0.6.36-devExperimental same-minor source exampleCompare 27 supplied cases with the original Go package and replay the Gooo results, including a 1,026-byte result declared in source. This separate example requires compiler 31497af3; the checkout keeps its 83928fa pin.
Find a Go API to migratePorted API tableCheck available functions, input domains and Go-to-Gooo result differences before choosing a port.

These examples calculate bounded facts and policy decisions. Live effects still need current host-owned authority and atomic application. Input-only OBSERVED records describe finite runs; they are not expected-output verification or a proof for all inputs. Tell us the real API or automation task you want to solve in the feedback form.

The language engine owns Gooo syntax and compiler development. This ecosystem repository owns the ports, examples and their independent Go references.

More workflows, supported domains and verification history

Use Gooo with a coding agent: follow the first-program skill to edit actual Gooo source, execute it and save a replay. The agent setup guide covers repository discovery in Codex and Cursor, explicit use in Claude Code, and the limits of the existing policy examples.

Install the policy comparison command: run the immutable CLI without cloning. It compares the same nine supplied facts under two fixed profiles and rechecks saved reports; Go 1.27.2 is required.

Compare API policy decisions in CI: run the existing policy review, whose Action pins module revision e723f9af6dc3 and compares nine supplied facts using the fixed original and cel-api-readonly-v1 profiles. In that pinned revision, an otherwise allowed write changes from ALLOW to ACTION_NOT_READ_ONLY, while an allowed read stays unchanged; optionally fail CI on NEWLY_DENIED. The current cel-api-readonly-principal-v1 profile preserves original base denials and also requires principal_present == true and a nonempty raw principal_value for an otherwise allowed read. For that otherwise allowed read, a false presence flag or empty raw value returns EXPLICIT_PRINCIPAL_REQUIRED; a whitespace-only raw value is nonempty because whitespace is not trimmed. These profiles cannot load arbitrary policies, and comparison results do not authorize live API actions.

Try service-policy checks from Go: open the four-file service-policy quickstart. With Go 1.27.2 already installed, follow its README to run Go generated from Gooo without a runtime Gooo compiler. Distinguish invalid input from denial, compare the same request before and after a rule change, and inspect a returned widening witness. These calls compare supplied policy facts; they do not apply a grant or call a service.

Try a Gooo path diagnostic: compare two path spellings, keep both originals, and see whether slash cleaning makes them equal. Run the supplied inputs, inspect three results and save a replay; these lexical facts do not grant access or establish router/filesystem identity.

Try automatic header diagnostics: inspect a header name and value, strictly decode external JSON, then retain both strings and the first invalid byte in a twelve-field Gooo report. No per-request human approval is needed to calculate the facts.

Compose an automatic header-addition decision: the diagnostic-header addition combines header facts, payload admission and twelve supplied request observations. Inspect sixteen fields, preserve the candidate and byte witnesses, then use a fresh Gooo-generated local host for an atomic revision check and application.

Explain an ETag before using it: strong-validator facts retain the original header, parsed tag, remaining input, validity, strength, byte lengths and a reason in thirteen fields. The Gooo composition calculates these facts automatically; it does not authorize or perform an API write.

Compare a selected If-Match value with an ETag: the compatibility core returns Go's original three-state condition as one integer field. A strict two-Text input adapter preserves invalid header grammar while refusing malformed external JSON/Unicode. Header selection, current-resource authority and applying a write remain separate.

Edit the ETag composition in your own directory: export an editable project with three current Gooo sources and a separate Go reference checker. Exporting copies source only; run the exported checker to compare all247 original inputs in seven batches. The optional CRLF mutation demonstrates a typed result difference; these finite checks do not authorize API writes.

This independent ecosystem project implements selected Go standard-library, x/net, x/image and Google UUID functions in Gooo, using independent Go references and saved replay. Its verification catalog contains 56 packages and 67 Gooo source files, including selected HTTP, Unicode, signed-decimal, literal-text, slash-path, UUID, integer, color, duration, rectangle and fixed-point APIs and importing diagnostic programs. Separate IPv4 and other sidecar examples have their own checks and are not added to the catalog's execution totals. The URL component facts sidecar implements bounded net/url.PathEscape and QueryEscape in Gooo and combines both in an original ten-field report. Preserve the input, compare path-segment and query-value encodings, and replay the result. Its strict adapter refuses malformed external JSON or more than 341 decoded UTF-8 bytes. The independent Go comparison and native receipts remain separate from the catalog totals. The RectangleIn/FitsCrop suites have completed finite native execution and saved replay with an independent raw-receipt audit; see the verification evidence. The literal-text workflow includes a reviewed 24-input native pilot and repaired checker. Its source-derived finite coverage is specified below; inspect the current CI/native reports for completed execution results. Historical evidence retains its original source and counts.

The slash-path facts sidecar adds path.Ext, path.IsAbs and an original importing six-field Report. Its separate CI check requires fresh CLI execution and saved replay for 24 boundary inputs per entry, then compares all 9,841 strings over {a,.,/} of lengths 0..8 through each fresh generated native function. Those 29,523 values are direct function comparisons, with 72 CLI and 72 saved-replay outputs counted separately. Before the decimal parser and payload-policy addition, the historical catalog contained 45 ports, 19 consumer programs, 21 consumer activities, 66 suites, 159,909 cases, 2,109 UUID-only compact batches and 7 exhaustive checks. Sidecar values are not added to those historical counters; the new two-suite extension is described below.

The IPv4 address facts sidecar adds six netip.Addr classification predicates over four integer octets and an original importing eleven-field Gooo report. It keeps every supplied integer, reports validity separately, and returns overlapping classification flags. Its CI requires 352 fresh CLI outputs and 352 saved-replay outputs, then compares a freshly generated report on 202 finite tuples with an independent Go oracle: 2,222 typed fields, including 808 original integer echoes. The expanded tuples include otherwise-positive invalid octets and values that would wrap into recognized addresses if converted to bytes too early. These generated-function comparisons are separate from the CLI layer and the existing catalog. Private addresses can also be global unicast; neither flag is a destination permission or a promise of Internet reachability. Parsing and IPv6 are outside this port.

The new IPv4 prefix queries and original equal-priority rule-pair report add two required-record query APIs and an 11-field Gooo decision. The report distinguishes invalid input and non-comparable scope/priority, and returns a canonical network witness only for overlapping opposite effects in a comparable pair. Caller scope is an opaque key, not evidence of actual context or authority. The opt-in checker requires fresh native execution and saved replay for these sources. It keeps 54 CLI outputs and 54 saved-replay outputs separate from 112 fresh generated Report calls; existing catalog counts stay intact.

The signed-decimal parser specializes Go strconv.ParseInt(text, 10, 64) in Gooo and retains original Text, exact int64 values, and syntax/range distinctions, including unsigned-overflow precedence. The original payload admission facts imports it and returns fourteen fields from seven supplied observations. It separates Go-valid signed spelling from unsigned length spelling and reports metadata, access, binding, TE, occurrence, parse, length and budget refusals in an explicit order. It needs no per-request human approval; the host must supply truthful current observations and enforce any effect. It is not HTTP framing, authorization or quota enforcement.

These two ordinary native suites add 256 parser inputs and 101 unique policy tuples, preserving the original 17 policy witnesses first. Before the path Clean/alias addition, the required roster is 46 ports, 20 consumer programs, 22 consumer activities, 68 suites and 160,266 cases; all 66 historical suites and their inputs remain unchanged. The current source partition check gives five parser batches and four policy batches: nine new batches, for 2,072 with the current combined UUID and literal Report compact CI profile (2,118 with UUID-only compact; 2,346 in legacy). The required timing roster is 2,210 records (2,256 with UUID-only compact; 2,484 in legacy). These are source partition requirements, not completed native observations. Fresh native comparison and saved replay remain required for both additions.

The lexical path alias facts example adds Go path.Clean in Gooo and an original eleven-field report. The report preserves both raw paths and explains their cleaned values, absolute/change markers and exact/clean equality. An automatic policy diagnostic can retain these facts in a duplicate-key warning under an explicit host namespace contract; equal cleaned paths do not establish permission, safe paths or router/filesystem identity. Its two appended normal suites contain 9,841 shortlex Clean inputs and 120 input pairs, for 70 suites and 170,227 cases: 47 ports, 21 consumer programs and 23 consumer activities. In legacy workspace mode, existing 68 inputs and selected source closures, seven exhaustive checks and the path-facts sidecar remain unchanged. The focused source partition check gives 77 Clean batches and four Report batches: 81 new batches, for 2,153 with the current combined compact CI profile, 2,295 timing records (final sequence 2,294). The historical PR #101 baseline bound 140 source identities; the updated verifier binds 142 in both workspace profiles. The largest raw case files are 17,823 and 29,661 bytes; the respective source-derived translated upper bounds are 13,970 and 22,680 bytes. These are measured source partition requirements. The historical workspace passed the full 70-suite comparison and saved replay in PR #101 and its merged-main CI. Those completed checks do not establish acceptance of the new workspace profile below. Both entries have portable execution and saved-replay examples in the guide.

The header facts example adds the bounded x/net ValidHeaderFieldName and ValidHeaderFieldValue predicates and an original importing report. It preserves both decoded strings, validity, first-invalid byte witnesses and whole-input descriptive flags. A strict external JSON helper refuses malformed or unsupported input before the Gooo invocation. Its frozen corpus adds 232 name cases, 232 value cases and 476 pairs: 940 new cases across three suites, bringing the required source roster to 73 suites and 171,167 cases. The preceding 70 suites and seven exhaustive checks remain required. Current source native execution, saved replay and CI remain required; earlier completed runs and the historical partition/timing numbers below do not validate this addition. The report is suitable for an explicit automatic header policy and does not require a human decision to compute. HTTP framing, authority and actual effects remain host responsibilities.

The canonical header-key composition separates canonical Text from name validity. It retains the original name, canonical form, change flag, byte lengths and first invalid byte witness in eight required fields. fOO-bAr becomes Foo-Bar; x bad remains unchanged and invalid, with byte offset 1 and octet 32. The port reproduces bounded net/textproto.CanonicalMIMEHeaderKey Text content in Gooo and imports the existing Gooo token predicate. No per-case human approval or HTTP effect is introduced. Two appended normal suites retain all 1,059 input occurrences each, including five repeated keys; independent Go references and saved replay remain required. The preceding 74-suite/171,217-case/2,181-batch prefix is preserved. The completed historical roster contains 76 suites, 173,335 cases and 2,240 batches. The ETag extension below requires a new full run against the updated source tree; earlier observations do not validate the new addition.

The ETag port exposes bounded adaptations of Go's private scanETag and etagStrongMatch helpers. The original strong-validator facts composition keeps raw header validity separate from parsed-tag strength and leftover content. For example, "a", "b" has a parsed first tag and trailing content; W/"a" is complete but weak. Neither is reported as a single strong validator. All operands are decoded Unicode-scalar UTF-8 Text of 0–1,024 bytes; NUL, control characters and invalid ETag grammar remain part of the test domain. The raw strong-match API deliberately preserves Go's helper semantics, including grammar-invalid equal strings beginning with a quote.

Three appended suites retain 192 scanner occurrences (190 distinct strings), 31 raw comparison pairs and 24 thirteen-field reports. Their focused native execution and saved replay cover all 247 inputs in seven batches (3/2/2), with 727 returned scalar values per layer compared with an independent Go reference. The ETag extension required 79 suites, 173,582 cases, 2,247 batches and 2,407 timing records, binding 251 current source files. Full CI and all seven existing exhaustive checks remain required. These are finite diagnostics; current-resource matching, authorization, atomic writes and full If-Match processing are outside this port.

The original diagnostic-header addition adds one importing AssessAddition activity after the preceding 73 suites. It combines the header and payload reports with a twelve-field RequestFacts record to return sixteen typed fields: candidate strings, status/reason, imported facts, first invalid bytes, the observed revision and eligibility. No per-case human approval is needed to compute the decision. The new suite retains all 50 frozen cases in seven fixed batches of at most eight rows; actual Go serialization must fit both raw and translated limits before each CLI launch. The required roster is 74 suites, 171,217 cases and 2,181 batches, with the original 73-suite 171,167-case/2,174-batch prefix unchanged. Fresh public native/replay acceptance is required for this source; private results are not substituted. A later CI stage extracts the unchanged generated program from those fresh receipt bytes, compares all 50 Go-reference outputs, and checks a local atomic host. The host example does not implement a distributed transaction, persistent ledger or authenticated request source.

Full CI selects --workspace-profile dependency-closure-v1 independently of the existing --case-profile uuid-and-literal-report-compact-v1. The workspace profile starts with each suite's historical selected workspace, then follows imports over whole selected packages in their original order. Before the header addition it narrowed 56 of the 70 manifests; the 14 already isolated UUID, literal-text, decimal and path manifests stay exact. Omitting the option, or choosing legacy, preserves the historical workspace and emits no workspace_profile metadata. The explicit profile appears in both the summary and timing header. Timing still binds all 140 existing inputs plus the selector and its tests, for 142 historical source identities, and prints each suite's actual source_set and source_set_sha256. For that historical roster it did not reduce the required 70 suites, 170,227 cases, 2,153 batches, 2,295 timing records or seven exhaustive checks. The new header roster requires a fresh partition measurement.

A local serial ABBA pilot using legacy case-wire serialization on go/net/http:StatusText and app/color-inspector:InspectRGB ran 208 fresh execute/saved-replay commands. Mean command sums were 19.88 seconds with the historical workspace and 17.13 seconds with the narrower workspace. The runs shared a Go cache and include order and cache effects. These two-entry observations establish neither a hosted CI speedup nor acceptance of the other 68 entries. Fresh full-roster native comparison, saved replay and all existing CI sidecars remain required for this profile. The native execution job uses ubuntu-24.04 to keep its selected runner image explicit.

The original automatic redelivery policy uses nine supplied facts to return fifteen fields, including every original input, a next action and its reason. It can select an eligible attempt, stop, refresh evidence or look up an already applied operation without per-case human approval. The application must establish current facts and atomically claim before dispatch; this example supplies no sender, ledger or host adapter. Its separate CI requires 16 fresh CLI outputs and 16 saved-replay outputs, then compares all 12,288 valid tuples through the fresh Gooo-generated function with an independent Go reference and saved-row readback. Each full comparison checks 184,320 typed fields and 110,592 original echoes; full-domain individual CLI/replay counts stay zero. The 36 strict wire and 18 receipt-tamper refusals are also separate from the existing port, path-sidecar and Node/Wasm counters. These finite checks do not establish production delivery safety or a speedup.

The original Retry-After facts prototype composes the existing decimal parser with six supplied observations to return fourteen typed cooldown facts. Its portable headless verifier compares113 inputs with a fresh independent Go reference, replays saved receipts and checks eleven receipt mutations. The starter's60-second delay and59 elapsed seconds produce WAIT with one remaining second. READY_TO_REASSESS requires current facts and a fresh policy assessment; it never grants dispatch authority. This separate full-only CI sidecar leaves the82-suite port catalog unchanged.

The separate Agent Mesh service-pattern example adds a bounded adaptation of MatchServicePattern and an original three-field comparison for one supplied request before and after a pattern change. Its 63 matcher cases (including 12 upstream tests) and 16 original impact cases are separate from the 56 authored APIs and the native catalog above. WIDENED means that this supplied request became allowed; it is not a global grant-inclusion proof or a current authorization. Gooo computes the matches and impact without per-call human approval; the host owns trusted facts and any actual effects. The original single-pattern refinement analyzer also compares the two whole patterns within that bounded grammar. It returns a recognized subset rule or a concrete newly admitted request checked by the imported matcher. For example, changing mcp://*.x to mcp://a.* produces mcp://a.y: testing only the shared request mcp://a.x would miss the widening. This pure decision does not apply a policy change or establish caller authority. Its default Gooo workspaces validate the input grammar themselves and distinguish INVALID_INPUT from a computed denial. See the checked workspace migration for the explicit result schemas and raw compatibility routes.

The automatic policy-change example composes these Gooo decisions with a Go host that owns current state. It applies a change to one in-memory grant only when the candidate is a recognized subset, one configured required request stays allowed, and the writer and revision are still valid. No per-change human approval is required. The demo also shows a stale proposal, a refused expansion, and recovery of a discarded response by operation ID.

The original ordered service-requirement composition checks a proposed narrowing against every request needed by a workflow. For example, narrowing * to mcp://weather preserves a required weather call but refuses a workflow that also requires calculator; first_counterexample: 1 points to the second original request. Gooo validates all supplied items, owns the 256-request policy budget and returns the subset rule plus 12 decision fields. Generated Go provides an ordered-pair API and strict JSON CLI. This separate de99b770 consumer profile keeps the default compiler and 82-suite catalog unchanged. It assesses supplied facts and does not apply a grant.

The appended selected If-Match core retains all284 original input occurrences in five batches. The preserved80-suite prefix has173,866 cases,2,252 batches and2,414 timing rows; its original79 suites retain173,582 cases and2,247 batches. The separate LastIndex port and final-marker consumer append1,783 cases in53 batches. The current required roster is82 suites,175,649 cases, 2,305 batches and2,471 timing rows. Current-source hosted checks must establish these totals independently of private or historical receipts. Seven existing exhaustive dispatches remain unchanged. See the domain, strict input route and reference mapping.

Start here

What would you like to do?Start withWhat you can change
Compare service-policy facts from a Go programFour-file Go quickstartUse Go 1.27.2 to inspect input refusal, a request-specific policy change, and a returned widening witness; no grant is applied
Edit service-policy inputs in the browserChecked service-policy toolDistinguish malformed input from a valid refusal, compare one request, or inspect a whole-pattern widening witness from the existing Gooo APIs; inputs stay in the browser
Compare an API policy change and recheck saved resultsAPI policy comparisonSupply nine facts to two fixed profiles, inspect all fifteen changed fields, and recheck an imported report; unsigned results do not authorize a live action
Try Gooo without installing anythingInteractive tutorialChange a score and label, see the returned record, and read the two Gooo source files
Edit source and save generated Go in the browserGooo code editorEdit one source file and generate Go for one activity; save the current Go code or original response JSON. Generated Go is not executed
Find a literal phrase without installing anythingLiteral searchSupply two strings, see the first UTF-8 byte position and non-overlapping count, and save an honest browser observation
Inspect Google's UUID parser return behaviorUUID parse inspectorSupply text, inspect success and the returned UUID even on failure, and save all four fields with the bound input
Edit and run Gooo code locallyRun and edit locallyInstall the pinned compiler, then change the tutorial's condition and rerun it
Apply a constrained policy change automaticallyService-grant applicationTighten a local grant, observe conflict and refusal, and recover a recorded result
Assess supplied service-grant changes from a scriptGrant-update stdin CLICheck supported narrowing and preserve one required request; inspect eligibility, refusal or invalid input without applying a write
Assess a service-grant change without installing GoNative preview.12 first callVerify the matching bundle, submit a JSON array and retain its decision; no grant is applied
Let an MCP host inspect a service-grant changeNative MCP preview.13 and host setupLinux amd64/macOS arm64 executable that runs without installing Go, Gooo or Python; supply four exact facts and retain the decision and source bindings; no grant is applied
Search a diagnostic phrase locallyLiteral-text reportSupply text and a phrase; export the first byte offset, non-overlapping count and both original inputs
Find the final repeated diagnostic marker locallyFinal-marker reportCompare first and last UTF-8 byte positions, retain overlapping last matches, and replay the eight-field result
Split a literal separator or remove an edge affixLiteral Cut reportCompare Cut, CutPrefix and CutSuffix while retaining both original inputs and all eleven returned fields
Parse an exact decimal or inspect payload eligibilityPayload admission factsPreserve all seven observations, distinguish syntax/range/spelling and inspect the first policy refusal; no request or effect is enforced
Diagnose a header automaticallyHeader factsStrictly preprocess external JSON, preserve both decoded strings, and inspect the first invalid byte and twelve returned fields
Plan and apply one diagnostic header locallyOriginal header-addition policy and generated hostCombine header/payload diagnostics with exact request facts, inspect the first refusal, and atomically recheck a local revision before applying
Assess an uncertain API operation automaticallyAutomatic redelivery policySupply nine bound facts, inspect all fifteen returned fields and save a replay; eligibility requires a later host-owned atomic claim
Inspect a selected Retry-After delayOriginal cooldown factsPreserve six supplied observations, distinguish WAIT/UNKNOWN/DOMAIN_REFUSED/READY_TO_REASSESS, and verify113 inputs headlessly; no timer or retry sender
Choose an encoding for an API componentURL context factsPreserve one original Text, compare path-segment and query-value encodings with byte lengths and change facts, and replay the ten-field Gooo result
Classify four IPv4 octets in GoooIPv4 address factsPreserve all four supplied integers, distinguish invalid input from valid addresses, and inspect six overlapping classification flags
Compare two IPv4 rule scopesIPv4 rule-pair factsPreserve typed inputs, distinguish invalid/non-comparable rules and inspect a conflict witness
Detect different spellings with the same cleaned slash pathPath alias quickstartInspect three original pairs, change a copied input and save a new execution/replay; no filesystem or authorization action
Use current ports in another Gooo projectCurrent path import walkthroughCopy a separate Gooo workspace, run path.Ext / path.IsAbs through its six-field report and save a replayable record

The older ValidRune import walkthrough remains fixed to preview.2 and its own compiler. Use the current path walkthrough above for the 83928fa compiler and Go 1.27.2.

You can also try 21 library functions in the browser. The library tools and tutorial run fixed, precompiled programs. The experimental code editor uses the actual pinned Gooo compiler library as WebAssembly to generate Go from edited source. It loads about 22 MB, accepts one file up to 64 KiB, and does not support package imports or model-backed generation. Use the local toolchain to execute modified Gooo programs. Browser compilation reports retain their engine UNBOUND_LOCAL_SOURCE provenance; the separately hashed bridge does not turn them into native execution receipts.

Compare Gooo with generated Go without setup: four saved CLI observations show a conditional body, a changed return, one selected activity, and a rejected body. This read-only page preserves the exact source and output from the linked pinned Linux verification; it does not compile edited source or execute the generated Go.

Experimental tooling: Compiler Explorer adapter and Linux verification for inspecting generated Go. Upstream hosted support is under review.

한국어 안내: 설치 없이 튜토리얼 실행, 브라우저에서 소스 수정·Go 생성, 로컬에서 코드 수정, 다른 프로젝트에 가져오기 중에서 시작하세요.

Optionally install the experimental Claude Code adapter for a requested Gooo ETag source edit. Export a separate project and compare the edit against Go using the pinned tools.

Run and edit locally

Start by running and editing the small Gooo tutorial. Use Git, a POSIX shell and a Go installation that supports toolchain selection on macOS or Linux. Choose either the prebuilt or source-build setup below.

Optional prebuilt setup: the v0.6.32-dev release matches this checkout's compiler pin. Choose its macOS amd64/arm64 or Linux amd64 archive. Host Go 1.27.2 is still required for native execution. Download the archive and SHA256SUMS to a new empty directory. For macOS arm64, confirm this hash also appears in SHA256SUMS. In that directory, verify before extracting:

set -eu
printf '%s  %s\n' '987b2910e4830ee2080d4f3a50b27bd068c63a3cfb9e60d1eba38deb7dc68c14' 'gooo-darwin-arm64.tar.gz' | shasum -a 256 -c -
mkdir extracted
tar -xzf gooo-darwin-arm64.tar.gz -C extracted

From the repository root, set these paths to the unpacked executable and a new identity file in that download directory. Stop if either check fails:

set -euC
export GOTOOLCHAIN=go1.27.2 GOWORK=off
compiler_executable=/absolute/path/to/unpacked/gooo
identity_json=/absolute/path/to/new-download/build-identity.json
"$compiler_executable" version --build --json > "$identity_json"
go run ./tools/bootstrap-check.go "$identity_json"

The identity check requires the exact compiler revision and version in upstream.json, Go/native Go go1.27.2, CLEAN_VCS and vcs_modified: "false". Keep existing .gooo, .compiler and receipts untouched. After validation, use "$compiler_executable" instead of ./.gooo in the run/replay commands and skip bootstrap. A checksum or identity failure must be reported before continuing.

To build the pinned compiler from source instead, run from the repository root:

export GOTOOLCHAIN=go1.27.2
export GOWORK=off
./tools/bootstrap.sh
./.gooo package execute --inputs examples/learn-gooo/inputs.json \
  learn-gooo.workspace.json

The four examples include score 75 returning sensor: high. In examples/learn-gooo/main.gooo, change the one if score >= 60 condition to if score >= 80, then rerun the last command: score 75 now returns sensor: low; its other three fields stay unchanged. Follow the edit-and-replay steps to save a new execution record and replay it. Setup downloads the pinned compiler and may also download Go 1.27.2, depending on the installed toolchain. Full native port verification is a separate check.

Upgrading an existing checkout: bootstrap preserves an older .compiler and refuses to replace it. Use a fresh checkout in a new directory, or move both .compiler and .gooo into a separate backup directory before running bootstrap. Keep the old compiler with its saved execution records; this upgrade does not claim that every receipt from an older compiler can be replayed by the new one.

The original 3,147-case corpus is unchanged. A Unicode inspector adds 334 Go-reference cases and 12 explicit domain-rejection cases; six unary byte-domain functions cover all 256 inputs. Color ports and their consumer add separate reference and rejection cases, detailed below. Other domains use finite boundary cases and samples. This is an independent experimental port, not a complete Go package implementation or an official Google/Go project.

The native fixed-point pixel bounds example converts caller-supplied Q26.6 subpixel bounds outward to integer pixels and clips them with the existing rectangle port. It keeps raw empty selections empty, reports invalid/overflowing requests explicitly, and preserves upstream int32 wrap behavior in the two low-level Floor/Ceil ports. It performs no font or image rendering and does not change the browser tools.

Try the browser demo to run 21 HTTP, Unicode, byte, color, and duration functions without installing a compiler. It executes a precompiled Gooo program as WebAssembly; it is not an editor for compiling arbitrary source. The page includes the Gooo source, unmodified generated Go, execution receipts, and an optional reference-check button. Use Copy link to this input to share an exact function input. Opening a link runs it once in the recipient's browser when the compiled program matches; a changed program restores the inputs and waits for Run function. Links carry inputs, not trusted results. Enter three RGB or four CMYK channels (integers from 0 to 255) to see named output channels and an RGB preview. The native RGB → CMYK → RGB inspector reports converted channels, recovered RGB values, and any integer round-trip differences. Choose bits.RotateLeft8 to enter a byte and a signed rotation count and see the eight bits before and after. The native byte rotation inspector also restores the byte and checks its one-bit count. Choose time.Duration.Round or time.Duration.Truncate to adjust an exact signed nanosecond duration to a chosen multiple. The native duration quantizer returns both results and their adjustments. Zero or negative multiples preserve the original duration. Choose unicode.IsSpace to check whether one code point is whitespace according to Go and Unicode 17.0.0. Enter its numeric value or paste one code point without trimming. The native whitespace inspector also reports scalar validity, ASCII whitespace membership, and UTF-8/UTF-16 lengths. This classification does not determine whether a character is visible or safe. See the reproducible Go–JavaScript whitespace comparison for the U+0085 and U+FEFF differences in blank-input checks.

The Unicode text inspector combines six existing compiled Gooo functions for a whole pasted input. It shows each code point's original UTF-16 position, scalar validity, Go whitespace, letter and decimal-digit membership, and UTF-8 / UTF-16 encoding lengths. CR and LF remain separate; combining and joined sequences are shown as their constituent code points. The browser decodes the received UTF-16 text and displays the Gooo results. Download a completed inspection as JSON to retain the exact input, returned values and program version for a bug report or test case. This is a browser application using existing ports, not a new Gooo string API. See input handling, limits, and verification.

The native identifier character classifier adds complete Unicode IsLetter and IsDigit ports. It distinguishes letters, decimal digits and underscore for one identifier character. A reproducible generator preserves every pinned range and stride; these two ports are available in native Gooo workspaces and in the 21-function browser demo. Try the text inspector’s Letters + decimal digits example to compare 가, ١, 𝟎, ², ¼, Ⅷ and a combining accent. These per-character categories do not validate a whole identifier. To use these ports outside this repository, follow the complete Unicode import walkthrough. It builds a separate application from a fixed snapshot, copies both required source files, and saves an execution record for replay.

The native byte-search example imports strings.IndexByte to find one byte in valid UTF-8 Text of at most 1,024 bytes. Its Gooo loop checks the length before each byte access and preserves Go byte offsets, including matches inside a multibyte character. The returned record shows the offset, whether a match was found, the original needle domain and byte length. An Integer outside 0..255 returns -1 as a separate extension. This is not whole-string Unicode searching, arbitrary Go byte-string support, or the whole strings package; the existing 21-function browser tools are unchanged.

The native literal-text report imports strings.Index and strings.Count. Give it a diagnostic snippet and phrase to receive the first byte offset, match count and original input echo in exportable JSON. Each decoded valid UTF-8 argument can contain NUL and multibyte characters and is limited to 1,024 bytes. Matching is case-sensitive and non-overlapping; an empty phrase returns offset 0 and Unicode code-point count plus one. Unicode normalization, arbitrary-byte Go strings and regular expressions are outside this API. The literal search page runs this unchanged importing consumer as a separate precompiled WebAssembly program. Inputs stay local. It shows the captured strings and the decoded strings sent to Gooo, including explicit replacement of lone UTF-16 surrogates with U+FFFD. The downloaded JSON is a browser observation, separate from the checked native report. The existing 21-function dispatcher and Unicode inspector are unchanged.

The native final-marker report adds strings.LastIndex through a separate versioned eight-field entry. For "aaaaa" and "aa", it returns first position0, last position3 and non-overlapping count2. LastIndex includes overlapping matches and returns the text's byte length for an empty phrase. Both arguments retain the same decoded valid UTF-8 Text limit of1,024 bytes. Its1,694 port cases and89 consumer cases use independent Go reference outputs, fresh native execution and saved replay; the original seven-field report and its source closures remain unchanged. These are required finite checks, not a claim that an untested source revision has passed or that diagnostic text is trustworthy.

The native UUID format inspector imports Google's github.com/google/uuid v1.6.0 Validate port. It accepts the original hyphenated, URN, braced and plain-hex forms over valid UTF-8 Text of at most 1,024 bytes, preserving exact error text and the original length-error classification. The inspector adds the original UTF-8 byte length. All checks and error formatting run in Gooo, including a multibyte character cut by the first-nine-byte URN prefix. This is a format check, without UUID generation or parsing into a binary UUID. See API mapping, source and limits. The existing browser library tools remain unchanged; this port and inspector run locally.

The native UUID canonical parsing example uses a separate ParseCanonical Text API to preserve Google's Parse return value through UUID.String(), plus the original error and length-error class. An error can still return a nonzero UUID value, so check parsed before using canonical_uuid. The parser's permissive 38-byte wrappers differ from the Validate format check. The separate browser inspector runs this unchanged activity and exports unsigned observations. See the API mapping and scope.

The native simple case-fold comparison imports unicode.SimpleFold to compare two rune values and show each value's next member in its Unicode simple-folding cycle. For example, K, k, and the Kelvin sign K belong to one three-member cycle. This preserves the pinned Go rules for special cycles and invalid Unicode values; it is a per-rune API, not whole-string folding, normalization, or locale-sensitive text comparison. The browser tools continue to provide their existing 21 functions.

The native case-mapping inspector shows one rune's uppercase, lowercase and titlecase results. The four ports unicode.To, ToUpper, ToLower and ToTitle share the complete pinned case table in Gooo. For dž, uppercase is DŽ while titlecase is Dž. The returned record keeps the original integer and distinguishes the int32 rune domain from valid Unicode scalars. These are simple rune mappings, without locale rules or multi-character expansions such as ß to SS.

The native alpha matte example imports color.NRGBAToRGBA to show premultiplied 16-bit channels, then composites one foreground pixel over an opaque RGB background. For example, red with alpha 128 over white becomes (255, 127, 127). The example preserves Go's encoded-channel integer arithmetic; it does not decode images or perform linear-light blending. All original foreground channels are accepted in the byte domain, including hidden RGB with zero alpha. A channel outside that domain is rejected before arithmetic. Both the port and this importing example are native-only.

The native YCbCr round-trip inspector imports Go's RGBToYCbCr and YCbCrToRGB ports. It preserves the full byte range and the pinned Go fixed-point rules, and shows the recovered RGB channels and their differences. Pure red (255, 0, 0) returns as (254, 0, 0) in this conversion. Use the saved records to investigate integer color conversion; the example does not read image files or perform JPEG compression or chroma subsampling.

The native crop planner imports the recta

Setup from the maintainer

This listing does not have a supported local package template. Use the maintainer’s documentation for its hosted endpoint, authentication, and client-specific setup. No install command has been inferred.

Learn More