t27.aiРусский

Claim and release

You will learn

How a claim is taken and given back, and why the discipline matters.

A claim is a promise: one client holds the lock, works, and gives it back. The recording takes the claim with tri fpga-claim and the chip that follows it gives it back with tri fpga-release -- take and return recorded back to back, the bench reporting who holds it and then itself free. The spec is the tool card of tri fpga-claim.

Try it

In the recording, watch the claim land and the release land; then in the spec frame find what tri fpga-claim refuses when the lock is held.

Open the interactive lesson →

tri fpga-claim -- taking the bench lock
tri fpga-claim -- taking the bench lock ↗

The bench claim in action: one client takes the hardware lock and the tool reports who holds it.

specs/tools/trios/tri/fpga-claim.t27

// SPDX-License-Identifier: Apache-2.0
; specs/tools/trios/tri/fpga-claim.t27 -- tool gHashTag/BrowserOS:tri/fpga-claim, the `tri fpga-claim` command of the trios loop CLI
; Generated by apps/website/scripts/tools-from-trios-tri.mjs from gHashTag/BrowserOS:trios/bin/tri at 7366096248df; do not edit.
; The CLI the loop timers run (`tri drift` holds ~/.local/bin/tri to the tracked copy). It is another program than
; the Rust tri of gHashTag/t27 and the Zig tri of gHashTag/trinity, so the ID is repository-qualified.
; A card is data and carries no test block. ASCII only (L3). phi^2 + 1/phi^2 = 3 | TRINITY

module tool_trios_tri_fpga_claim;

pub const KIND : str = "tool";
pub const FAMILY : str = "tri-cli";
pub const ID : str = "gHashTag/BrowserOS:tri/fpga-claim";
pub const REPO : str = "gHashTag/BrowserOS";
pub const QUALIFIED_ID : str = "gHashTag/BrowserOS:tri/fpga-claim";
pub const SCHEMA : u32 = 2;
pub const COMMAND : str = "tri fpga-claim";
; The case arm of the dispatcher and the first line of it that does the work.
pub const VARIANT : str = "case arm `fpga-claim)`, line 1908";
pub const SOURCE : str = "trios/bin/tri";
pub const ENTRY : str = "trios/bin/tri";
pub const SOURCE_COMMIT : str = "7366096248dfb09893e9a7d1a0f1c56ced13d16e";
pub const ROUTED : bool = true;
pub const DISPATCH : str = "exec python3 \"$HOME/skills/ax7203-board-loop/scripts/board.py\" claim \"$@\"";
pub const DOCUMENTED : bool = true;
pub const HELP_LINE : str = "tri fpga-claim [who] / fpga-release -- loop iteration lock (exit 75 = held by another)";
pub const CATEGORY : str = "AX7203 board (tern_tc: receipts, UART, formats)";
pub const ABOUT : str = "loop iteration lock (exit 75 = held by another)";
pub const ABOUT_SOURCE : str = "`tri help` (the heredoc under the help arm of trios/bin/tri)";
pub const ACTIONS : [0]str = [];
pub const ACTIONS_ABOUT : [0]str = [];
pub const ARGS : [1]str = ["[who]"];
pub const AGENTS : [0]str = [];
pub const AGENTS_NOTE : str = "No source binds an agent letter to this command: the trios CLI is not named by docs/agents/AGENTS_ALPHABET.md or .claude/agents/*.md of gHashTag/t27.";
pub const WHEN_TO_USE : str = "loop iteration lock (exit 75 = held by another)";
; public/term/tri-fpga-claim/meta.json lists 1 run(s) of `tri fpga-claim`, exit 0. The site plays it at the end of this card.
pub const CAST : str = "term/tri-fpga-claim/session.cast";
pub const WITNESS : str = "source-parse";
pub const WITNESS_SOURCE : str = "gHashTag/BrowserOS:trios/bin/tri at 7366096248dfb09893e9a7d1a0f1c56ced13d16e, read as text (the help heredoc and the top-level case arms); the CLI was not run";
pub const ENABLED : bool = true;

Open the lesson's spec in the player ↗

All lessons