contracts

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

README

Wire-contract snapshots

This directory contains machine-readable consumer snapshots for wire surfaces shared with qURL server components. Each producer keeps a matching snapshot beside its emit site and binds it to production code with its own tests.

Decoders are strict: unknown fields, unsupported schema_version values, and trailing JSON are rejected. Even an additive shape change therefore requires a coordinated update.

qrts_knock_token_login_wire_contract.json pins the knock-token FRP Login metadata key, exact reject tag, consumer needles, and producer wire texts. Set QRTS_KNOCK_TOKEN_LOGIN_CONTRACT to compare a producer snapshot locally. The client binding lives in pkg/share/qrts_contract_test.go, beside the one production NHP/FRP lifecycle implementation.

qrts_recoverable_newproxy_wire_contract.json pins the exact qRTS NewProxy terminal tags that rotate a resource through a fresh NHP admission. Set QRTS_RECOVERABLE_NEWPROXY_CONTRACT to compare a producer snapshot locally.

Ordinary tests remain hermetic and use the committed consumer snapshots.

Changing a contract

  1. Update the consumer and producer snapshots with their bound code and tests.
  2. Bump schema_version for shape changes, not value-only changes.
  3. Land and deploy the coordinated changes in a compatibility-safe order.
  4. Never weaken strict decoding to make mismatched snapshots appear compatible.

Documentation

Overview

Package contracts embeds the machine-readable cross-repo wire-contract snapshots under contracts/ so in-repo tests bind production code to the exact bytes sibling repos vendor. See contracts/README.md for the layout, producer copies, and the change procedure.

Production code must not import this package: the snapshots are test fixtures, and pkg/share's binding tests keep runtime classification and the JSON in agreement.

Index

Constants

This section is empty.

Variables

View Source
var QRTSKnockTokenLogin []byte

QRTSKnockTokenLogin is the consumer snapshot of the knock-token FRP Login contract with the qURL tunnel server. Bound by pkg/share/qrts_contract_test.go.

View Source
var QRTSRecoverableNewProxy []byte

QRTSRecoverableNewProxy is the consumer snapshot of the exact NewProxy terminal tags that require a fresh resource-bound NHP admission. Bound by pkg/share/qrts_contract_test.go.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL