Expand description
Back-half paydown 1D.5a (#4003): the cross-language BYNK_* protocol.
The toolchain hands generated TypeScript a small set of names: environment
variables on the node/tsx process that bynk test starts, and entries
in a Worker’s env (a [vars] entry or --var, a binding, a secret) that
bynk dev, bynk deploy and the emitted wrangler.toml set. Rust writes
each name and TypeScript reads it, so the two spellings must agree.
This module is the one definition of each name. Every Rust writer uses
these constants (or a pub use of one kept at its older path), so a
misspelt name in Rust fails to compile. The TypeScript readers are written
by hand and keep their string literals, so the emitted output does not
change. xtask/tests/env_protocol.rs holds them to PROTOCOL instead:
every BYNK_ token a reader spells must be a name here, and every reader an
entry lists must still spell its name.
Only the protocol lives here. Names that Rust alone reads or sets
(BYNK_HOME, BYNK_NO_INSTALL, BYNK_PHASE_TIMING and the like) stay with
their owners, and test gates stay in the tests (#4003, Decision E). No name
here may be renamed: each one is part of what a generated program reads.
Structs§
Enums§
- Carrier
- How a name reaches the TypeScript that reads it.
- Reader
Dir - Where the hand-written readers live.
Reader::pathjoins a reader’s file to its directory, so a directory that moves changes one line here. The test runtime’s readers aretesting/<name>.tsunderReaderDir::Runtime(1B.3a, #4047): the sources, not the spliced artifacts inbynk-emit/src/testgen. - Shape
- Whether an entry is one name, or the prefix of a family of names.
Constants§
- CALL_
FROM_ BYNK_ DEV - The edge key from
bynk dev inspect’s caller,bynk.dev: theCALL_FROM_PREFIXfamily’s one fixed member. - CALL_
FROM_ PREFIX - The prefix of the secret a callee holds for the edge from one caller, followed by the caller’s edge suffix.
- CALL_
TO_ PREFIX - The prefix of the secret a caller holds for the edge to one callee, followed by the callee’s edge suffix.
- CONTAINERS_
UNAVAILABLE - The
wrangler dev --varthat tells a generated container class its containers are off (bynk devwithout Docker). - DATASET_
PREFIX - The prefix of the
[vars]entry naming an Analytics Engine dataset’s table, followed by the binding name. Reserved in[test.targets]vars. - DEV
1on every Workerbynk devserves, so a provider can tell a development session from a deployment.- DEV_
ACK_ AI [dev] ai = "allow".- DEV_
ACK_ AI_ SEARCH [dev] ai-search = "allow".- DEV_
ACK_ ANALYTICS_ SQL [dev] analytics-sql = "allow".- DEV_
ACK_ MTLS [dev] mtls = "allow".- DEV_
ACK_ PREFIX - The prefix of the
[dev]acknowledgement variables (crate::dev_ack::REMOTE_KINDS). - DEV_
ACK_ VECTORIZE [dev] vectorize = "allow".- DEV_
INDEX_ PREFIX - The prefix of the
[vars]entry giving a local Vectorize index its dimensions and metric underbynk dev, followed by the binding name. - INSPECT_
REGISTRY - The binding name of
bynk dev’s agent-inspection registry. - MIGRATE_
KEY - The secret a
bynk migrate sweepkey is set under for the sweep. - PROTOCOL
- Every protocol name, with who sets it and who reads it.
- SMOKE_
DECLARED_ FILE - The file a smoke run writes the declared statuses it saw to.
- SNAPSHOT_
REPORT 1when the driver wants the snapshot files a run touched reported.- TEST_
FILTER - The JSON test filter
bynk test --filterhands the generated test main. - TEST_
FORMAT ndjsonwhen the driver wants one JSON event per line from a test run.- TEST_
RUN_ ID - The run id a remote test run tags what it writes with.
- TEST_
SECRETS - The secrets of a remote test run, as JSON.
- TEST_
SEED - The hex seed of a property-test run.
- TEST_
SETTLE_ MS - How long, in milliseconds, a test waits for a deferred effect to settle.
- TEST_
STRICT_ WIRE 1when a smoke run treats an undeclared wire shape as a failure.- TEST_
TARGETS - The JSON
[test.targets]a remote test run reaches. - UPDATE_
SNAPSHOTS 1whenbynk test --update-snapshotsrewrites snapshots.