AL
Repository lifecycle commands and reusable Bazel rules
AL is an independent project providing repository lifecycle commands and reusable
Bazel rules. Its source lives in projects/al; its Bzlmod module name remains
rules_al, preserving consumers’ @rules_al labels.
Its direct commands are al config, al run, al version, al release,
al delivery, al bazel test, and al doctor.
Consumers supply plugin configuration, repository and base selections, and release
destinations. They run their normal build, test, and lint commands before source
publication. Calendar versioning, aggregate-commit rules, and scratch conventions
are integration contracts that a consuming repository provides or adopts.
This repository’s configuration and installation wrapper live
in tools/al. The examples and verification evidence
below cover this repository and its isolated fixtures.
The product description follows the
operator-visible command lifecycle, interruption and recovery boundaries, with
verification checklists and source-linked defect triage.
The executable owns signals and startup. internal/cli assembles command adapters;
local release, delivery, versioning, Git, and Bazel packages retain their domain
operations and guards. Reusable configuration, plugin and resource-lifetime APIs
live in pkg/. CLI entry points use the same owning implementations as Bazel
execution tools. Credential plugins start through al run; ordinary lifecycle
inspection and artifact generation do not start them.
AL’s public Bazel API is @rules_al//:defs.bzl, including composable configuration targets, al_config aggregation and small
dictionary inputs, AL run wrappers, release packaging rules, and their providers. The module supplies its
own AL execution toolchain. Existing pinned dependencies are declared locally.
From this repository’s root, build the executable with
bazel build //projects/al:al, or install it with
bazel run //tools/al:install; installation requires the operator’s authority.
Use ordinary Bazel commands for builds and tests. For Git-aware test selection,
al bazel test --base master selects affected tests in the chosen workspace;
--dry-run previews that selection. See the
affected-test reference.
The
repository setup guide describes
per-user Bazel defaults, and Bazel setup describes AL
installation and diagnostics. Release stamping uses the installed al on PATH;
update that installation before building a release from changed AL source.
Operator procedures live in the module’s al-* skills. Workspace preparation,
checks, maintenance, and OpenSpec workflows use existing targets through those
skills; they do not add speculative command groups.
AL also owns repository versions and independent project releases.
The release identity is (project, version): projects share a source version
and process, while each publishes and activates independently. Operators can
run the entire process without CI.
Bazel module API
Consumers depend on rules_al and load its al_-prefixed rules from
@rules_al//:defs.bzl: al_release, al_release_files, al_release_bundle,
al_release_binary, al_release_deployment, and al_release_deps. Providers are
AlReleaseInfo, AlReleaseFilesInfo, and AlReleaseDeploymentInfo.
load("@rules_al//:defs.bzl", "al_release_bundle")
al_release_bundle(
name = "release",
srcs = [":archive"],
project = "projects/example",
)
status_file can supply an explicit stable-status file. Otherwise the bundle
consumes Bazel workspace status when stamping is enabled, and ordinary unstamped
builds emit the constant development version. The standard stamp attribute
controls this behavior. The module builds its own tool and declares
all software dependencies at repository pins. From the monorepo root, run bazel test //projects/al/... and
bazel build //projects/al/.... The release archive retains the standalone module
manifest.
The tests/consumer:check command builds the public API without parent Bazel
configuration imports and automatically verifies its output manifest and payload.
Its README describes launcher invocation and the retained result.json.
Release manifests carry the minimal version, channel, source commit, and tree
state needed to identify a build. Optional GitBundle history supplies changelogs;
AL does not export a complete repository-history JSON document. The exported
git extension configures a consumer’s local checkout and system Git executable;
register the resulting git_toolchain to use @rules_al//:git or al_git_binary.
History generation deliberately reads that checkout locally and is excluded from
remote execution/cache upload. Ordinary portable bundle generation uses only
declared inputs.
git = use_extension("@rules_al//:extensions.bzl", "git")
git.local_git(name = "repository_git")
use_repo(git, "repository_git")
register_toolchains("@repository_git//:git_toolchain")
The al_release documentation rule accepts optional git_bundle and page_template
inputs. This repository’s website supplies its history bundle and shared Hugo
markup through //projects/alwaldend.com/pkg/release_pages:defs.bzl.
Consumers supply their own history and page-template inputs to the module API.
Prepare source
The calendar-version contract remains:
- development:
0.0.0-dev; - nightly trunk tag:
vYYYY.M.D-nightly, using the UTC date once per day; - weekly branch:
releases/YYYY.W; - release tag:
vYYYY.W.PATCH, with patch zero at the branch point and one
increment for every subsequent first-parent commit.
Weekly releases use the ISO week-year and week. The week, nightly month,
and nightly day are unpadded. Inspect source with al version show --format json.
Version operations use native Cobra subcommands: al help version show describes
their flags, and shared flags work before or after the subcommand. Select another
checkout with --repository PATH.
SIGINT and SIGTERM cancel active Git subprocesses. Foreground
Git authentication can use the controlling terminal; AL restores terminal ownership
after the child exits.
Use al version nightly-tag, al release create, or al version release-tag
for explicitly authorized local ref preparation. Each supports --dry-run.
The al-versioning skill documents detached-checkout and calendar details.
For a weekly release, start on clean trunk and run al release create. It
atomically creates releases/YYYY.W and vYYYY.W.0 at trunk HEAD, leaving the
current checkout unchanged. Select the created branch with ordinary Git before
planning source publication or building release artifacts. Use the branch name
printed by create in place of releases/YYYY.W below:
al release create --dry-run
al release create
git checkout releases/YYYY.W
Review and publish the shared source refs:
al version release-plan \
--lease weekly-release --plan out/release/source-plan.json
al version release-publish \
--plan out/release/source-plan.json --receipt out/release/source-receipt.json
Source publication uses a Git-common-directory operation lock, guarded creates,
atomic push, and remote verification. Existing tags are reused only at the
same commit. For a patch, commit and tag on the weekly branch, deliver the
branch normally, then publish its tag; trunk may have diverged. Shared tags
are not project publication status. A stale release-refs.lock directory after
a killed process must be investigated before an operator removes it.
Build one project
bazel build --config=release //projects/autoscroll/releases:bundle
Projects with declared first-party payloads have a releases:bundle target.
The website’s bundle aliases //projects/alwaldend.com:release. The Android,
kustomization, and Terraform module release pages currently declare no payloads;
they provide documentation until their owners define release artifacts.
Existing head release pages are development documentation, not publishable
release identities. Nightly-to-weekly promotion rebuilds version-bearing
artifacts under the weekly identity.
al_release_bundle packages declared payloads as release.json and
files/<filename> in a Bazel directory output. It consumes STABLE_VERSION,
STABLE_VERSION_CHANNEL, STABLE_GIT_COMMIT, and STABLE_GIT_TREE_STATE from
the workspace-status command. First-party publication requires a concrete nightly or
release version and clean source identity. Development bundle manifests and
payloads can be examined locally; release plan, release inspect, and
publication require a publishable identity. Third-party versions continue to
come from their dependency owner.
The build does not contact deployment destinations.
The root release configuration enables stamping and invokes
al version --repository . bazel-status through the workspace-status script.
Install AL before starting the build; the script does not bootstrap a nested
Bazel invocation. Source refs choose the version, and dirty nightly or weekly
source fails stamping. For an ambiguous detached checkout, override
--workspace_status_command with the same status command and explicit
--channel or --release selection.
The CLI equivalent is al release generate --project projects/<name> --version_file <status-file> --add_file <payload> --output_dir <empty-directory>. Repeat
--add_file for multiple payloads. Missing or duplicate status values, unsafe
paths, missing payloads, colliding filenames, and empty bundles fail. The
output directory must be absent or empty. A completed manifest is written
only after payload copying finishes.
Publish over SSH
SSH publication uses the operator’s OpenSSH and rsync executables and requires
rsync and standard GNU filesystem utilities (including flock and mountpoint)
on the destination. No receiver service is installed. Select the environment and
destination explicitly:
bazel run @rules_al//:al -- release publish \
--release_dir "$PWD/bazel-bin/projects/autoscroll/releases/bundle" \
--environment local --ssh_host download-host --ssh_user admin \
--publish_user download --ssh_root /srv/download
The download component provides preconfigured //infra/download:publish.local
and //infra/download:publish.yandex commands. These use the configured SSH
administrator and content account; provision the selected host first.
--ssh_deployment accepts a deployment JSON
with an ssh object. Explicit host or deployment selection publishes every
manifest item; otherwise --environment selects matching SSH item metadata.
OCI manifest/page generation remains available, but OCI publication fails
closed: the former mutable-tag push cannot enforce immutable releases. Select
an SSH destination for publication. An empty selection fails.
Host trust and authentication use normal OpenSSH configuration with strict
host-key checks and noninteractive authentication. --ssh_config,
--ssh_identity, --ssh_certificate, --ssh_disable_agent, --ssh_known_hosts,
--ssh_port, and --ssh_user provide local overrides. Credentials never enter
manifests. Remote commands start from / so the content account does not need
to traverse the administrator’s private home. --ssh_path and --rsync_path select installed executables; the
default deadline is 30 minutes (--timeout).
The public project defaults to the manifest project without projects/;
--project overrides it. --namespace third_party selects external artifacts.
The public layout is <root>/<namespace>/<project>/releases/<version>/<filename>.
Publication copies the complete selected set to private staging, verifies sizes
and SHA-256 hashes locally and remotely, then atomically renames the completed
release under a destination lock. A canonical public release.json binds the
identity and payload set without transport configuration. Directories are
0755, payloads 0644. Shell arguments preserve literal values.
Identical existing releases are verified under the destination lock and succeed
without local payloads, staging, or another transfer. New publications retain a
final locked check after transfer to handle concurrent publishers. Conflicting manifests,
extra files, and corrupt payloads fail. Failed transfers expose no partial new
release. Directories from the former overwrite workflow must be explicitly
deleted before publication through this contract.
Use --receipt /absolute/path/to/attempt.json with artifact publish/delete or
website extract/activate to checkpoint local operation evidence. The private JSON receipt binds the selected
namespace, project, version, source commit, canonical publication digest and resolved
SSH environment/host/root. It records each requested step as pending, unknown
when started, and completed after confirmation. A failed operation preserves
completed steps and leaves an unconfirmed step unknown; even a transport error can
occur after a remote change. status is running, completed, or incomplete.
A killed process may leave running evidence with an unknown step. Use a separate
receipt path for each attempt to preserve history. Receipt persistence must succeed
before remote work starts. Receipts are observations, not authorization or proof
of current remote state. Inspect the destination and compare its publication
digest and observed state with the receipt, then retry any unresolved intended
step. Inspection does not rewrite receipts or authorize recovery operations.
Preview and inspect artifact publication
release plan previews artifact upload using the same bundle selection,
destination overrides, and source identity validation as release publish.
This is separate from version release-plan, which plans Git refs. Website
commands provide their own offline preview through --dry-run.
al release plan --release_dir "$PWD/out/site-release" \
--environment local --ssh_host download-host --ssh_root /srv/download
al release inspect --release_dir "$PWD/out/site-release" \
--environment local --ssh_host download-host --ssh_root /srv/download
The plan emits release/artifact_plan/v1 JSON with mode: offline_metadata.
It reports project/version/source, exact selected payload names, sizes and
hashes, canonical publication digest, destination, public/site paths and steps.
selection identifies explicit host/deployment overrides, which select all
items, or environment selection. Matching destinations are processed in stable
order. The plan reads bundle metadata only: it does not check payload bytes,
contact SSH or rsync, initialize credentials, or claim remote readiness. Missing
local payloads therefore do not prevent previewing an identical publication retry.
The destination includes configured login/content accounts; port and
ssh_user are null when OpenSSH owns their resolution, and publish_user is
null when commands run directly as the SSH login account. Authentication file
paths and credential contents are omitted.
Inspection emits release/artifact_inspection/v1 JSON with
mode: read_only_snapshot and a completion timestamp. It independently reports
each local payload as verified, missing, corrupt, or unreadable and reads
the destination through bounded, noninteractive SSH. Local failures do not
prevent remote inspection. The destination content root must already exist.
| Remote status | Observed meaning |
|---|
absent | No publication exists at the selected version path. |
matching | Canonical manifest, complete file set, sizes, and SHA-256 hashes match. |
conflicting | The regular public manifest differs from the expected canonical bytes. |
corrupt | The path or file types are unsafe, or the expected publication has invalid payloads or extra/missing files. |
unavailable | Transport, timeout, read access, missing content root, or response validation prevented a reliable observation. |
For first-party sites, site.status is absent, retained, active,
conflicting, or corrupt; it is not_applicable for external artifacts and
unavailable when the read fails. A site check verifies the publication binding
and regular root index.html, not every extracted file. site.active independently
reports whether current selects this version, including a corrupt or missing
site, and is null when selection is unknown. site.current distinguishes
absent, selected, other, dangling, and unsafe links. A valid retained
site can therefore have unknown selection if current is unsafe.
Completed inspections exit zero even when they find absent, conflicting, or
corrupt state. Unavailable observations emit their report and exit nonzero;
invalid local metadata fails before an observation report. Cancelling local
verification stops hashing between chunks and prevents the destination read;
no completed snapshot is produced. Neither command
accepts --receipt. Inspection creates no remote locks, staging directories,
or repairs, and uses no rsync transfers. The configured timeout bounds each
destination read; each captured stream is capped at 16 KiB and overflow cancels
the command. This is an observation without a lock, so concurrent publication
or deletion can change the state during or after inspection.
Extract and activate a website
al release publish uploads artifacts. Run al release website extract to create a
retained site from a published archive, then al release website activate to select it.
These are independent commands; neither uploads artifacts. Website commands
accept the same bundle and SSH destination selectors as publication and apply
only to first-party projects.
--site_archive belongs only to extraction; activation and inspection derive
site state from the selected publication and retained binding.
bazel run //infra/download:publish.yandex -- \
--release_dir "$PWD/out/site-release"
bazel run //infra/download:website.extract.yandex -- \
--release_dir "$PWD/out/site-release" \
--site_archive website.tar.gz
bazel run //infra/download:website.activate.yandex -- \
--release_dir "$PWD/out/site-release"
Use .local instead of .yandex for the local environment. Direct CLI commands
take explicit destination flags, for example:
al release website extract --release_dir "$PWD/out/site-release" \
--environment local --ssh_host download-host --ssh_root /srv/download \
--site_archive website.tar.gz --dry-run
al release website activate --release_dir "$PWD/out/site-release" \
--environment local --ssh_host download-host --ssh_root /srv/download --dry-run
Each --dry-run returns the offline metadata plan for that one operation. It
does not inspect archive bytes or remote state, contact SSH, or write a receipt.
Remove --dry-run to perform the chosen operation. Mutating commands accept
--receipt; combining it with --dry-run fails. Use al release inspect for
read-only publication, retained-site, and current-selection observations.
Extraction accepts a declared .tar.gz or .zip archive containing a root
index.html. It retrieves and verifies the published archive, extracts locally,
and promotes the site to sites/<project>/releases/<version>. Local free space
must hold both archive and extracted content. Traversal, absolute paths, links,
devices, duplicate names, and more than 100,000 entries fail. Archive ownership,
executable bits, and extended attributes are not retained.
Retained sites carry a binding to the exact publication. Activation checks this
binding and the public payloads under the destination lock, then atomically
selects sites/<project>/current. Managed ancestry must use real directories without nested mounts. Activation
also rejects mounts within the selected extracted site. Failed earlier steps leave activation
unchanged. Roll back by selecting another retained release with al release website activate.
Delete and republish
Use the same manifest and explicit SSH destination with delete:
bazel run @rules_al//:al -- release delete \
--release_dir "$PWD/out/site-release" --environment local \
--ssh_host download-host --ssh_root /srv/download
Deletion removes the project release and its extracted site at that destination.
It refuses the currently selected website: first select another retained release
with al release website activate. Deletion refuses symlinked ancestry and mounted target directories or descendants, including bind-mounted files,
before either tree is removed. Deleting an absent release succeeds. Shared source tags
remain. No tombstone or restoration manifest is retained; ordinary publish
works again after deletion, including with different artifact bytes.
Infrastructure synchronization
The download component owns the explicit local-to-public Ansible mirror through
//infra/download:sync.yandex. AL publication preserves immutable identities; the
separate mirror replaces public content from the authoritative local store and
removes public-only content. It preserves locally retained archives and sites.
See the download runbook for check-mode preview,
serialization, staging, and failure boundaries. AL has no synchronization command.
The manual //infra/download/test/sync:sync_test fixture uses real loopback SSH,
rsync, and an isolated mount namespace to exercise AL publication and the packaged
Ansible mirror. Its receipt records hashes, permissions, links, and failure cases.
Plugins
The built-in injector evaluates named resource graphs
inside AL and owns generic environment, file and process resources. Eligible
plugins advertise resource types in their startup response and supply
them through generic resource-fetch RPCs. Startup returns an extensible
PluginStartResponse with an optional generic result; fetches return ResourceResult
directly. The standalone Vault provider
owns Vault-specific resources. See the configuration API.
1 - AL Bazel rules
Configuration, command, Git, and release rules
AL rules and macros use the al_ prefix; AL providers use the Al prefix.
Their source filenames follow the same prefix in snake case. The public API is
exported through @rules_al//:defs.bzl, with usage documented in
the project README.
Configuration targets
Declare small al_vault_auth, al_vault_conn, al_plugin_config and
al_plugin targets, then combine their labels with al_config(configs = ...).
Keep short, single-use declarations in BUILD, including small dictionaries and
direct calls to existing macros. Extract namespaced local defs.bzl macros only
when they provide significant reuse or make complex graphs, construction logic,
long templates or bulky settings substantially easier to read. A single KV
source and a few environment exports can stay inline. Put genuinely common
patterns in reusable target macros with their owner; avoid wrappers that merely
bind a few fixed attributes.
load("@rules_al//:defs.bzl", "al_config", "al_vault_auth")
al_vault_auth(name = "shared_auth")
al_vault_auth(
name = "component_auth",
extends = ":shared_auth",
approle = "example",
)
al_config(
name = "config",
configs = [
":component_auth",
":shared_auth",
"@rules_al//plugins/vault:config",
],
)
configs combines definitions independently of list order. An atomic target’s
extends selects another atomic target of the same kind. For the same runtime
name, the descendant replaces the complete definition; shared ancestors are
included once. Unrelated definitions with the same kind and name fail analysis.
In the example, both auth targets name default, so the output contains one
auth method using the component AppRole. Command wrappers combine multiple
config targets with the same rules before passing a generated file to AL.
Extensions between differently named injection groups retain both namespaces.
Generated groups carry their explicit parent identity; selected descendant
resources override ancestors independently of map iteration. Identical unrelated
resource definitions coalesce, while differing unrelated definitions fail.
Aggregate references follow normal formatter ordering. Builds never authenticate
or start plugins.
al_config(config = {...}) remains available for small inputs. Its vault_auth,
vault_conn, plugin_configs, plugins and inject sections are dictionaries keyed by
runtime name, with no repeated names inside their values. Entries may use an
explicit extends label to override an inherited definition. Large dictionaries
should be split into targets rather than moved wholesale into another file.
Generated JSON and YAML use the same five name-keyed maps. Map keys own identity;
entry values do not repeat a name. Plugin invocations and injection groups retain
their own named namespaces, and each injection group contains its res map.
Repository components compose //infra:al and have their auth target extend
//tools/al:auth. A standalone consumer can compose
@rules_al//plugins/vault:config to register the Vault provider. Reuse shared
configuration targets instead of copying registrations.
Configuration targets carry plugin executables, their transitive runfiles and
TLS files. An al_binary_run consumer only needs configs = [":config"];
do not repeat those plugins in its data. Other Bazel consumers can place the
configuration target in data to receive the same runtime closure.
args contains ordinary JSON-compatible plugin arguments. argv contains an
executable’s command-line argument list. Plugin arguments support up to 64 nesting levels, including distinct
empty maps and lists and nested null values.
inject declarations contain typed res maps of named resources, independently
of external plugin calls. env and
other resource settings remain objects. Dependencies are ordered lists of
resource names: Last selects the final listed dependency. Injection overrides
use explicit group ancestry. Missing/cyclic dependencies, invalid extension
lineage and ambiguous resource definitions fail before providers or the child start.
Vault connection attributes ca_cert, client_cert and client_key select
files by label. Runtime TLS initialization resolves directory or manifest
runfiles. Absolute paths remain filesystem paths; installed commands without
runfiles resolve relative TLS paths against their working directory. Secret
values belong in runtime injection, not build inputs.
A call can declare substitutions = {"//data:public_file": "@PUBLIC_FILE@"}.
The action reads this explicit public input, trims surrounding whitespace and
JSON-escapes its contents before replacing the marker in argument string
values. This is suitable for public certificate authorities.
al_config compiles to AL JSON. AL loads JSON and YAML; Lua configuration and
the former srcs interface have been removed. All atomic target types provide AlConfigInfo and runtime files.
Command selection
Pass plugin_labels = {"tf": "setup", "pve_login": ""} to AL command wrappers.
Keys select labels; nonempty values match an exact value and an empty value
matches the label’s presence. The wrapper encodes these into AL CLI arguments.
Use run_args only for other AL options and args for the child command.
al_inject, exported through the public API, accepts named res_env, res_file,
res_kv, res_op, res_oidc, res_vault_env, res_vault_ssh and res_process maps. Entries contain
structured type settings and optional deps, vault_auth and vault_conn
metadata. It builds typed resource definitions in Config.inject; it does
not register or select a plugin.
The reserved data entry supplies generic JSON-compatible input separately
from type settings in args. Environment and file templates read it as .Data;
providers receive it in their fetch request. Vault operations use it as the
request body. For example, res_file = {"config": {"value": "{{ .Data.title }}", "data": {"title": "example"}}}.
See the injector API.
Plugin calls default their runtime identity and selected plugin name to the
Bazel target name. Use config_name or plugin when those names must differ.
Injector declarations default their identity the same way in a separate namespace.
In the small dictionary API, the entry key supplies the default plugin name;
generated private fragment names do not become runtime identities.
Resource providers use al_plugin_config(resource_provider = True, ...). The startup response owns the available resource kinds; configuration does not repeat a type list. Built-in-only calls need no provider target.
The small dictionary API accepts inject = {"name": {"resources": {...}}}.
Explicit injected environment exports override plugin startup defaults.
2 - Built-in resource injection
Generic resource graphs and invocation-owned resource lifetimes
Configuration
AL evaluates selected inject configuration entries internally. No injector executable or
plugin registration is needed for the built-in env, file and process types.
al_inject is exported through @rules_al//:defs.bzl; its named
res_<type> maps compile into resources with type, args and ordered deps.
Declarations live in typed InjectorCall.res maps, separately from external
plugin calls. Resource keys own identity. Built-in env/file/process settings use generated
protobuf messages; Vault settings remain opaque arguments to their provider.
Each resource can supply JSON-compatible data alongside its type-specific
args. Environment and file templates read local input through .Data;
.Last.Data and .Res[name].Data read dependency results. Data supports nested
objects, lists, nulls and signed integers without rounding. Provider fetches
receive the same input as ResourceFetchRequest.data. File-specific extra
settings and .Extra have been removed.
The engine validates missing/cyclic dependencies before starting providers,
evaluates each selected node once and supplies ordered dependency results to
its fetcher. Last retains the final declared dependency. The root inject map
keeps named groups and their res maps. Explicit target extensions determine
resource override precedence; key order has no effect. Equal unrelated resource
definitions coalesce; conflicting unrelated definitions fail before startup.
Extension lookup traverses ancestor declarations without selecting their resources.
Environment values remain structured settings. Small declarations stay inline;
extract macros only for meaningful reuse or substantial readability gains.
External plugins marked resource_provider = True advertise types through
PluginStartResponse.resource_types at startup and implement ResourceFetch. AL starts
eligible providers for discovery only when selected resources require types beyond
the built-ins. Explicit plugin label/call selection retains its normal startup behavior.
Advertisements must be nonempty and unique across providers and built-ins.
Missing providers, capability collisions and resource failures prevent child
startup. Provider startup must initialize capabilities without fetching secrets;
AL fetches only selected resources through the generic RPC.
Fetch requests carry the resource name, type, opaque arguments and ordered
ResourceResult dependencies. Results carry data, file paths and environment
exports. PluginStart returns PluginStartResponse with an optional
ResourceResult in result; the envelope can gain startup fields independently
of resource output. ResourceFetch returns ResourceResult directly.
Go plugins may return nil, nil or a response without result when startup has
no resource output. An explicitly empty result retains its presence in
PluginClient.StartResponse().GetResult(). Present startup env/files/data
remain available through that result, and environment exports reach the child.
Plugins retain ownership of their startup files through shutdown. Startup data
does not implicitly add dependency nodes to the injection graph.
Data travels as JSON-compatible values; signed integers retain int64 precision.
Diagnostics omit argument/result values. Explicit injection exports override startup exports, including conflicting startup
defaults. Environment-only plugins return their
exports in ResourceResult.Env and need no resource service. Invalid capability advertisements roll back startup before the child runs.
AL keeps resources alive until the child finishes, including its graceful
cancellation. Shutdown stops built-in consumer processes, removes their files,
then stops provider processes. Providers drain requests before releasing their
own tokens/files. Failed startup and cancellation roll back attempted resources.
Temporary files use 0600; SSH directories owned by the Vault provider use 0700.
Deletion is unlinking, not secure erasure; forced host/process termination can
prevent cleanup.
The Vault provider supplies kv, op, oidc,
vault_env and vault_ssh. Core injection imports no Vault provider schema or
handler implementation. No global provider registration or live deployment is
performed by building configuration targets.
3 - Docs
3.1 - Al
Repository command runner and Bazel configuration rules
AL is a command runner that prepares credentials and environment variables
through plugins, runs your command, and cleans up afterward. Its Bazel rules
package commands with their configuration and required plugins.
Repository tools are built through their ordinary Bazel targets. Use explicit
install targets, such as //tools/al:install, for standalone host
commands. AL does not cache, build or install repository tool executables.
The former al tool command and tool declarations have been removed.
Repository agent skills are written by bazel run //.agents:write_skills
and checked by //.agents:write_skills_test.
Links
3.1.1 - Command and plugin lifecycle
Startup, shutdown, and secret cleanup guarantees
Build merges AL configs and propagates plugin runfiles into the command’s
runfiles. The Runfiles subgraph contains the merged AL configuration, plugin
runfiles and command executable; source AL configs remain build inputs. AL reads the merged configuration,
starts plugin subprocesses and communicates with them using gRPC over stdio.
Plugins return environment values, file paths and data through that connection,
as shown by the dashed Resources edge. AL runs the command with its
prepared environment. Plugins connect to external services. Build arrows show configuration
dependencies; Run arrows show AL’s interactions with the built outputs and plugins.


The Mermaid source is authoritative. This repository renders and
packages its light/dark SVGs through //tools/al:run_lifecycle_svg.
al run starts selected plugins, passes their environment to a command, and
keeps plugin resources available until that command exits. On cancellation it
asks the command to terminate and waits up to ten seconds before killing it.
Plugin shutdown then drains requests, releases resources in reverse registration
order, and waits for plugin exit. Startup failure cancels sibling starts and
rolls back partially initialized resources. Cleanup errors fail the invocation.
A standalone installation can run ordinary commands and explicitly selected
absolute plugin executables without Bazel runfiles. Selected relative plugin
identifiers still require runfiles. Available declared or executable-adjacent
runfiles are passed to children; an invalid declared runtime context fails
instead of silently falling back to standalone execution.
Selected plugins may export the same environment name only when their values
agree. Different values fail before the child starts and trigger plugin cleanup.
The diagnostic names the key and plugins in a deterministic order without
printing the values. Explicit injection exports override plugin startup defaults,
including otherwise conflicting startup values. Agreed plugin exports can
override inherited environment values intentionally.
--stdout and --stderr create output files when absent and truncate existing
files before execution. New files use owner-only permissions; existing file
permissions and ordinary symlink-following behavior are retained. --stdin
opens an existing readable file. AL closes its own file descriptors after the
child and plugins stop, while ordinary inherited streams remain borrowed.
Output preparation is not transactional: later startup failure does not restore
previous output contents.
The injector creates secret files with owner-only permissions and removes them
after consumers stop. Vault stores revoke AppRole tokens they issue; failed
AppRole login attempts destroy their unused single-use SecretID. The role’s
bootstrap policy must permit secret-id-accessor/destroy, as declared by
projects/tf_modules/vault_approle. The user’s existing token-helper credential
is never erased or revoked. Secret inputs and remote response bodies are omitted
from diagnostic messages. OIDC authorization uses the configured Vault HTTPS
origin and TLS transport, rejecting alternate origins and redirects.
Explicit config dumps still contain the requested configuration; file outputs
use owner-only permissions and truncate previous contents.
no_auth prevents AL’s Vault client from loading credentials. For environment
injection it clears inherited VAULT_TOKEN; it does not sandbox the command or
prevent a command from independently reading the user’s token helper. Plugins
and invoked commands remain trusted programs with the user’s filesystem access.
Cleanup is observable best effort, not secure erasure. Memory copies are not
zeroized. Forced termination, host failure, unresponsive cleanup code, or an
unavailable service can prevent deletion or revocation. Subprocess signaling
targets direct children, not arbitrary descendants. Credential expiry remains
a fallback; service-specific logout requirements are documented with each plugin.
3.2 - AL product description
Commands, observable behavior, interruption, and recovery
AL product description
AL gives a repository operator one command for inspecting configuration, running
commands with selected plugins, selecting tests affected by Git changes,
choosing a shared source version,
publishing individual project releases, extracting and activating websites, and
delivering a branch for review.
The operator chooses each project and each publication step. No CI scheduler or
automatic weekly release is part of this surface.
Purpose
This is a source-linked description of the command-line experience: what an
invocation reads, changes, reports, and leaves behind after interruption. It is
for operators and people changing AL. The executable and its tests remain the
source of behavior; these documents describe the revisions cited by each feature,
not an additional implementation contract. The project README
owns build API documentation and operator recipes.
Conventions
Use the glossary consistently. Describe observable behavior in
plain language. Put mechanisms in a Technical note only when they change what
an operator should expect. Link to the owning foundation instead of copying its
rules. A source footer identifies the code examined; it does not claim a manual
runtime pass. Suspected defects belong in bug triage.
The work to be done
Document template
Features use eight sections: Summary; The simple case; The interaction, event by
event; Modifiers; Cancel and interrupt; Interactions with other systems; Edge
cases; Open questions and verification. Foundations may omit inapplicable phases.
The interaction is one invocation. Its phases are Invoke, Exits
immediately, Begins running, While running, and Finishes. Each feature
includes a Mermaid state diagram for repository viewers that render Markdown.
Every modifier table uses these rows, in order: Arguments and flags,
Environment and configuration, Terminal and streams. Columns distinguish
behavior from output. Arguments do not change after invocation.
Every interrupt table uses these rows, in order: Ctrl+C once or twice,
SIGTERM, Terminal closed (SIGHUP), Input or output pipe closes,
Network lost, Disk full or file inaccessible, Required state changes,
Concurrent invocation, Forced kill. Columns are Before work and
During work. Unknown behavior is identified, never inferred as rollback.
Cross-cutting concerns appear in this order: Configuration, Output,
Permissions, Concurrency, Persistence and recovery, Network.
Method
Read the owning command, state handling, and behavior tests; draft the pilot,
foundations, and release publication first; then draft other features. Check
terminology, links, table coverage, and source footers across the set. Run safe
local invocations and retain their outputs. The checklists distinguish those
observations from fixture coverage and from unperformed terminal or live checks.
Verification
Verification owns setup, results, and limitations.
Coverage remains drafted after a scripted pass; manual observation is required
before marking a document verified. No release destination is changed to
verify these documents.
Scope decisions
- Surface: Linux AL CLI in this repository, with Bash invocation, defaults
unless flags are stated. Both an installed binary and Bazel-run commands are
distinguished where their behavior differs. No user configuration is assumed.
- Owner and integration: AL lives in
projects/al; its Bzlmod name remains
rules_al. Repository-specific configuration supplies its integration inputs
and its validation policy. The observations here cover this
repository and its isolated fixtures; moving the owner does not broaden that
evidence into a verification of every workflow in another repository. - Source: use the feature’s footer to select its source revision.
- Runtime: source-built AL installed into ignored task scratch; behavior
tests exercise isolated repositories, plugins, and SSH destinations.
- Placement: maintain these documents in the AL project and select the
owner-local change that covers the requested work.
- Excluded: Go/Starlark API reference, third-party programs’ own behavior,
actual credential values, live deployments, and infrastructure synchronization.
Relevant limitations and boundaries are described where the operator meets them.
- Completeness: all seven command families are covered, including the nested
release website extraction and activation commands. Detailed delivery
flags remain in its existing command reference; this set describes their
user-visible lifecycle and state handoffs.
Source revisions
The initial description follows the AL implementation in alwaldend/src
commit 1b48b459ad3623213f42f6cf9eac351083eb2dbc. Its AL implementation
matches the original candidate 7cd4714139984bf4f9b2ae1de9189470b336e12e.
Features that use this baseline link here. A feature updated against a later
revision records it in its own footer, as in Inspect configuration.
The verification records retain the source revisions
and executable identities observed during earlier runs.
Structure
README.md: purpose, conventions, scope, and coverage.goal.md: drafting and continuation instructions.glossary.md: shared vocabulary.AGENTS.md, CLAUDE.md: local documentation entry points.BUILD.bazel: documentation packaging.foundations/invocation.md: command entry, output, and interruption.foundations/state.md: local, source, publication, and receipt state.releases/bundle.md: pilot; generate an inspectable project bundle.releases/publication.md: artifact planning, inspection, upload and deletion;
website extraction, activation, dry runs, and recovery.releases/versioning.md: source versions, refs, and stamped builds.delivery/workflow.md: candidate preparation through publication and review.commands/configuration.md: inspect and merge explicit configuration.commands/run.md: run a child with selected plugins and cleanup.commands/bazel-doctor.md: select affected tests and inspect local setup.verification/README.md: protocol, evidence, and pass limits.verification/foundations.md: foundation checklists.verification/releases.md: version, bundle, and publication checklists.verification/delivery.md: delivery checklist.verification/commands.md: configuration, execution, and diagnostic checklists.bug-triage.md: deduplicated suspected defects and decisions.
Coverage
| Document | Status |
|---|
| glossary.md | drafted |
| foundations/invocation.md | drafted |
| foundations/state.md | drafted |
| releases/bundle.md | drafted |
| releases/publication.md | drafted |
| releases/versioning.md | drafted |
| delivery/workflow.md | drafted |
| commands/configuration.md | drafted |
| commands/run.md | drafted |
| commands/bazel-doctor.md | drafted |
| verification/README.md | drafted |
| verification/foundations.md | drafted |
| verification/releases.md | drafted |
| verification/delivery.md | drafted |
| verification/commands.md | drafted |
| bug-triage.md | drafted |
Reference
Paths below are relative to projects/al:
cmd/al/main.go, internal/cli: startup, streams, configuration, child execution.pkg/al, pkg/al_plugin, pkg/lifecycle: configuration and plugin lifetime.internal/versioncmd, internal/versioning: calendar and Git operations.internal/release: bundle creation and SSH release transitions.internal/delivery: candidate, publication, and review guards.internal/bazelcmd: affected-test selection and local AL/Bazel diagnostics.cmd/al/lifecycle_e2e_test.go, cmd/al/run_e2e_test.go,
internal/release/lifecycle_test.go, internal/release/observation_test.go,
internal/versioning/publication_integration_test.go,
internal/delivery/delivery_integration_test.go: behavior fixtures.- Root
tools/al/test/command, tools/al/test/contract, and
infra/download/test/sync: plugin and real SSH/Ansible fixtures.
3.2.1 -
Read README.md, then goal.md. The coverage table in README.md is the work list.
3.2.3 - AL defect triage
These entries retain the original findings and record their corrections. Current
behavior belongs to the feature documents; historical reproductions below must
not be read as current expectations. No external issues have been filed. Source
paths below are relative to projects/al. The verification protocol
separates baseline observations from later fixture passes.
| ID | Severity | Behavior | Decision | Status |
|---|
| B-01 | medium | Installed run cannot start without Bazel runfiles | fixed | C2 installed-command fixture passes |
| B-02 | medium | Output overrides preserve stale trailing bytes | fixed | C2 stream-file fixture passes |
| B-03 | medium | Conflicting plugin environment exports have no defined winner | fixed | C2 plugin-environment fixture passes |
| B-04 | medium | Direct delivery rebase pushes before validation | fixed | R1 local-rebase fixtures pass |
| B-05 | medium | Selected release base is refused after unrelated trunk advances | fixed | R2 selected-base fixtures pass |
B-01: Installed run requires runfiles
- Raised by: Run.
- Where: A user installs the standalone executable and invokes
al run -- /usr/bin/true, without configuration or plugins. - Original behavior: AL exited 1 with a runfiles discovery error before starting the
child. The same invocation can run with an explicitly supplied empty runfiles
directory, demonstrating that no actual plugin runtime files were needed here.
- Expected: A standalone command with no selected plugin should execute, or
the installation should supply/document its required runtime layout.
- Baseline reproduction: 1. Use the original task-local installed binary. 2. Unset
RUNFILES_DIR
and RUNFILES_MANIFEST_FILE. 3. Run the command above. 4. Observe exit 1 and
runfiles: no runfiles found. Do not confuse a Bazel-run invocation with this case. - Original cause:
internal/cli/run.go:44 always prepares runfiles environment;
pkg/al/command.go:40 requires discovery. The plugin manager also constructs a
runfiles resolver at pkg/al_plugin/manager.go:37. Installation copies only AL. - Resolution: Missing optional runfiles no longer prevent standalone child
execution. Absolute plugin paths work without runfiles; selected relative
identifiers still require them. Invalid declared runfiles remain errors.
- History: C1
run-installed-without-runfiles reproduced the failure on
2026-11-02 against the baseline identified in the verification protocol. - Status: Fixed; C2
TestRunStandaloneCLI passes all eight isolated cases.
No manual terminal pass or live credential use is claimed.
B-02: Output redirection retains old bytes
- Raised by: Run.
- Where:
al run --stdout OUTPUT -- COMMAND, or the corresponding stderr flag. - Original behavior: Existing output was opened at offset zero without truncation.
A child writing
new into previous-content leaves newvious-content.
Missing output files are refused, and existing permissions are retained. - Expected: Shell-like replacement would create/truncate output; intentional
in-place writes need a clear contract because trailing bytes look like child output.
- Baseline reproduction: 1. In isolated scratch create
OUTPUT containing
previous-content. 2. Supply the empty runfiles fixture to bypass B-01. 3. Run al run --stdout OUTPUT -- /usr/bin/printf new. 4. Read the whole file. - Original cause:
internal/cli/run.go:108 and :117 used write-only opening without
create/truncate flags. This differs from config dump’s private truncated output. - Resolution: Both output overrides create missing files or truncate existing
ones. New files use mode 0600 subject to the process’s permission mask; existing
permissions remain unchanged. Later startup failure does not restore old bytes.
- History: C1
run-existing-output and run-missing-output reproduced the
failure on 2026-11-02; the existing file retained mode 0644. - Status: Fixed; C2
TestRunStreamFiles passes the missing/existing output
cases for stdout and stderr. Retained artifacts show new files at 0600 and
existing files at 0644. The input file is unchanged. No real secrets were used.
B-03: Conflicting plugin environment exports
- Raised by: Run.
- Where: Two selected plugins export the same environment variable.
- Original behavior: The child environment was assembled from map iteration, so
conflicting exports have no documented stable precedence.
- Expected: Reject duplicates or define a deterministic precedence that the
operator can inspect.
- Baseline reproduction: 1. Prepare two synthetic plugins exporting different values for
the same key. 2. Select both. 3. Invoke a child that prints only that synthetic
key repeatedly. 4. Record values and order. Repeated agreement alone cannot
prove ordering is guaranteed.
- Original cause:
pkg/al_plugin/manager.go:64 traversed the configured plugin map
while collecting environment exports. - Resolution: Equal selected exports are accepted once. Different values for
one key fail before child launch, with a deterministic diagnostic naming the
key and plugin names but omitting values. Started plugins proceed through
cleanup. Selected exports can still override inherited environment values.
- History: The original description recorded a source-derived suspicion;
its initial 30-invocation pass did not exercise conflicting plugins. The later
failing-before fixture artifacts are retained separately from C1.
- Status: Fixed; C2
TestRunPluginEnvironment passes equal-value and both
conflict-order cases, including child refusal, omitted values, and plugin
shutdown markers. This is synthetic fixture evidence, not a live-provider pass.
B-04: Direct delivery rebase pushes before validation
- Raised by: Delivery.
- Where: An operator runs
al delivery rebase on an eligible branch after its base advances. - Original behavior: The command rebased and pushed with an exact ref lease
before the operator could check the changed candidate. The then-current
receipt-bound publication workflow instead stopped for revalidation.
- Expected: Replaying source locally must leave publication to the separate
preparation, validation, and explicit publication workflow.
- Baseline reproduction: 1. Use the former
TestRebaseReplaysAdvancedBaseAndLeasePushes in the isolated
delivery fixture. 2. Advance the base. 3. Run direct rebase. 4. Observe the remote
feature head and pushed: true without a validation invocation. - Original cause:
internal/delivery/rebase.go:140 called the guarded push directly. - Resolution: Direct rebase changes the local candidate only. Its report
retains the observed remote head and lease, says
pushed: false, and directs
preparation, ordinary checks, and explicit publication after a replay.
Receipt-bound publication now reports checks_required after a rebase;
the operator runs checks and then publishes with the updated preparation receipt. - History: Observed during the task’s original authorized rebase;
retained report
out/unify-release-versioning/rebase-description/rebase.json.
Final delivery validation is separate evidence, not a claim that rebase ran it. - Status: Fixed; R1
TestRebasePreservesRemoteUntilPublication checks existing
and absent remote refs. TestRebaseAlreadyBasedPreservesRemote checks the no-op
case, and TestRebaseRequiresCleanWorktree checks preserved dirty inputs.
The next_action wording is source-derived and remains an unrun checklist row.
- Raised by: The isolated selected-base fixture during the project move.
- Original behavior: Delivery inspection compared the selected release base
with local
origin/master. Advancing unrelated trunk marked that selected base
stale and refused both an explicitly selected base and one supplied by a PR. - Expected: Ancestry and rebase decisions use the selected base’s fresh ref.
- Original cause: The additional
origin/master comparison in
internal/delivery/delivery.go applied independently of the selected base. - History: R2 failing-before
selected-base-false.json and
selected-base-true.json report base_stale: true and a refusal for the
unchanged release base. - Resolution and status: Fixed.
TestDeliveryInspectionUsesSelectedBase
passes both cases: unrelated advancement leaves the selected base usable,
while selected-base advancement sets needs_rebase. Local HEAD is preserved.
The R2 protocol record
identifies the retained before/after evidence; no manual or live-forge pass is claimed.
Verification boundary
The observations use synthetic values and task-private files. No live release,
credential, or infrastructure configuration was changed. Other open questions
in feature documents are coverage gaps unless evidence establishes a defect.
3.2.4 - Commands
3.2.4.1 - Inspect configuration
Summary
al config dump reads explicitly selected configuration files and shows their
merged contents as JSON. It can write that representation to a private file.
Inspection does not start plugins or prove that a selected plugin can run.
The simple case
Run al config dump --config /absolute/path/config.json. AL prints the merged
configuration, then exits. Repeat --config to include more files in order.
Without any files, the result is an empty JSON object followed by a newline.
Use --out /absolute/path/dump.json to write a file instead. Read the file after
successful completion. The output can contain sensitive configuration values;
inspection does not redact the requested representation.
The interaction, event by event
Invoke
The operator supplies each file explicitly. AL does not search for a default
configuration or inherit al run flags. Accepted filename extensions are .json
and .yaml; .yml is not an alias. Lua inputs are rejected. -c and -o abbreviate --config
and --out. Relative paths use the invocation’s working directory.
Help describes the flags. A missing file, unsupported extension, or invalid
configuration fails before the output file is opened. The diagnostic identifies
the file and failure stage without echoing invalid configuration values.
Begins running
AL reads files in their supplied order. List entries accumulate in that order.
For example, plugins supplied in three files remain three entries in the dump;
dumping does not resolve duplicate plugin names into one selected plugin.
Use --substitution MARKER=/absolute/path/public-file to replace a marker
with the trimmed, JSON-escaped contents of a public build input before parsing.
Loading declarative files does not start the plugin definitions they contribute.
While running
AL collects the complete representation before opening a requested output file.
There is no progress display or interactive editing phase. Once output writing
starts, an existing file is restricted to owner access and truncated. The write
does not use a separate replacement file; a failure can leave partial contents.
Finishes
Success produces indented JSON and a final newline, either on stdout or at the
selected path. File output has mode 0600, including when the file previously
had broader permissions. Failure to restrict, truncate, or write the file fails
the invocation. No plugin resources remain to clean up because none were started.
stateDiagram-v2
[*] --> ReadConfigurations: invoke
ReadConfigurations --> Refused: unreadable or invalid file
ReadConfigurations --> WriteRepresentation: all files loaded
WriteRepresentation --> OutputReady: write succeeds
WriteRepresentation --> InspectOutput: write interrupted or fails
OutputReady --> [*]: returnModifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Repeated configuration paths determine merge order; the output flag chooses a file instead of stdout. | The selected configuration is printed as indented JSON, or stdout stays empty when a file is selected. |
| Environment and configuration | Only explicit files are loaded; explicit public-file substitutions are applied before parsing. | Substituted public file values appear in the requested dump. |
| Terminal and streams | No TTY or stdin is required for declarative files. | JSON uses stdout unless an output path is supplied; diagnostics use stderr. |
Arguments remain fixed during the invocation. Editing a source file while it is
being read is not an interactive configuration update.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model; a cancelled load can fail. | Cancellation is checked before each configuration read; file reads and output writes do not promise immediate interruption. |
| SIGTERM | Requests cancellation before another configuration load. | There is no automatic restoration of an output already truncated. |
| Terminal closed (SIGHUP) | No special AL recovery. | An output already being written can remain partial. |
| Input or output pipe closes | Declarative configuration comes from named files, not stdin. | A closed output stream can stop the write; no complete JSON result is promised. |
| Network lost | No effect for ordinary local JSON or YAML inputs. | No effect for local inputs and substitution files. |
| Disk full or file inaccessible | Required input read fails before output is opened. | Output permission, truncation, or write failure is reported; existing contents may already be changed. |
| Required state changes | Each path is read when its turn arrives. | Concurrent edits have no whole-input snapshot guarantee. |
| Concurrent invocation | Independent input/output selections can run separately. | Shared output files have no serialization guarantee; use a different path. |
| Forced kill | No completed dump is implied. | Partial output can remain; rerun into a fresh path after inspecting it. |
After interruption, inspect the selected output. Neither a file’s existence nor
its private permissions establishes that the JSON is complete.
Interactions with other systems
Configuration. This command owns the merged representation, not plugin
selection or startup. See run for execution.
Output. Dump contents are intentionally visible to the chosen stream or
file. The invocation foundation owns stream names.
Permissions. Inputs must be readable; the output directory must permit
creation, and existing output files must permit restriction and writing.
Concurrency. There is no lock binding all input files or protecting shared
dump paths from other invocations.
Persistence and recovery. A successful file dump replaces its previous
contents directly. There is no backup, receipt, or automatic rollback.
Network. Declarative local inputs and public substitution files need no service.
Edge cases
- An empty configuration list is valid and prints
{}. - Duplicate plugin names can appear in a dump; run
rejects them when constructing its execution configuration.
- Changing permissions on an existing output does not validate its contents.
- Reading and writing the same configuration path is possible because loading
finishes first, but the output format is JSON regardless of the path’s suffix.
- Lua is no longer evaluated; unsupported formats fail before output is opened.
Open questions and verification
- Sources: command flags,
loading and output, and
output/error fixtures.
- Earlier scripted observations covered empty input, JSON/YAML/Lua merge order, private
truncated output, and redacted invalid-input diagnostics. They are not a manual
verification pass. The native-configuration-targets change removes Lua and
verifies generated JSON through the independent consumer fixture.
- Cancellation during a file write, broken pipes, and simultaneous output writers
remain unobserved. No atomic-output guarantee is inferred.
- Checklist: configuration.
Configuration source revision in alwaldend/src after the
declarative configuration migration
is d0ab69ec85dd9ad324c3a07d86c4bce8adbce72f. The earlier C1 observations
retain their original executable and source identities.
3.2.4.2 - Run a command with plugins
Summary
al run prepares selected plugins, passes their environment to a child command,
and keeps their resources available until that command stops. Cleanup then runs
before AL returns. A standalone installation can run a child without Bazel
runfiles when no selected plugin needs them.
The simple case
Run al run -- /usr/bin/true for a child without plugins, or use an existing
Bazel-packaged AL command with its configuration and selected plugin labels.
Its command runs after the selected helpers finish starting.
The child reads and writes the operator’s ordinary streams. When the child
finishes, AL waits for cleanup and returns to the shell.
The direct form is al run --config CONFIG --plugin_label KEY=VALUE -- COMMAND ARGUMENTS. The -- separator keeps child options separate from AL options.
Configuration and label flags can be repeated. Plugins are selected explicitly;
supplying a configuration alone does not select all its plugins.
The interaction, event by event
Invoke
AL loads the explicit files described by configuration,
discovers any available runfiles, and opens selected stream overrides. It inherits the
operator’s environment. The child is an executable plus arguments, not a shell
expression; shell expansion requires choosing a shell as the child.
An absent runfiles context is allowed. Explicitly configured runfiles must be
valid; an invalid manifest or directory is not silently ignored. A selected
plugin with an absolute executable path needs no runfiles. A selected relative
plugin identifier needs a runfiles context; it is not resolved against PATH.
--stdin opens an existing input file. --stdout and --stderr create missing
output files or truncate existing ones before plugin startup. New files are
created with owner read/write permissions; existing permissions are retained.
Help prints usage. A missing command, unreadable configuration, invalid declared
runfiles, unavailable selected plugin executable, inaccessible stream file,
duplicate plugin name, or invalid selected plugin/call prevents the child from
starting. An unselected plugin does not require its executable or runfiles.
Begins running
A label matches a plugin or call when its key exists and its optional value
matches. A bare key accepts any value. Any matching supplied label selects the
entry; the labels are not an all-must-match filter. Selecting a call also starts
its owning plugin. No supplied labels means no selected plugins or calls.
AL starts the selected plugins and reports their startup on stderr. It combines
their returned environment before launching the child. Equal values for the same
key are accepted once. Different values for the same key refuse child execution;
the diagnostic names the key and plugins in a stable order without printing their
exported values. Selected exports can override inherited environment values.
Startup failure prevents the child, cancels sibling startup, and attempts cleanup
of partial resources. An environment conflict after startup also prevents the
child and proceeds through cleanup of the started plugins.
The lifecycle reference owns the detailed guarantees.
While running
The child uses its assigned streams and can interact with its own services.
Plugin resources stay available while it runs. AL does not make the child a
sandbox or monitor arbitrary descendants. A child needing credentials can use
its inherited access independently of AL’s plugin configuration.
Cancellation asks the child to terminate before releasing its resources. The
lifecycle reference owns the grace period and eventual forced stop. Successful
child shutdown does not turn cancellation into a successful invocation.
Finishes
AL waits for the child, then shuts down plugins and closes stream files it
opened. A child failure is reported and its positive exit status can be
preserved. Cleanup failure also fails the invocation. Child writes are not
rolled back. Forced termination can prevent cleanup entirely.
stateDiagram-v2
[*] --> Prepare: invoke
Prepare --> Refused: invalid setup
Prepare --> StartPlugins: setup ready
StartPlugins --> Cleanup: startup fails
StartPlugins --> CheckExports: plugins ready
CheckExports --> Cleanup: conflicting exports
CheckExports --> RunChild: exports accepted
RunChild --> StopChild: cancellation
StopChild --> Cleanup: child stops
RunChild --> Cleanup: child exits
Cleanup --> ReturnCommandStatus: cleanup completes
Cleanup --> ReturnFailure: cleanup reports failure
ReturnCommandStatus --> [*]
ReturnFailure --> [*]Modifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Configuration and label flags choose helpers; arguments after -- choose the child and its arguments. | Child output follows the selected program; AL reports startup and failures on stderr. |
| Environment and configuration | Selected exports override inherited values; conflicting selected exports prevent the child. Runfiles are required only for selected relative plugin identifiers. | Startup and conflict diagnostics identify keys and plugins without their exported values; the child controls its own disclosure. |
| Terminal and streams | --stdin opens an existing file; --stdout and --stderr create or truncate files instead of inheriting those streams. | Child output replaces the selected files’ contents; ordinary inherited streams remain unchanged. |
Flags are fixed before startup. An already running child does not reload a
configuration file when the operator edits it.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model; cancellation is checked before child launch. | Requests child shutdown, then plugin cleanup; a second Ctrl+C has no guaranteed escalation. |
| SIGTERM | Cancels setup and prevents a subsequent child launch. | Requests child shutdown while plugin resources remain available, then cleanup. |
| Terminal closed (SIGHUP) | No special AL recovery. | Cleanup is not guaranteed; child/plugin state needs inspection. |
| Input or output pipe closes | Streams are inherited unless files override them. | The child observes EOF or stream failure; AL cleans up when the child exits, without undoing its work. |
| Network lost | Plugin startup can fail; a command without network-dependent setup is unaffected. | Child/plugin behavior determines the failure; cleanup may itself fail when a service is unreachable. |
| Disk full or file inaccessible | A required configuration, executable, or stream file can prevent startup. | Child writes or cleanup can fail; earlier files and external changes remain. |
| Required state changes | Required files and plugins are checked as setup reaches them. | Changes to external files/services are the child’s or plugin’s concern; AL does not restore a snapshot. |
| Concurrent invocation | Each invocation prepares its own selected resources. | Shared output paths and external resources have no command-wide locking guarantee. |
| Forced kill | No completed child execution is implied. | Cleanup cannot run; resources and child processes can remain. |
Inspect the child’s effects and plugin resources after failure. An invocation
does not produce a general receipt describing those effects.
Interactions with other systems
Configuration. Configuration loading happens before
selection. Duplicate plugin names are rejected even if no label selects them.
Output. Default streams belong to the operator. AL closes only files it
opened. Output overrides replace previous contents. Opening those files happens
before plugin validation and startup, so a later setup failure can leave an
empty or truncated file even though the child never ran.
Permissions. Commands and plugins retain the operator’s access. New output
files use mode 0600 subject to the process’s permission mask. Existing output-file
permissions are not tightened by stream redirection. Credential
resource permissions and cleanup belong to the lifecycle reference.
Concurrency. Selected plugins start concurrently. Their completion order
does not choose a winner for conflicting exports: different values are refused
before child launch. Shared output paths have no command-wide lock.
Persistence and recovery. AL attempts cleanup after ordinary success,
failure, and cancellation. This is not secure erasure or rollback of the child’s
work. Recovery depends on the resources and child command selected.
Network. AL’s selected helpers and the child can contact services. There is
no universal offline mode or retry policy for those operations.
Edge cases
- Bare
--plugin_label KEY accepts any configured value for that key. - Repeating a selector key keeps its last supplied selector value.
- A selected call can start a plugin whose own labels did not match.
- An invalid unselected plugin executable is not started, although duplicate
plugin names still make configuration invalid for execution.
- Relative plugin identifiers require runfiles even when an executable of the
same name is available on PATH. Absolute plugin paths work without that context.
- Identical selected exports are accepted, and unselected plugins do not
participate in export conflict checks.
- Unlike configuration dump output, redirection
retains an existing output file’s permissions. Both replace previous contents.
Open questions and verification
- Sources: command execution,
selection and exports,
plugin startup, and
lifetime handling.
- The existing root fixture
tools/al/test/command/command_test.go covers
synthetic secret lifetime, startup rollback, and cancellation. This description
did not perform a new manual plugin or terminal pass. cmd/al/run_e2e_test.go exercises installed execution, runfiles requirements,
stream-file replacement, and equal or conflicting plugin exports using copied
executables and synthetic plugins. The verification protocol
distinguishes these later fixtures from the original observations.- Historical installed-execution and stale-output failures remain in
triage; they do not describe the corrected behavior above.
- Stream-file failure and interruption can leave changed contents. Terminal loss,
repeated signals, and shared-path races still need their dedicated checks.
- Checklist: command execution.
Source revision is the AL documentation baseline.
3.2.4.3 - Select affected tests and inspect local diagnostics
Summary
al bazel test selects tests affected by Git changes against an explicit base.
It can preview that selection or run the selected tests. al doctor prints
local diagnostic JSON without launching Bazel. It describes
selected files and executable identity; it does not prove that a subsequent
build will succeed or that a host executable matches its declared pin.
Ordinary builds and tests remain available through bazel, with setup in the
Bazel reference.
The simple case
Run al bazel test --base master --dry-run from a workspace to inspect its
affected-test selection. Run without --dry-run to execute that selection.
Append a target pattern such as //projects/example/... to limit the test scope;
the default is //....
Run al doctor --workspace-root /absolute/workspace --task-scratch out/task/run to inspect local setup. The JSON identifies the running AL
executable, declared Bazel pin, platform, configured rc-file inventory,
built-binary comparison when available, and scratch-path classification.
No build or repair follows.
For a different workspace layout, select --bazelisk-config PATH and
--source-binary PATH; repeat --rc-file PATH to describe its rc inventory.
Include the absolute path of a user rc file explicitly when it matters to
the report. Doctor does not discover that file automatically.
The interaction, event by event
Invoke
The selector requires --base REF and absolute target patterns. It compares the
current work against the unique Git merge base, including committed changes,
staged edits, working-tree edits, and nonignored untracked paths.
--workspace PATH chooses a Bazel workspace, resolving relative paths from the
current directory. Otherwise
discovery starts from BUILD_WORKSPACE_DIRECTORY when set or the current
directory and finds the nearest Bazel workspace root. Selection belongs to
that workspace, independently of delivery preparation and receipts.
The operator chooses a workspace and optional input/scratch paths. Doctor
defaults to the current directory, reads .bazeliskrc, and reports .bazelrc
as its default rc inventory. Relative pin, source-binary, rc-file, and scratch
inputs resolve against the selected workspace root. Its options use separate
values, as shown in help.
The selector refuses a missing or invalid base or workspace, including a base
without one merge base with HEAD. A failed Bazel query fails selection without
printing a selection report or running tests; partial query output is not
accepted as a complete set. It accepts its selector options and target patterns, not arbitrary
Bazel commands or build/test option forwarding.
Help prints usage without gathering a report. Unknown options, missing option
values, unreadable required files, missing Bazel on PATH, or missing Bazelisk
pin fields fail the report. Doctor does not search upward for a different
workspace. Explicitly empty pin-file, source-binary, or rc-file values are
refused.
Begins running
Bazel queries identify changed source inputs, their reverse dependencies, and
tests inside the requested scope. Deleted, unknown, configuration, or
outside-workspace paths widen selection to the full scope when a narrower set
cannot be established.
Changes in other nested workspaces require their own selected-workspace checks.
Wildcard scopes exclude root targets with the literal manual tag before
expanding test suites. An explicitly named test or suite remains eligible,
and an eligible suite retains its listed members, including manual-tagged
members. Bazel’s configured test filters can further filter the selection.
AL reads local identity and the selected pin file, and resolves bazel from
PATH. A missing selected built binary makes the source comparison unavailable;
it does not prove that the installed binary is current. The report does not
execute Bazel to check its version or ask which rc files were actually loaded.
--source-binary selects the comparison file; otherwise the conventional path
from the diagnostic reference applies.
Successful comparison reports the resolved absolute path. Explicit --rc-file
values replace the default inventory and appear relative to the workspace when
possible. Doctor reports those declarations without reading or validating the
rc files, and does not claim that an agent profile is active.
While running
The selector’s dry run performs selection but skips tests. An unchanged
comparison needs no Bazel queries. Normal
execution runs the selected tests through Bazel with its usual configuration
and cache behavior. Narrowing selection excludes tests and work needed only by
them, so missing or evicted unrelated cache entries do not request unnecessary
rebuilds or reruns. The query itself still loads the requested graph. No measured
performance improvement is claimed.
Doctor collects one bounded report. It does not dump the environment, create
the selected scratch directory, or change an installation. Scratch
classification checks the path’s shape, not whether the directory exists,
is writable, or is isolated from other users.
Finishes
The selector prints one JSON report before test execution. The
Bazel reference owns its fields.
Query diagnostics and all test output go to stderr, leaving stdout as the
selection report. Test failures return nonzero even though that report already
exists. No changes or no selected tests succeeds without invoking tests.
A completed test invocation covers only the selected scope. It does not create a
delivery receipt, publish source, or prove that every affected workspace was
checked.
Doctor prints JSON on stdout and returns. An unavailable source comparison or
conflicting scratch path is a report field and does not itself make doctor
exit nonzero. Reading failures prevent the complete report and produce a
diagnostic instead.
stateDiagram-v2
[*] --> Changes: compare with the Git base
Changes --> Selection: query scoped dependencies
Changes --> NoTests: no changes
Selection --> Preview: dry run
Selection --> NoTests: empty selection
Selection --> Tests: run selected tests
Preview --> [*]
Tests --> [*]: Bazel completes
NoTests --> [*]stateDiagram-v2
[*] --> ReadLocalState: al doctor
ReadLocalState --> ReportFailed: required read fails
ReadLocalState --> ReportReady: local observations collected
ReportReady --> [*]: print JSONModifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Selector flags choose the base, workspace, scope, and dry run; doctor paths choose diagnostic inputs. | The selector reports its selection; doctor describes the selected inputs. |
| Environment and configuration | PATH selects Bazel; queries and tests use its configuration. Doctor reads the selected pin file without launching Bazel. | Selection reflects the current dependency graph; doctor reports declared identity and rc inventory without claiming effective options. |
| Terminal and streams | Neither selection nor doctor requires a confirmation prompt. | Selection and doctor reports use stdout; query diagnostics and test output use stderr. |
Flags remain fixed. Neither command holds an immutable snapshot across all its
Git, workspace, or diagnostic reads.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model. | The selector cancels its active Git/Bazel client; doctor may finish local reads. |
| SIGTERM | No completed selection, tests, or report is implied. | The selector cancels its active client; neither command rolls back state. |
| Terminal closed (SIGHUP) | No special AL recovery. | Output can stop before completion; inspect any running Bazel work. |
| Input or output pipe closes | Doctor does not read stdin; the selector forwards stdin to its test invocation. | Selection/report writing or test output can fail after earlier work. |
| Network lost | Local Git and diagnostic reads remain local. | Query/test services can fail; doctor remains local. |
| Disk full or file inaccessible | Missing inputs or required executables can fail setup. | Query/test outputs or report writing can fail; no complete result is implied. |
| Required state changes | Current PATH, Git refs, and selected workspace determine setup. | Queries and local reads have no shared immutable snapshot. |
| Concurrent invocation | Each selects its workspace and executable independently. | Bazel owns its server coordination; AL maintains no shared result ledger. |
| Forced kill | No completed observation is implied. | A capture may be partial and Bazel outputs may remain; inspect before retrying. |
Rerun selection when relevant source changes. Doctor has no persistent work to
resume; rerun it when local state changes.
Interactions with other systems
Configuration. The Bazel reference owns setup and
installation. Test selection is independent of delivery and uses Bazel’s
configuration. Doctor does not parse rc files. Neither starts al run plugins.
Output. Selection and test results describe the chosen scope. Doctor’s JSON
differentiates an unavailable source comparison from an observed stale installation.
Permissions. Selection reads Git and source state and can run Bazel tests.
Doctor needs read access to selected local files; it does not grant or repair access.
Concurrency. Selection and diagnostics can see changing local files. Rerun
selection when the source or build graph changes; it is not a reserved test plan.
Persistence and recovery. Tests can leave ordinary Bazel outputs and caches.
There is no AL results ledger. Doctor changes no repository, installation, or
scratch directory and creates no receipt.
Network. Bazel queries and tests use their configured services. Doctor
resolves a path and reads local files without launching that executable or
contacting a service. Selector dry run still performs dependency queries.
Edge cases
- Full-scope fallback is a conservative selection, not evidence that every test
is affected. Tests outside the explicitly requested scope remain outside it.
- A query failure is an error even if the failed query printed some labels.
- A selection report is not proof that tests ran: dry run, an empty selection,
caching, configured filters, or later test failure all affect execution.
- A build elsewhere remains unavailable to the default comparison; select its
path explicitly with
--source-binary to compare it. - The rc list is configured inventory, not evidence of files actually loaded.
An absent listed rc file can still appear in a successful report.
- A configured version pin is not an observation of the resolved executable’s
runtime version.
- An invalid scratch classification is reported with exit zero; callers must
inspect the JSON fields they care about.
- There is no implicit installation update after a source change.
Open questions and verification
- Sources: report implementation,
diagnostic fixtures, and
built-CLI fixture.
- Selector sources: selection and execution
and TestAffectedBazelCLI. Its
affected-bazel-tests.json artifact uses real Git and AL with an instrumented
Bazel process; it does not establish behavior against a real dependency graph. - Doctor’s namespaced and conflicting scratch classifications were observed in
the earlier C1 pass.
TestDoctorConfiguration exercises configurable input
paths and copied-binary comparisons in an isolated workspace. These checks do
not establish every workflow in another repository; terminal signals and
broken pipes still require their own observations. - Earlier forwarding observations describe a removed AL command and are not
evidence for ordinary Bazel execution or the affected-test selector.
- Affected-test observations remain pending. No runtime pass or speedup is
inferred from the source description.
- Checklist: affected tests.
- Checklist: diagnostics.
Source revision is the AL documentation baseline.
3.2.5 - Delivery
3.2.5.1 - Prepare, check, publish, and review a branch
Summary
al delivery prepares an explicitly scoped feature change, publishes the exact
branch commit, and maintains its pull request. The operator runs ordinary Bazel
checks between preparation and publication. Receipts bind separate invocations to the candidate and observed remote
state. Review inspection and review mutations are distinct operations; publishing
a branch does not mean that review completed or that the branch was merged.
The simple case
From the dedicated feature worktree’s repository root, run
al delivery provider, then al delivery inspect. Read the repository identity,
actual PR base, exact heads, changed paths, and refusals. Write the aggregate
message in task scratch and prepare only task-owned paths using repeated --path
flags or a deliberately prepared index.
Use al delivery prepare --message-file MESSAGE --receipt-file RECEIPT ...
to produce the candidate. Run the normal Bazel checks for the change, inspect
their results, then use al delivery publish --receipt-file RECEIPT when
publication is authorized. Receipt-bound verify and review inspect report
the current publication and review state. The
delivery reference
owns the complete recipes.
The interaction, event by event
Invoke
provider reads local remote configuration and reports sanitized forge and
transport capabilities without printing endpoint URLs. Adapter availability
and Git transport support are separate fields. The supported delivery workflow
requires same-repository GitHub topology and SSH fetch and push endpoints.
An HTTPS remote is refused; AL does not rewrite it automatically. Same-repository
ownership remains an operator precondition, not something author names prove.
inspect reads forge state and fresh Git refs, including the PR’s actual base.
It reports exact candidate and remote identities plus ownership and worktree
conditions. Ancestry and rebase decisions use the selected base. Advancing an
unrelated branch does not make that base stale; advancing the selected base can
require a rebase. Inspection does not itself grant authority to rewrite a branch.
Help prints flags. Unsupported provider/transport, unsafe history, mismatched
ownership evidence, stale refs, unsuitable worktree state, or changed PR
expectations can refuse later operations. A refusal states a failed precondition;
it is not a general promise that every earlier step of the workflow was undone.
Preparation is Git-only. It does not run Bazel or publish the branch. The
operator selects separate check commands and explicitly invokes publication.
Begins running
prepare stages the explicit task scope and creates one aggregate candidate.
--rewrite binds a one-commit replacement to the exact inspected head;
--consolidate explicitly selects an eligible owned multi-commit range. Both
cover the entire existing feature diff, not just newly edited files.
--message-only keeps the tree while changing the commit. Preparation writes a
private receipt binding the exact head, tree, scope, and remote expectations.
It does not derive affected targets or prescribe a check format.
The separate rebase command fetches current refs and, on an advanced base,
replays the eligible single feature commit locally. It leaves the remote feature
ref and PR unchanged. The report says rebased, includes the new local head and
tree, retains the observed remote head and lease, and reports pushed: false.
Its next_action directs the operator to prepare the new candidate, run ordinary
checks, and publish explicitly. An already-based branch reports already_based with
pushed: false, including when the remote feature branch does not yet exist.
This direct command does not prepare a replacement candidate receipt; the
operator prepares the result before publication.
While running
Run ordinary bazel build and bazel test commands for the prepared candidate.
Bazel owns their arguments, output, cache behavior, and exit status. AL does
not run the checks or store a results ledger. A failed check leaves the candidate
and preparation receipt available for diagnosis. Honor that failure before
publishing; if source is unchanged, retry the ordinary check without another
commit rewrite.
publish --receipt-file RECEIPT requires current HEAD and tree to match the
prepared candidate and requires a clean index and unchanged prepared scope. It rechecks the
remote lease and PR expectations. It does not inspect previous check output or
require a caller-supplied validated-head assertion.
If the base advanced, receipt-bound publication can rebase the captured
candidate, update the receipt, and stop with checks_required before pushing.
Run the normal Bazel checks against the new candidate, then publish using the
same receipt. Running prepare again is unnecessary unless content or message
changes.
Publication pushes the exact feature ref under its lease, updates or creates the
expected PR from the aggregate commit, and verifies the result. Branch push,
PR update, and final verification are distinct side effects. Conflicting PR
metadata is refused rather than silently overwritten.
Finishes
A verified publication means the captured branch and PR expectations were
observed at verification time. It does not merge the PR, deploy artifacts, or
prove future review outcomes. The state foundation
owns these completion boundaries.
If publication succeeded but its final read failed,
publication_verification_pending retains the known candidate and PR with
verified: false. Use verify --receipt-file RECEIPT to inspect that
postcondition before choosing recovery. A failed invocation can follow a
successful push or PR mutation; it does not establish that remote state is
unchanged. A guarded publication retry can finish an exact prior or desired PR
projection when the feature ref already equals the prepared candidate.
stateDiagram-v2
[*] --> Inspected: provider and inspect
Inspected --> Prepared: prepare exact scope
Prepared --> Checked: ordinary Bazel checks
Checked --> ChecksRequired: publish finds an advanced base
ChecksRequired --> Checked: check the rebased candidate
Checked --> PublicationAttempted: publish
PublicationAttempted --> VerificationPending: outcome not fully observed
VerificationPending --> Verified: verify
PublicationAttempted --> Verified: matching branch and PR
Verified --> [*]Checked represents the operator’s successful checks; it is not an AL receipt
status or a stored validation gate.
Review is a separate interaction
review inspect returns a bounded inventory of reviews, threads, comments, and
requests. It is an observation, not a review-execution monitor or a completion
signal. A newly published head does not inherit an older head’s review verdict.
For an authorized response, review address requires a clean exact prepared
candidate and verifies its remote publication. It posts the reasoned reply,
retains its attempt evidence, and resolves the selected thread. It does not fix
the code, run checks, or read validation logs. Low-level comment,
reply, resolve, and request operations remain available, each requiring the
fresh exact provider expectations described in the
review reference.
Replies and resolutions use bounded, short-lived receipt authority. Unknown
outcomes do not invite blind reposting; inspect remote state. Only an explicit
read-failure restoration permits reuse of the unchanged unexpired authority.
These guards do not make the forge’s writes atomic with another person’s edits;
an actively coedited PR is not a safe mutation target.
stateDiagram-v2
[*] --> Inventory: review inspect
Inventory --> GuardedReply: authorized address
GuardedReply --> ReplyRecorded: confirmed reply
GuardedReply --> InspectUnknownOutcome: interrupted acknowledgment
ReplyRecorded --> Resolved: guarded resolution
ReplyRecorded --> InspectUnknownOutcome: expired or changed expectation
Resolved --> Inventory: inspect againModifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Repository, remote, base, executable, explicit path/index scope, rewrite choice, receipt, and publication flags select the operation and its boundaries. | Structured JSON identifies the captured refs, candidate, refusals, and publication state. |
| Environment and configuration | Forge credentials and Git signing must be available. AL credential plugins do not start; ordinary Bazel checks use their own configuration. | The provider report omits endpoint URLs; ordinary Bazel commands own their check output. |
| Terminal and streams | Delivery uses structured subprocess calls; it does not present a general interactive confirmation flow. | Reports use stdout and errors use stderr; retaining stdout is necessary to preserve returned candidate identities. |
Flags are fixed at invocation. Editing a receipt or captured input during work
can invalidate its exact-state guards.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model. | Active subprocess work is cancelled; retain candidate and receipt evidence because earlier mutations may remain. |
| SIGTERM | Requests cancellation. | No complete-workflow rollback; inspect local and remote postconditions. |
| Terminal closed (SIGHUP) | No special AL recovery. | Output can disappear before the outcome is observed; inspect existing receipt state. |
| Input or output pipe closes | No stdin confirmation is required for publication. | A report-write failure can follow a successful commit, push, or PR mutation. |
| Network lost | Provider detection remains local; inspection or publication reads can fail. | Push or forge outcome may be unknown; verify the remote postcondition before retrying. |
| Disk full or file inaccessible | Required message and receipt paths must be usable. | Candidate or receipt writing can fail; a command error does not remove already created commits. |
| Required state changes | Exact snapshots determine the candidate and expectations. | Candidate, index, prepared scope, refs, and PR metadata are rechecked; a changed base can require checks on a rebased candidate. |
| Concurrent invocation | Operations sharing a receipt contend for its lock. | Cooperating receipt writers serialize; remote leases guard the feature ref, but forge writes are not atomic with human edits. |
| Forced kill | No completion is implied. | Cleanup or evidence finalization may not run; inspect before recovery and do not erase attempt records to force a retry. |
Interactions with other systems
Configuration. Repository and tool selectors are explicit. The supported
GitHub adapter uses Git over SSH and the forge CLI for API operations. Provider
recognition is broader than supported delivery adapters.
Output. JSON reports and private local evidence serve different purposes.
Keep exact candidate identities and PR URLs from the report; a zero-exit
inspection does not certify that publication is safe or required.
Permissions. The operator chooses ownership and authorization. A receipt is
consistency evidence, not a permission grant. The command can create local
commits, replace an owned remote feature ref, and mutate PR state within the
explicitly chosen workflow.
Concurrency. Receipt locks cover cooperating AL operations; exact ref leases
detect remote progress. The forge still permits a concurrent edit between a
check and a mutation, so actively coedited metadata requires coordination.
Persistence and recovery. Preserve receipts and check evidence under ignored
task scratch. The operator decides which checks cover a changed candidate. Resolve
uncertain attempts by observation before any diagnosed manual recovery.
Network. Provider detection is local. Fresh inspection, publication,
verification, and review operations contact Git or the forge. Separate Bazel
checks can contact their configured build services. Direct rebase fetches
remote observations even though its branch update is local.
Edge cases
- A message-only amendment changes the candidate OID even when its tree is
identical; commit-sensitive checks may still change.
- A single generated path removed by the new base is not automatically lost
work: a rebase permits that reduction only when the prior candidate and base
tree entries are identical. Other scope changes are refused.
- Publication and receipt-bound verification require the exact candidate, clean
index, and unchanged prepared scope. Unrelated unstaged and untracked files
are preserved without a rebase; rebasing requires a fully clean checkout.
Review addressing also requires a fully clean prepared checkout.
- A base-ref race can be detected after a feature push; the feature ref can be
briefly visible before a guarded rollback attempt. Cross-ref atomicity is not
provided by the forge.
--no-pull-request is an explicit option for publication without an existing
PR; it does not silently remove an existing PR from the workflow.- Review reply evidence prevents blind duplicate replies, but it cannot prove
that every possible concurrent human moderation event was observed.
Open questions and verification
- Source:
internal/delivery/command.go, delivery.go, rebase.go,
review.go, review_address.go, and the linked command
reference. - Behavior fixtures:
delivery_integration_test.go,
review_address_test.go, and receipt_test.go in internal/delivery. - The isolated rebase fixtures check an advanced base with both an absent and an
existing remote feature ref, an already-based branch, and dirty-worktree
refusal. Their automated pass is recorded separately from historical rebase
observations in the verification protocol.
- Terminal loss, forced termination during remote writes, and provider races
require isolated failure fixtures; no live review comments were posted for
this description.
- Checklist: delivery.
Source revision is the AL documentation baseline.
3.2.6 - Foundations
3.2.6.1 - Invocation, streams, and interruption
Summary
AL exposes config, run, version, release, delivery, bazel, and doctor
directly. There is no intervening repo command. Help is available through
al --help, al COMMAND --help, and al help COMMAND.
Entry and output
Each invocation selects a command before any selected credential plugins start.
Only run starts configured plugins. An ordinary invocation succeeds with exit
status zero; execution errors normally produce a nonzero status and a diagnostic
on stderr. A child exit status can be preserved. Ordinary builds and tests invoke
Bazel directly; al bazel test selects tests from Git changes before running
Bazel. AL does not define a universal --json,
--quiet, or --dry-run option: use each leaf’s help.
config dump, doctor, release plan/inspect, website-operation dry runs, and
delivery reports produce JSON where documented.
version show produces text by default and accepts --format json. Release
commands primarily create files or perform one selected mutation. The nested
release website commands own extraction and activation. Success does not
require a JSON report. AL has no interactive command shell, background scheduler,
or automatic binary update step.
Relative path interpretation is command-specific. Version and delivery accept a
repository selector; doctor defaults to the current directory. Bazel-run tools
can start in a runfiles tree. Pass absolute paths for caller-owned files unless
the relevant command reference explicitly guarantees a different interpretation.
An installed run invocation does not always need Bazel runfiles. Its selected
plugin executables determine that requirement; invalid explicitly supplied
runfiles still fail. Command execution owns the
path and stream-file rules.
Interruption
AL requests cooperative cancellation on SIGINT and SIGTERM. There is no universal
second-Ctrl+C escalation: a second signal must not be described as a guaranteed
force kill. SIGHUP and SIGKILL have no AL cleanup handler. A cancelled or failed
invocation is not evidence that earlier writes were rolled back.
Version commands cancel their active Git process group. Bazel controls build
cancellation when invoked directly. Foreground Git can use the terminal
for authentication and AL restores terminal ownership. al run has a different
child and cleanup policy, owned by the
command lifecycle reference. Local release-generation
file copies do not uniformly check cancellation. Each feature’s table narrows
these guarantees instead of assuming all work responds identically.
Pipe closure is not a request for transactional rollback. A subprocess can stop
or output writing can fail after a durable operation. Check persistent state and
receipts before choosing a recovery action.
stateDiagram-v2
[*] --> Parse
Parse --> HelpOrError: short path
Parse --> Running: valid invocation
Running --> Completed
Running --> Interrupted
Interrupted --> InspectPersistentState
Completed --> [*]Common boundaries
Configuration flags are local to their command family. Ordinary lifecycle
commands do not automatically consume al run plugin configuration. Child
programs remain trusted programs with the operator’s access; AL is not a sandbox.
No command’s help text grants authority to deploy or overwrite external state.
Open questions and verification
- Source:
cmd/al/main.go, internal/cli/root.go, internal/cli/run.go,
internal/versioning/git.go, and internal/bazelcmd/main.go. - SIGHUP, broken pipes, and repeated signals need per-command terminal checks;
no universal output timing, color, or rollback claim is made.
- Checklist: invocation.
Source revision is the AL documentation baseline.
3.2.6.2 - State, identity, and completion
Summary
AL operates on several independent kinds of state. Choosing a source version
does not publish every project. Publishing artifacts does not activate a website.
Planning or inspecting a publication does not create or reserve its remote state.
Preparing or validating a delivery candidate does not itself update the PR.
Direct delivery rebase updates only the local candidate; publication remains a
separate guarded operation after preparation and validation.
State boundaries
| State | What the operator can observe | Owning feature |
|---|
| Configuration | Explicit files and their merged representation | Configuration |
| Plugin resources | Resources available while a selected child runs | Run |
| Source refs | Git branches and tags shared by project builds | Versioning |
| Bundle | Local manifest and copied payloads | Bundle |
| Publication | Complete verified payloads at one destination | Publication |
| Retained site and activation | Extracted content and the selected current link | Website operations |
| Candidate and PR | Exact commit, checks, remote branch, and review state | Delivery |
Projects share repository versioning and the operator workflow, but each release
is selected separately. Immutability applies while a publication exists. Explicit
deletion permits ordinary republishing; there is no restoration-only state.
Shared source tags survive artifact deletion.
Receipts
An artifact-operation receipt records requested steps as pending, then unknown
before remote work, then completed after confirmation. Its overall status is
running, completed, or incomplete. A killed process can leave running and
an unknown step. A lost connection can occur after the remote change, so unknown
never proves absence. Receipt creation must succeed before the associated step.
Use a different receipt path per attempt to preserve history. Artifact upload,
website extraction, and website activation use separate invocations and receipts;
the receipt retains their backend names upload, extract, and link.
A source-ref receipt reports verified Git publication. It is not the checkpointed
artifact-step journal. A delivery receipt binds the repository, refs, candidate,
path scope, and publication expectations. The operator runs and assesses checks
separately; the receipt does not record their results. Its lock prevents
cooperating AL operations from changing that receipt
at the same time. None of these files grants permission, proves current remote
state forever, or substitutes for fresh observations.
Recovery and concurrency
Whole workflows are not one transaction. An upload can succeed before a separate
website extraction fails; a branch push can succeed before PR metadata verification fails. Preserve
completed work and inspect the exact boundary before retrying. Do not edit trusted
receipts to manufacture matching state.
Release publication and source-ref operations use different locks. Artifact
publication serializes destination changes for a project. Source-ref operations
use the Git common directory, shared by linked worktrees. Forced termination can
leave a stale source-ref lock that requires operator investigation. There is no
single global lock coordinating all commands or unrelated external writers.
Open questions and verification
- Source:
internal/release/receipt.go, internal/release/ssh_deployer.go,
internal/versioning/releasepublish.go, and internal/delivery/receipt.go. - Inspect the code and tests when choosing recovery for an interrupted operation;
receipt formats are deliberately not interchangeable.
- Checklist: state.
Source revision is the AL documentation baseline.
3.2.7 - Glossary
Invocation and workspace
AL. The repository lifecycle executable described here.
Invocation. One execution of AL with fixed arguments and inherited environment.
Operator. The person or agent choosing a command and its authorized scope.
Workspace. A directory containing the build configuration for a Bazel invocation.
A Git repository can contain multiple workspaces.
Worktree. A checkout with its own working files and index. Linked worktrees
share Git objects and refs through a common Git directory.
Candidate. The exact commit and tree prepared for delivery, identified by OIDs.
OID. A Git object identifier used to bind an observation to exact content.
Trunk. The repository’s main development branch, normally master here.
TTY. An interactive terminal; pipes and redirected files are different streams.
Runfiles. Runtime files located by a Bazel-launched executable. Copying only
the executable does not necessarily supply them.
Plugin. A configured helper started by al run, with resources kept alive
while its consumer runs. A label selects plugins or individual calls.
Label. A key or key/value selector for configured plugins and calls; also,
in a Bazel command, a target address such as //path:target. Context distinguishes them.
Releases and durable state
Source version. The repository-wide identity calculated from source history;
its calendar rules belong to the module README, linked by the versioning document.
Project release. A publication identified by namespace, project, and version
at one destination. Projects choose when to publish a shared source version.
Bundle. A local directory with release.json and declared files under files/.
Manifest. The JSON description of a release, including identity and payloads.
Payload. A declared file whose name, byte size, and SHA-256 digest are recorded.
Digest. A cryptographic hash of content used to detect different bytes.
Namespace. The projects or third_party part of the public artifact path.
Destination. The selected SSH host, content root, and account context.
Staging. Temporary content prepared before a complete publication becomes visible.
Publication. A complete verified artifact set installed under its public identity.
Publication plan. A metadata-only preview of selected artifact identities,
destinations, the upload operation, and declared payloads. Website-operation dry
runs use the same report format for extraction or activation. Neither establishes
readiness or reserves destination state; source-ref publication uses a different plan.
Release inspection. Observations of local payload validity and remote
publication, retained-site, and activation state for a selected release.
The observations do not authorize mutation or make a later invocation atomic.
Retained site. An extracted website bound to a publication, available for activation.
Activation. Selecting a retained site through the destination’s current link.
Immutable. Existing published identity and bytes cannot be overwritten by AL.
Explicit deletion permits ordinary publication again; it does not preserve a tombstone.
Lease. An expected ref identity checked before publication. It detects conflicting
progress; it is not permission to overwrite unrelated work.
Receipt. A local record of observations. Artifact-operation, source-ref, and
delivery receipts are different formats with different recovery behavior.
Events that end or interrupt
Completion. The command reports success for the operation it actually performed.
It does not imply that every later release or delivery step has happened.
Cancellation. SIGINT (Ctrl+C) or SIGTERM requests cooperative shutdown. The
feature determines which subprocesses and resources respond.
Interruption. Any event preventing normal completion, including cancellation,
closed streams, network failure, changed state, or forced termination.
SIGHUP. A terminal-hangup signal; AL installs no special handler for it.
Forced kill. Termination that prevents application cleanup, such as SIGKILL.
Unknown. An artifact receipt step started but has not confirmed its outcome.
Unknown does not mean that the destination was unchanged.
Refusal. A guard rejects an operation. Earlier completed work may still exist;
read the operation’s recovery boundary.
Safe local observation. A read-only invocation or an invocation confined to
synthetic task scratch, with no live publication or real credential use.
Configuration and execution
Configuration. The merged explicit AL settings used by configuration inspection or command execution.
Standard streams. The child or AL process’s stdin, stdout, and stderr channels.
Exit status. The numeric result returned to the invoking shell; zero denotes success for the selected operation.
User Bazel configuration. Per-user defaults in ~/.bazelrc, including optional
agent output preferences. Bazel reads these alongside workspace configuration;
AL does not insert a configuration selection into build commands.
Cleanup. Shutdown and resource release after a child or plugin stops; it can fail and is not guaranteed after forced termination.
Source and delivery vocabulary
Channel. Development, nightly, or release context used to calculate and validate a source version.
Source ref. A Git branch or tag naming source history, shared independently of project artifact status.
Stamping. Supplying source version and identity metadata to a build.
Detached checkout. A checkout whose HEAD names a commit directly rather than a local branch.
First-parent history. The chain obtained by following the first parent of each commit; it determines release patch position.
Pull request (PR). The forge’s review object associated with a proposed branch change.
Forge. The service hosting repository metadata and review operations.
Path scope. The complete set of task-owned paths bound to a delivery candidate.
Atomic update. A particular operation makes its selected changes together; it does not imply that a multi-command workflow is one transaction.
Review authority. Short-lived receipt evidence binding an authorized review mutation to exact observed expectations; it is not permission by itself.
3.2.8 - Goal: describe the AL command-line product
Read README.md, glossary.md, foundations/invocation.md, foundations/state.md, and
releases/bundle.md. Match the pilot’s depth and eight-section skeleton.
Source of truth
Use the revision identified by the feature’s source footer. The original
descriptions share a baseline. Read the owning
command, state handling, defaults, and behavior tests at the selected revision.
When revising a feature for a later implementation, cite the revision examined
in its footer and update its checklist. Preserve the original commit and
executable identity of earlier observations.
The project path is projects/al, while Bazel consumers retain @rules_al.
Keep current source links and retained evidence locations accurate after moves;
original runtime paths inside historical records remain evidence of those runs.
Writing rules
Describe the operator’s experience, with technical mechanisms only in
> Technical note: blocks where they explain an observable consequence. Use
sentence-case headings and glossary terms. Explain surprising behavior directly;
record suspected defects instead of smoothing them over. Keep the fixed modifier,
interrupt, and cross-cutting rows from README.md in every feature document.
Use relative links to foundations. Include one stateDiagram-v2 for each
interaction. End with Open questions and verification and a source footer.
Mark scripted observations separately from manual verification.
Foundation references
State ownership and order
The bundle document owns local generation and minimal source identity. The
publication document owns artifact upload/deletion, nested release website
extraction/activation and their dry runs, remote staging, and operation receipts.
Versioning owns source refs and stamping. Delivery owns candidate, push, PR,
and review state. The operator’s ordinary Bazel commands own build and test
outcomes. Do not mix their meanings of completion.
Write the pilot, foundations, and publication yourself before delegating remaining
documents. Then check every result for consistent vocabulary, complete tables,
working relative links, source footer, and explicit unknowns. Add checklist rows
for observable claims and each nontrivial modifier/interrupt cell. Keep stable IDs.
Working rules
Select the OpenSpec change that covers the requested work in projects/al
using al-openspec. Use al-workspace for the task’s ignored scratch and
al-delivery for publication. Paths in verification records identify the
original runs. Keep this documentation in the AL repository. Authorized source fixes
belong to the implementation workflow; update affected claims, checklist results,
and triage history afterward. Update structure and coverage when files change.
No coverage row may remain not started at handoff; drafted is honest when manual
checks remain. Never infer rollback from a failure exit.
3.2.9 - Releases
3.2.9.1 - Artifact publication and website operations
Summary
al release plan previews the selected publication from local metadata.
al release inspect checks local payloads and observes the selected destination.
al release publish uploads selected project artifacts to that SSH destination.
al release website extract creates a retained site from a published archive;
al release website activate selects a retained site. These are separate
commands. al release delete removes an inactive release. Existing publications
are immutable until that explicit deletion.
The simple case
Build one project’s bundle using a shared source version. Select its bundle with
--release_dir, the environment with --environment, and an explicit SSH host
or deployment file. Run plan with those selections to inspect the identity,
destination, steps, and declared payloads without contacting the destination.
Use inspect when current local-file and remote-state observations are needed.
Then run publish explicitly to upload artifacts. For a website, separately
run website extract and website activate with the same bundle and destination.
Each website command supports an offline preview through --dry-run. Read the
completed-operation output and optional --receipt file. Other projects
need not be built or published. The operator recipe
provides complete destination flags and prerequisites.
The interaction, event by event
Invoke
AL reads each selected bundle’s manifest. An explicit --ssh_host or
--ssh_deployment selects all manifest items; otherwise the environment selects
matching SSH deployment items. An empty selection fails. A development identity
cannot be published. Third-party artifacts have their own namespace and support
upload and explicit deletion, but not website extraction or activation.
The command selects one operation: publish uploads, website extract
extracts, website activate activates, and delete deletes. There is no generic
step-selection flag. Extraction accepts --site_archive to select a declared
archive. Activation selects an already retained site without reading a local
archive. Each operation runs independently.
Help makes no release changes. Invalid destinations, unsafe identities, and
unsupported selections fail before their operation. OCI metadata can be generated,
but OCI publication is disabled because its old mutable-tag path cannot provide
the publication guarantee. This refusal does not fall back to SSH automatically.
plan and inspect are observations, not implicit requests to publish. A plan
does not validate local payload bytes, authenticate to SSH, or establish that the
selected destination will accept the operation. Inspection can observe changed
state without authorizing its replacement. Neither report is an operation receipt.
If --receipt is requested for a mutation, AL must initialize its private local
file before remote work. Website --dry-run writes an offline plan without
performing that operation; combining it with --receipt, even an explicitly
empty value, fails before effects. A later bundle or destination can fail after
earlier ones completed; the invocation is not an atomic transaction across all
selections.
Begins running
For artifact upload, AL checks an existing public identity under the destination lock. If the canonical
manifest, complete file set, sizes, and digests match, upload succeeds without
opening local payloads or transferring them again. A mismatch refuses overwrite.
For a new identity, AL verifies and copies local files to staging, transfers the
complete set to destination staging, then verifies it there. Publication exposes
the complete directory in one promotion. A failed transfer does not expose a
partial new public release.
While running
The selected operation begins only after its receipt checkpoint, if requested. The
state foundation owns pending, unknown, and
completed meanings. AL prints Completed STEP for PROJECT/VERSION in ENVIRONMENT
after confirming each step. A subsequent failure preserves prior completed steps.
website extract fetches the declared published archive, verifies it, and
extracts it locally before promoting a retained site. A root index.html is required.
Archive types, entry limits, and rejected members
are part of the operator contract. The local disk must hold the archive and
extracted content. Uploading an archive alone never extracts it.
website activate verifies the retained site’s binding and published payloads,
then selects it through sites/PROJECT/current. Earlier retained sites remain
available. Rollback is an explicit website activate for another retained
version. A failed extraction leaves activation unchanged.
Deletion first checks both release and site paths, managed ancestry, mounts,
and active-site status before removing either tree. An active website must be
replaced by another retained selection first. Deletion is guarded, but its two
removals are not a crash-atomic pair: an interruption can leave only one removed.
Finishes
A successful upload means downloadable files exist at the selected identity.
Successful extraction means a retained site exists; successful activation means
it is selected. Successful deletion means the selected release and retained site are
absent. Deleting an already absent release succeeds. Shared Git tags remain.
After deletion, ordinary publication can reuse the identity with different bytes.
There is no tombstone, restoration command, or requirement to reproduce the old
contents. Publication receipts are evidence of an attempt, not locks on future
state. After an unknown outcome, run inspect with the same bundle and destination
selection. Compare its publication digest and observed state with the receipt,
then retry only the intended unresolved step. Inspection does not update the
receipt or reserve the observed state for that retry.
stateDiagram-v2
[*] --> Absent
Absent --> Staging: upload
Staging --> Published: verify and promote
Published --> Published: identical retry
Published --> Refused: conflicting bytes
Published --> RetainedSite: website extract
RetainedSite --> Active: website activate
Active --> RetainedSite: select another version
RetainedSite --> Absent: delete
Published --> Absent: deletePreview and inspection are separate interactions
plan reads the selected manifests and destination configuration, applies the
publication selection rules, and returns a JSON description of what was selected.
Its metadata-only result names the project identity, upload operation, destination,
declared payloads, and canonical publication digest. It distinguishes selection
through an explicit host/deployment from selection through environment metadata.
When SSH configuration owns the port, the report leaves it unspecified instead
of inventing a resolved connection setting.
The plan uses schema release/artifact_plan/v1 and mode offline_metadata.
Each entry in operations includes selection (explicit or environment),
the namespace/project/version, source identity when applicable, requested steps,
payload names/sizes/digests, publication digest, and public/site paths. Its
destination describes environment, host or SSH alias, root, and account selectors.
Its port and ssh_user are null when OpenSSH configuration owns their
resolution. A null publish_user means commands use the SSH login account
directly. The report omits credential material and identity/trust-file paths.
Website extract --dry-run and activate --dry-run produce the same plan schema
for their fixed operation. Their report retains backend operation names extract
and link; the artifact plan uses upload. This is a preview, not an inspection
of archive bytes, site validity, or the current link. Each website dry run rejects
--receipt before remote work.
Planning does not open payload files, start SSH or rsync, initialize an operation
receipt, or create destination state. A valid plan can therefore name missing
local payloads or an unavailable destination. Run the selected publication command
separately; it rereads inputs and performs its own checks. This publication plan
is distinct from a source-ref publication plan. Both release observation
commands reject --receipt; it belongs to mutating operations.
inspect uses the same bundle and destination selection, verifies local payloads,
and reads the remote publication and retained-site state. Local and remote
observations are independent: a matching remote publication can coexist with
missing local files, which matters for an identical upload retry. Inspection
does not create staging, acquire a mutation lock, repair a publication, extract
a site, or change the current selection.
Activation is reported independently from retained-site validity. A selected site
does not become valid merely because the current link points to it. When a read
fails, its state remains unavailable or unknown rather than being reported absent.
Inspection does not load an earlier receipt; the canonical publication digest
helps the operator compare an observation with the identity recorded in one.
Inspection uses schema release/artifact_inspection/v1 and mode
read_only_snapshot, adding observed_at when its reads finish. The timestamp
does not make its multiple reads atomic. Each operation adds these observations:
| Field | Reported states and meaning |
|---|
local | Each payload is verified, missing, corrupt, or unreadable. These findings do not suppress the remote read. |
remote.status | absent, matching, conflicting, corrupt, or unavailable. Matching requires the expected canonical manifest and complete regular file set with the expected sizes and hashes. |
remote.site.status | absent, retained, active, conflicting, corrupt, not_applicable, or unavailable. Site validation checks the binding, guarded ancestry, and regular root index.html; it does not rehash every extracted site file. |
remote.site.active | true when the current link selects this version, independently of site validity; false for a known unselected version; null when selection is unavailable, inapplicable, or unsafe. A selected dangling link can still report true. |
remote.site.current | absent, selected, other, dangling, unsafe, not_applicable, or unavailable. This distinguishes the current link’s condition from the selected site’s validity. |
A completed inspection can exit zero while reporting missing, unreadable,
conflicting, or corrupt content. Zero means the observations completed, not that
publication or activation is ready. With valid metadata selections, a failed SSH
read, invalid response, timeout, or excessive response leaves remote fields
unavailable, emits the JSON report, and returns a nonzero status with a diagnostic.
These failures do not report the release absent.
Cancellation during local payload verification stops that work before the remote
read and can return before a JSON report is written. It is an interrupted
inspection, not a finding that the payload is corrupt.
stateDiagram-v2
[*] --> ReadSelection
ReadSelection --> Refused: invalid metadata or selection
ReadSelection --> MetadataReport: plan
ReadSelection --> VerifyLocalAndReadRemote: inspect
VerifyLocalAndReadRemote --> ObservationReport: observations available
VerifyLocalAndReadRemote --> IncompleteObservation: required read fails
MetadataReport --> [*]: no publication
ObservationReport --> [*]: no publication
IncompleteObservation --> [*]: inspect reported failuresModifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | The command selects upload, extraction, activation, or deletion. Destination, project/namespace, timeout, and SSH flags select its target; extraction also accepts an archive. plan, inspect, and website --dry-run do not mutate it. | Observations and website dry runs return JSON. Mutations print confirmed-step lines and optionally checkpoint --receipt evidence. |
| Environment and configuration | --environment selects a destination group. Normal SSH configuration supplies trust and authentication for inspection and publication; planning uses only declared settings. | Unresolved SSH settings remain unspecified in the plan; no credential values belong in manifests or receipts. |
| Terminal and streams | Planning needs no connection or terminal input. Inspection and publication use noninteractive SSH with strict host-key checks. | Reports use stdout; a closed output stream can prevent receipt of a complete observation or completion line. |
Flags are fixed for the attempt. A changed destination file or bundle requires a
new invocation; do not edit inputs during publication.
Cancel and interrupt
For plan, inspect, and website --dry-run, interruption can prevent a complete report but does not
turn the observation into a publication or recovery action. The remote changes,
staging, and receipt checkpoints described below apply to mutating commands.
An interrupted inspection must be rerun to obtain fresh observations.
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses invocation cancellation. | Active work is cancelled where observed; completed steps remain and a started step may be unknown. |
| SIGTERM | Requests cancellation. | Same recovery boundary as Ctrl+C; no complete-workflow rollback. |
| Terminal closed (SIGHUP) | No special recovery. | Remote work may have occurred; inspect receipt and destination. |
| Input or output pipe closes | Commands do not ask for a confirmation on stdin. | Loss of completion output does not prove failure of remote work. |
| Network lost | Connection or trust checks fail. | Staging can remain; after a lost acknowledgment the public outcome can be unknown. |
| Disk full or file inaccessible | Unwritable requested receipt prevents remote work. | Staging, extraction, or checkpoint can fail; preserve earlier completed steps. |
| Required state changes | Inputs determine the attempted identity. | Destination contents and bindings are rechecked under lock; conflicting contents fail. |
| Concurrent invocation | Both can inspect the same destination. | Final locked verification preserves an existing identity; identical contenders can succeed. |
| Forced kill | No completed step is implied. | Cleanup may not run; a receipt may remain running with an unknown step. |
Interactions with other systems
Configuration. Destination selection uses explicit release options and
manifest deployment metadata, not al run credential plugins.
Output. Completion lines describe individual steps. The canonical public
manifest omits transport configuration; the local receipt includes the resolved
destination and publication digest. Planning and inspection return JSON reports
whose observations do not become checkpoints for a later invocation. Website
dry runs use that same plan format; receipt/completion names retain the backend
extract and link operation names.
Permissions. The operator needs SSH access and the configured content-account
rights. The operator reference owns tool,
mode, and timeout defaults. AL does not provision the receiver.
Concurrency. The destination lock protects cooperating project operations.
External changes are not authorized by that lock and must still satisfy checks.
Persistence and recovery. Whole-attempt atomicity is not promised. Preserve
receipts and inspect the selected destination after an unknown outcome. Compare
the selected digest and observed state before retrying the intended unresolved
step. Never infer that a failed invocation deleted or restored earlier work. A plan is a preview;
inspection reports what its reads observed and does not reserve that state.
Network. OpenSSH and rsync contact the selected destination. The separate
infrastructure mirror is outside this command and can replace public state under
its own operator workflow. Planning is offline. Inspection uses SSH reads and
does not transfer a new publication through rsync.
Edge cases
- An identical upload can succeed even when the local payload files are missing.
- An extra remote file or a corrupt byte causes retry verification to fail.
- Symlinked ancestry and nested mounts, including bind-mounted files, block
deletion. Mounts inside a selected retained site also block activation.
- A retained site’s binding must match the selected publication; sharing a version
string is insufficient.
- A plan can succeed without readable payloads or usable SSH credentials; it
verifies metadata selection only. Inspection can report remote content even
when those local payloads are missing or corrupt.
- An inspection’s active selection is not proof that the site is valid or
serving successfully. Use its site and current-link findings together.
- A current-link target containing a control character, including an added
newline, is unsafe. Its near-match to a version name does not establish selection.
- Multiple release directories and destination groups can leave partial overall
progress even though each publication has its own guarded boundary.
Open questions and verification
- Source:
internal/release/cmd.go, deployer.go, observation.go,
ssh_deployer.go, ssh_config.go, receipt.go, and lifecycle_test.go. - Planning and inspection fixtures in
observation_test.go exercise the built
CLI with controlled SSH transport and compare destination contents before and
after each observation. The final fixture record also covers cancellation
during local hashing before SSH starts. These automated observations are
recorded as O1 in the verification protocol.
Site inspection deliberately does not verify every extracted file; readers
must not interpret it as a full website integrity scan. - Lost acknowledgments, forced termination during deletion, and external writers
require destination-state observations. They are not covered by local help checks.
- Checklist: publication.
Source revision is the AL documentation baseline.
3.2.9.2 - Generate a project bundle
Summary
al release generate assembles declared payloads and release metadata into a
local bundle. Generation makes files inspectable; it does not publish anything.
The simple case
Create a workspace-status file and one payload, then run
al release generate --project projects/example --version_file STATUS --add_file PAYLOAD --output_dir EMPTY_DIRECTORY. Inspect release.json and
files/ in the output. The payload retains its basename. For ordinary project
builds, use the owning releases:bundle target and
version stamping, as described by the
module’s build recipe.
The interaction, event by event
Invoke
The operator chooses a project, status file, and payloads. Repeat --add_file
for several files. AL reads files to record sizes and SHA-256 digests. Optional
input manifests and deployment metadata are merged before outputs are written.
The source identity is the version, channel, commit, and tree state supplied by
the build; optional GitBundle history can provide release-page changelogs.
Help writes command usage. Missing inputs, invalid status values, unsafe names,
colliding basenames, and bundles without payloads fail. A nonempty output
directory is refused; generation is not an overwrite operation.
Begins running
For a bundle, AL creates the destination’s files directory after checking the
identity and available inputs. Nondevelopment first-party bundles require clean
source identity. Development bundles can be inspected but cannot be published.
While running
AL copies payloads into the output. Source symlinks can resolve to regular
payload files. A copying failure can leave a partial local output directory;
the absence of a completed manifest distinguishes it from a completed bundle.
Do not reuse that nonempty directory as the next generation destination.
Finishes
The bundle manifest is written after payload copies finish. Optional
--output_manifest and --output_release_page also write explicit outputs.
A successful invocation leaves local files; no destination has been contacted.
stateDiagram-v2
[*] --> InspectInputs
InspectInputs --> Refused: invalid input or occupied output
InspectInputs --> CopyPayloads
CopyPayloads --> PartialLocalOutput: copy fails
CopyPayloads --> WriteManifest
WriteManifest --> BundleReady
BundleReady --> [*]Modifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Payload, project, status, merge and output flags choose the local artifacts; --output_file_mode controls manifest/page permissions. | --indent controls JSON layout; help lists all output options. |
| Environment and configuration | Explicit build inputs supply release metadata; AL plugin configuration is not loaded. | No plugin startup output. |
| Terminal and streams | Files are written to explicit paths; a terminal is not required. | Generated artifacts are files; errors use the command diagnostic stream. |
These selections are fixed at invocation; changing a source file during the copy
is not a supported way to change a bundle.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model. | File copying does not promise prompt cancellation; inspect local output. |
| SIGTERM | Uses the invocation signal model. | No transaction-wide rollback of local outputs is promised. |
| Terminal closed (SIGHUP) | No special AL recovery. | Files already written can remain. |
| Input or output pipe closes | Payloads come from named files, not stdin. | Diagnostic stream closure has no rollback guarantee. |
| Network lost | No effect for ordinary local inputs. | No effect for ordinary local inputs. |
| Disk full or file inaccessible | Reading required inputs fails. | Copy or manifest writing fails; partial local files can remain. |
| Required state changes | Current inputs are read. | Concurrent input edits have no snapshot guarantee; use stable inputs. |
| Concurrent invocation | Each must use its own empty output. | A shared output has no whole-bundle locking contract. |
| Forced kill | No completed output is implied. | Partial files remain; generate into a fresh directory. |
Interactions with other systems
Configuration. Release flags and status metadata are explicit; no credential
plugins start.
Output. The state model distinguishes the local
manifest from the canonical public manifest.
Permissions. Inputs must be readable and output writable. Payload copies use
ordinary file permissions; the manifest/page mode is a separate option.
Concurrency. Use stable inputs and one output directory per invocation.
Persistence and recovery. Inspect local output after failure and choose a
fresh empty output for retry. Generation has no artifact-operation receipt.
Network. Generation does not contact an SSH or OCI destination.
Edge cases
- Two payloads with the same basename cannot share one bundle.
- Every bundled manifest item needs a corresponding local
--add_file source. - Third-party version ownership differs from first-party source stamping.
- An already generated bundle is not evidence of remote publication.
Open questions and verification
- Source:
internal/release/generator.go, bundle.go, cmd.go, and
bundle_test.go; built-CLI fixture: cmd/al/lifecycle_e2e_test.go. - File-copy interruption latency and shared-output races need explicit runtime
observations; no prompt-stop guarantee is inferred from signal registration.
- Checklist: bundle generation.
Source revision is the AL documentation baseline.
3.2.9.3 - Inspect versions and publish source refs
Summary
al release create creates a weekly source branch and its initial tag.
al version calculates the shared source version, prepares nightly and patch
tags, publishes reviewed source refs, and supplies version metadata to builds.
These operations do not select projects or publish their artifacts. The
calendar scheme owns the development,
nightly, weekly-branch, and patch naming rules.
The simple case
Run al version show --format json to inspect the current checkout’s version,
channel, commit, branch, and tree state. For an authorized weekly release, start
from clean trunk and run al release create. AL creates the weekly branch and
its initial tag atomically, leaving HEAD and the checkout on trunk. Run
git checkout releases/YYYY.W with the branch name that create printed to
select the release before building or tagging it. AL provides no checkout command.
Write a source-ref plan with al version release-plan --lease weekly-release --plan PLAN, inspect the exact refs and commit, then use
al version release-publish --plan PLAN --receipt RECEIPT. A successful receipt
reports verified remote source refs. Build and publish each desired project
separately through bundle generation and
artifact publication.
The interaction, event by event
Invoke
The selected repository defaults to the Bazel workspace environment when
present, otherwise the current directory. --repository chooses a checkout.
Version-command shared flags work before or after the leaf command.
al release create has its own repository, trunk, date, and dry-run flags.
show reads source state without creating refs. --channel disambiguates
release and nightly inspection; --release supplies a release-line context for
a detached checkout or its matching release branch. These selectors do not
retag the source. Ref-changing commands reject them rather than interpreting
them as permission to change the selected version.
Help prints the relevant flags. Invalid channels, calendar values, missing
required plan paths, or unsupported output formats fail. Local ref preparation
requires a clean eligible branch with no Git operation in progress. Dry runs
check the same ref eligibility and namespace collisions without creating refs.
Creation never changes the selected branch; choosing another checkout is a
separate Git operation.
An ordinary untagged development checkout can be inspected while dirty, but
nondevelopment stamping refuses a dirty checkout. A source-ref plan cannot
publish a development version.
Begins running
version nightly-tag creates a local nightly tag on clean trunk. release create
creates the weekly branch and initial tag together without switching HEAD.
version release-tag creates the
current patch tag on a clean weekly branch. Existing local refs are not
silently overwritten. A second nightly on the same unchanged commit is refused,
even when its date would produce a different tag name.
release-plan writes and prints the reviewed JSON plan. This is a local file
operation; it does not publish refs. release-publish reads that exact plan,
checks the selected remote, and acquires the shared source-ref operation lock.
Its --atomic setting must match the plan. Atomic publication needs an explicit
lease value; a remote that cannot provide the requested atomic update causes a
refusal rather than an automatic non-atomic fallback.
While running
Source publication checks remote ref expectations again under the local lock.
Absent create refs may be created; existing refs are acceptable only at the
expected commit. A conflicting tag or branch fails. A patch plan verifies the
already delivered weekly branch independently of a diverged trunk.
bazel-status prints workspace-status metadata without launching a build.
In this repository, bazel build --config=release TARGET invokes the installed
AL status command for the current workspace. Install or update AL before the
build; the status command does not bootstrap another Bazel process. The
build reference owns setup and explicit
version selection. Bazel controls build output, status, and cancellation.
Finishes
Local ref preparation prints the created tag or branch. Source publication
rechecks the remote refs and prints its receipt, also writing it when
--receipt is selected. Building with stamping produces build outputs; neither
that build nor source-ref publication uploads a project’s bundle.
Completion of the remote operation can precede local evidence writing. If
writing the receipt or stdout fails, the refs can already exist remotely.
Inspect those refs before recovering. Release creation and checkout are separate:
if the later git checkout fails, the branch and tag created by AL still exist.
stateDiagram-v2
[*] --> InspectSource: invoke
InspectSource --> Reported: show or dry run
InspectSource --> LocalRefs: release create
LocalRefs --> ReleaseSelected: git checkout releases/YYYY.W
ReleaseSelected --> PlanWritten: release-plan
PlanWritten --> CheckRemote: release-publish
CheckRemote --> Refused: conflicting expectations
CheckRemote --> RemoteRefs: guarded publication
RemoteRefs --> VerifiedReceipt: verify and write evidence
RemoteRefs --> InspectOutcome: evidence or verification fails
VerifiedReceipt --> [*]Modifiers
| Variant | Changes what happens | Changes what is printed |
|---|
| Arguments and flags | Repository, trunk, inspection channel, release context, date, dry run, plan, remote, and atomic options select their documented operation. | show --format json adds structured state; local preparation prints a ref; plan and publication commands print JSON. |
| Environment and configuration | The default repository can come from the Bazel workspace environment; Git identity, transport, signing, and trust use the selected operation’s Git setup. No AL credential plugins start. | Git diagnostics can accompany failures; stamping emits its defined status keys. |
| Terminal and streams | Foreground Git authentication can use the controlling terminal; piped execution has no equivalent terminal guarantee. | Reports and workspace-status keys use stdout; failures use stderr. |
Arguments are fixed at invocation. Changing a checkout or plan during an
operation is not a supported way to revise the chosen release.
Cancel and interrupt
| Event | Before work | During work |
|---|
| Ctrl+C once or twice | Uses the invocation signal model. | Active Git receives cancellation; already created refs can remain. |
| SIGTERM | Requests cancellation. | Uses the same cancellation path; no whole-workflow rollback is promised. |
| Terminal closed (SIGHUP) | No special AL recovery. | Inspect refs and the source-ref lock before retrying. |
| Input or output pipe closes | Local inspection requires no stdin confirmation. | Git authentication or report writing can fail; published refs may already exist. |
| Network lost | Local inspection and local ref preparation need no remote. | Publication may fail before or after a remote update; absence of a receipt is inconclusive. |
| Disk full or file inaccessible | Repository or plan reads fail. | Local ref changes or evidence writes can fail; inspect what was already created. |
| Required state changes | Current source state determines the operation. | Source/ref expectations are rechecked; conflicting remote state is refused. |
| Concurrent invocation | Local ref creation checks expected refs. | Source publishers sharing a Git common directory contend for the operation lock; remote creates remain guarded. |
| Forced kill | No completion is implied. | Cleanup may not run; a source-ref lock or completed refs can remain without a receipt. |
Interactions with other systems
Configuration. Version selectors are distinct from plugin configuration.
The source preparation reference owns
calendar defaults and the standard release sequence.
Output. Text, JSON, ref names, and workspace-status keys are operation-specific;
there is no single output format flag across all version commands.
Permissions. Inspection needs repository access. Ref preparation needs local
Git write access; publication also needs access to the selected remote.
Concurrency. The state foundation
owns the distinction between source-ref and artifact locks. The local source-ref
lock is shared by linked worktrees; it does not lock arbitrary external writers.
Persistence and recovery. Plans and receipts record exact identities. Inspect
created refs after interruption, investigate stale locks, and preserve evidence.
An artifact deletion does not delete these shared source refs.
Network. Source publication uses Git. Local inspection and local ref
preparation do not contact the remote; a stamped build can use whatever network
access its Bazel setup requires.
Edge cases
- A detached checkout with both nightly and release tags can require an explicit
channel. AL refuses ambiguous context instead of guessing.
- A weekly patch is derived from first-parent position, not from the number of
projects released or the number of times publication was attempted.
- Dry run does not guarantee a later mutation will succeed after another writer
changes the refs.
- A non-atomic plan is an explicit choice and can leave partial remote progress
after failure; AL does not silently downgrade an atomic plan.
- Inspecting a source version is not proof that any project built from it has
been published.
- Creating a weekly release leaves version inspection on the original trunk
context until an ordinary Git checkout selects the release branch.
Open questions and verification
- Source:
internal/release/cmd.go, internal/versioncmd/cobra.go, command.go,
cmd/workspace_status/workspace_status.sh, and internal/versioning/git.go,
releaseplan.go, and releasepublish.go. - Behavioral evidence:
internal/versioncmd/command_test.go,
internal/versioning/git_integration_test.go, publication_integration_test.go,
and the controlling-terminal cases in cmd/al/lifecycle_e2e_test.go. - Source-publication acknowledgment loss and receipt-write failure need isolated
observations; no live source refs were changed for this document.
- Checklist: versioning.
Source revision is the AL documentation baseline.
3.2.10 - Verification protocol
These checklists compare the source-derived description with a running AL.
They do not authorize a live publication. Use synthetic inputs and isolated
repositories or the existing behavior fixtures.
AL’s source now lives in projects/al, with Bzlmod name rules_al unchanged.
The baseline and C2/R1/O1 records below predate that move. C2’s retained scratch
directory moved with the project; its current location is listed below, while
raw recorded arguments and source paths retain their original provenance. A
location update is not a new verification pass or a broader portability result.
Checklists
| File | Covers |
|---|
| Foundations | Invocation and state boundaries |
| Releases | Bundles, source refs, artifact publication, website operations and their previews |
| Delivery | Candidate, publication, and review |
| Commands | Configuration, child execution, affected tests, diagnostics |
Run a pass
- Build AL at the source revision in the feature’s footer or establish that the
executable inputs match that revision. Group checks by revision. Record commit,
executable SHA-256, time, operating system, and whether a TTY is present.
- Install only into ignored task scratch, or invoke the built executable with
its declared runfiles when that is the surface being checked. Keep the two
cases distinct. Use absolute fixture paths.
- Read each linked claim. P1 covers shared facts and suspected defects, P2
ordinary behavior, and P3 numeric details. Run P1 before P2, then P3.
- Use the named isolated setup. Record
pass, fail, or blocked, with the
means of observation. Leave — for unrun rows. Preserve stdout, stderr, exit
status, and relevant resulting files outside tracked documentation. - A mismatch can be a document error. Correct that before filing a product
defect. Deduplicate real suspicions in triage.
- Keep coverage
drafted after an automated pass. Mark a document verified
only after its P1/P2 rows are manually observed or failures are filed and its
remaining limitations are explicit. Never renumber used checklist IDs.
Setups
- Local: Linux, Bash, pipes unless TTY is specified; source-built binary,
no user configuration, minimal synthetic environment, task-local output.
- Git: fresh scratch repository with a clean commit, trunk
master, local
identity and signing disabled for fixtures; optional local bare remote.
Never run mutation rows in the feature worktree or against GitHub. - SSH fixture: the existing
internal/release/lifecycle_test.go controlled
transport fixture or root infra/download/test/sync loopback SSH fixture.
Use fixture content roots and synthetic identities only. Failure injection
belongs inside that setup; do not disconnect or alter a real host. - Delivery fixture: existing delivery integration fixtures with isolated Git
repositories and a controlled forge. Actual candidate publication is separately
evidenced by delivery receipts, not by these test rows.
- Interrupt fixture: a controllable slow child/transport or filesystem with
a visible checkpoint. Send signals only to its recorded PID. Observe state
before retrying. SIGHUP, repeated signals, and TTY prompts require dedicated
terminal observation; piped output is not a substitute.
Historical baseline observations
On 2026-11-02 a scripted pass exercised 30 invocations against the executable
whose SHA-256 is 019074063ca33f92755b608da59da4a1922a385744624ed7fdcac13738f41bf5.
The executable’s AL source matched the original post-rebase snapshot 4a10748.
These observations predate the fixes and remain historical evidence. Fifteen
observations cover configuration/run/Bazel/doctor; fifteen cover help, version
preparation/publication to a local bare remote, bundle output, and local Git history generation. The generated
bundle’s payload hash was independently checked against its manifest.
The history-export command has since been removed; that original observation is
retained only as historical evidence and has no current feature/checklist row.
The original Bazel-forwarding observations likewise describe a removed command;
ordinary builds now invoke Bazel directly.
The original weekly preparation observations included an automatic checkout.
They do not verify the current al release create behavior, which leaves the
checkout unchanged and requires ordinary Git to select the release branch.
The delivery observations recorded on 2026-11-02 also predate the check-plan and
results-ledger removal. Their Git/review findings retain their original scope;
they do not establish current check selection or stored validation readiness.
Evidence is task-local under
out/unify-release-versioning/rebase-description/observations-agent/ and
observations-release/. The command checklist cites the stable observation IDs;
release checks cite their IDs likewise. The evidence uses only synthetic inputs.
B-01 and B-02 were reproduced; B-03 was source-derived in this original pass.
This pass did not inspect interactive rendering, terminal prompts, repeated
signals, actual credential providers, or a live release destination. Existing
E2E fixture results from delivery validation are separate evidence. No document
is marked manually verified, and unrun checklist rows remain —.
Later fixture passes
The following automated passes on 2026-11-02 exercised the corrections during
candidate preparation. They supplement the 30 original observations; they do
not replace their provenance or establish a manual pass.
| Record | Scope | Retained evidence |
|---|
| C2 | TestRunStandaloneCLI (8 cases), TestRunStreamFiles (2), and TestRunPluginEnvironment (3) passed against a copied binary-only installation and synthetic child/plugin helpers. | projects/al/out/unify-release-versioning/run-fixes/after-artifacts/observations/ contains 13 JSON artifacts. Failing-before artifacts remain in the sibling before-artifacts/ directory. |
| R1 | TestRebasePreservesRemoteUntilPublication (existing/absent remote), TestRebaseAlreadyBasedPreservesRemote, and TestRebaseRequiresCleanWorktree passed in isolated repositories and a controlled forge. | out/unify-release-versioning/bug-fixes/rebase-before.log and rebase-after.log; the passing target emits rebase-local-false.json and rebase-local-true.json as undeclared outputs. |
| O1 | The final complete release package passed, including TestReleaseObservationCLI, TestSelectedDestinationCLI, and TestReleaseInspectionCancellationCLI. The built CLI checked offline planning, destination observations, unchanged destination trees, and cancellation during local hashing. | Under out/unify-release-versioning/release-observation/, final-release-test.log records the pass and final-evidence/ contains 25 numbered observation reports (2 plans, 23 inspections), selected-plan.json, and inspection-cancellation.json. Earlier reports remain in evidence/; the missing-command, current-link-newline, and local-hash-cancellation failure logs are retained separately. |
The checklists cite C2, R1, and O1 by exact test/subcase or artifact names.
File-mode and marker observations are limited to those retained fixture outputs.
Source-derived next_action wording and later-startup truncation behavior retain
unrun rows. O1 covers missing/corrupt local payloads; absent, matching, conflicting,
corrupt, and unavailable remote publications; retained, active, invalid, unsafe,
and dangling website selections; and failed, malformed, timed-out, or excessive
remote responses. The cancellation fixture records a prompt nonzero exit during
local hashing with no SSH startup; its elapsed time is an observation, not a
product timing guarantee. Cancellation before report encoding need not emit JSON. Timeout and excessive-output cases occupy reports 07/08 in an
unspecified order. Direct receipt reconciliation, third-party inspection, and
unreadable local-payload rows remain unrun.
These passes do not exercise live Vault, GitHub, release destinations, interactive
prompts, repeated signals, or every failure window. Coverage remains drafted
throughout.
After the move to projects/al, the CLI, Bazel-command, and delivery test targets
passed against the changed source. These are bounded fixture checks of the new
doctor inputs and selected-base handling, not a verification of every AL workflow
in another repository. Earlier C1/C2/R1/O1 records retain their original meaning.
| Record | Scope | Retained evidence |
|---|
| C3 | TestDoctorConfiguration runs seven installed-binary cases: defaults, configured paths, absent/different source binary, missing/invalid pins, and an empty rc path. | Under out/unify-release-versioning/portability/after-artifacts/cli/test.outputs/, seven doctor-*.json files retain arguments, streams, and exit status. |
| R2 | TestDeliveryInspectionUsesSelectedBase covers an explicit release base and the base from an existing PR, first with unrelated trunk advancement and then with selected-base advancement. | Under out/unify-release-versioning/portability/after-artifacts/delivery/test.outputs/, selected-base-{false,true}.json and selected-base-advanced-{false,true}.json retain the four reports. |
Failing-before evidence remains under the sibling before-artifacts/ directory.
No live forge, credential provider, or release destination was used for these
checks. All document coverage remains drafted.
Separate website-operation fixtures
The later W1 release and CLI package pass exercised the nested
al release website extract and activate commands. TestReleaseObservationCLI
checks each offline dry run with unusable transport executables and a nonexistent
identity path, verifies unchanged destination trees, and rejects a requested
receipt without creating it. TestLifecycleCLI checks the retired step selector
and archive flags on commands that do not own them.
Evidence is retained under
out/unify-release-versioning/api-naming/website-evidence/:
observation-01-plan.json records upload-only planning;
observation-02-extract.json and observation-03-activate.json record the two
website previews; al-retired-invocations.json records unsupported inputs.
manifest.json identifies the commands, passing validation scope, and evidence
hashes. The separate real loopback OpenSSH/rsync sync fixture also passed;
sync-receipt.json retains its filesystem observations and named checks.
The pass is scripted and isolated. It does not establish a live-destination or
manual-terminal pass. O1 and the original history-export observation retain their
historical scope; they are not rewritten as observations of these new commands.
Ordinary Bazel release-build fixtures
The B1 ordinary-Bazel pass retains evidence under
out/unify-release-versioning/api-naming/. plain-bazel-root-help.txt shows the
six command families present before affected-test selection was added.
plain-release-consumer/result.json records a
real tagged Git consumer built with bazel build --config=release :bundle, its
version/commit identity, and independently verified payload hash. The associated
dirty build fails, and restoring the source reproduces the manifest. A separate
missing-al-build.log records a real Bazel workspace-status failure with
installation guidance when AL is absent. These are local scripted checks;
they do not publish artifacts or exercise credential services.
Explicit release creation and checkout fixtures
The C1 pass uses the installed CLI in a real local Git fixture.
out/unify-release-versioning/api-naming/release-create-evidence/release-creation.json
records both refs at the original trunk commit and unchanged HEAD after
al release create, dry-run ref preservation, and dirty/occupied-ref refusals.
The same fixture checks out the release with ordinary Git, verifies stamped
release identity, and creates its next patch tag. The fixture date is
2026-08-30 (release 2026.35), rather than the example date in the checklist.
release-create-evidence/manifest.json records current command help and
rejection of the retired command, switching option, and nonexistent AL checkout.
release-create-consumer/result.json records the separate plain-Bazel build
following creation and Git checkout, with verified payload bytes and clean
recovery after the dirty-build refusal. These are isolated scripted observations;
no remote release or website was published.
Git-only source-publication fixtures
The D1 source-snapshot pass exercises preparation, publication, and
verification without a check-plan or result ledger. Under
out/unify-release-versioning/api-naming/, source-publication.json records
equal prepared, published, and remote heads with verified publication.
publication-review-recovery.json records an initial
publication_verification_pending report followed by successful verification
of the same published head and PR after the read failure clears.
These are isolated Git/forge fixtures from
TestDeliveryPreparePublishVerify and
TestPublicationRetainsEvidenceAfterReviewFailure. They do not prove that an
operator ran sufficient ordinary Bazel checks or exercise a live forge.
These observations remain separate from the earlier API’s dated records;
the delivery feature
identifies the implementation described.
Affected-test selection with real Bazel
The B2 scripted pass uses the task-local CLI and an isolated Git repository
with a real Bazel 9.3.1 graph. Under
out/unify-release-versioning/api-naming/, affected-real-results.json records
nine cases: transitive selection, manual wildcard suites, explicitly named
suites and tests, selected execution, configuration changes, deletion, unmapped
files, and unchanged source. The transitive case selects one dependent test and
excludes its unrelated neighbor. affected-real-test-target.txt identifies the
selected executable’s retained test output. The not-manual tag remains eligible.
affected-bazel-run-selection.json separately records a successful selector
invocation through the ordinary bazel run entry point.
affected-bazel-tests.json records 23 CLI scenarios using real Git and an
instrumented Bazel boundary, including partial-query refusal, test failure,
cancellation, local change collection, and manual-suite selection.
These observations establish selection and execution for the fixture, not a
performance measurement or coverage of every repository workspace. The initial
XML-output compatibility failure is retained in affected-real-selection.log;
the final command uses Bazel-native filtering and label output.
Not checkable by hand
An observation cannot prove the absence of every race or crash window. Source
inspection and adversarial fixtures are required for atomicity, exact lease
checks, unsafe path rejection, and cleanup guarantees. A passing isolated fixture
does not establish behavior under every filesystem, service, or concurrent edit.
3.2.10.1 - Verification: configuration, command execution, and diagnostics
This checklist records the documentation baseline
and its earlier scripted runs. The configuration cases retain the original Lua
fixtures, IDs, and results. To examine configuration after the migration to
declarative files, use Inspect configuration
and its source revision. The verification protocol describes how
to record a new pass. All three feature documents remain drafted.
Fixture conventions
- AL: the source-built installed executable, selected by its absolute path.
Run each case with a fresh directory under ignored
out/<task>/<case>. - Clean environment: preserve only
PATH pointing to private fixture
executables followed by /usr/bin:/bin, LANG=C.UTF-8, a task-private
TMPDIR, and explicitly named fixture variables. Do not inherit credentials. - R: the same setup with
RUNFILES_DIR pointing to an empty case-local
directory. C1 used this setup to exercise execution beyond the original B-01;
it does not substitute for the separate binary-only installed cases. - Merge inputs:
first.json contains a plugin named first with a
nonexistent executable and label fixture=first; second.yaml contains a
plugin named second; third.lua calls config with a plugin named third.
Do not select these plugins for execution. - Gate configuration: a trusted case-local Lua file writes a
ready marker,
then loops until a case-local continue file exists, then calls config({}).
Use this only to interrupt setup or change a later input before it is loaded.
Bound every experiment to 20 seconds and signal only its recorded process ID. - Waiting child: a case-local Python program writes
ready, registers a
SIGTERM handler that writes stopped and exits, then waits. A separate variant
deliberately ignores SIGTERM. No child contacts a service or reads real secrets. - Bazel fixture: a private executable named
bazel records whether it was
invoked. Put its directory first on PATH to check doctor path resolution and
that diagnostic reporting does not launch Bazel. No real build is needed. - Doctor workspace: use a case-local
.bazeliskrc with the repository’s
declared pin fields when testing failures or changes. Ordinary observations
can read the repository workspace. Never alter its actual pin file. - Controlled doctor read: use a FIFO named
.bazeliskrc only inside a
disposable doctor workspace. Its local writer opens the FIFO, records
readiness, waits for a case-local gate, then writes the pin fields and closes
it. Record both process IDs; terminate only these fixture processes afterward. - TTY: observe a foreground command in a disposable terminal. For hangup,
close only that terminal and inspect case-local files from another terminal.
Broken-pipe and forced-kill cases use a local parent process and its recorded
children; do not signal unrelated processes.
- Timing: if an invocation finishes before an intended interrupt, mark that
case
blocked or retry with a newly recorded controlled fixture. A signal sent
after completion is not evidence that interruption was exercised. - Failure injection: use a disposable unprivileged fixture account or an
already available isolated filesystem for inaccessible/full-file cases.
If unavailable, record
blocked; never fill or remount a host filesystem. - Plugin fixture: the repository’s existing synthetic injector scenario in
tools/al/test/command/command_test.go; no live Vault or real credentials.
The first scripted record is C1, observed on 2026-11-02 at 11:14:50 UTC:
out/unify-release-versioning/rebase-description/observations-agent/run-20261102T111450282581Z/observations.json.
It retains exact arguments, environment, stdout, stderr, exit status, and selected
file contents/modes for 15 invocations. Its binary was built at 3161f1c; the
described command, configuration, plugin, and lifetime sources had no differences
at 4a10748. The record includes the full binary digest. Results below identify
C1’s stable observation IDs. A repeated observation uses fresh case paths and a
new record; do not replace C1. C1 results below are historical observations of
that baseline, not a rerun against the refreshed source snapshot.
The later C2 fixture pass on 2026-11-02 covers the 13 cases in
cmd/al/run_e2e_test.go: TestRunStandaloneCLI, TestRunStreamFiles, and
TestRunPluginEnvironment. It copies the built AL into isolated installation
directories and uses synthetic child/plugin executables. Artifacts are retained
at projects/al/out/unify-release-versioning/run-fixes/after-artifacts/observations/
from the repository root. Each JSON filename is the test/subcase name with /
replaced by _; it records exit status, streams, child/plugin markers, and file
contents/modes. Failing-before artifacts remain in the sibling before-artifacts/
directory. C2 is automated evidence and does not change coverage to verified.
This directory was relocated from tools/rules_al/out/ with the AL project;
the artifacts still describe the original run, not a post-move rerun.
The post-move C3 pass covers the seven TestDoctorConfiguration cases.
Its current input paths, results, and scope are recorded in the
verification protocol.
It supplements the earlier observations without replacing them.
Inspect configuration
| ID | P | Needs | Claim | Setup | Steps | Expected | Result |
|---|
| CFG-01 | P1 | AL | No input files produce an empty representation (simple case). | Clean environment; no configuration flags. | 1. Run AL config dump. 2. Capture stdout and status. | Exit 0; stdout is exactly {} plus newline. | Scripted pass, C1 config-empty. |
| CFG-02 | P1 | AL | Repeated configuration flags preserve list-entry order (begins running). | Merge inputs. | 1. Run dump with -c first.json -c second.yaml -c third.lua. 2. Read plugin names from JSON. | Names are first, second, third in that order. | Scripted pass, C1 config-merge. |
| CFG-03 | P2 | AL | The representation is indented JSON (modifiers). | Merge inputs. | 1. Run the CFG-02 invocation. 2. Inspect captured stdout. | Parseable multiline JSON with indented entries. | Scripted pass, C1 config-merge. |
| CFG-04 | P1 | AL | File output truncates previous contents (finishes). | Existing output containing repeated previous synthetic contents; empty configuration. | 1. Run AL config dump -o OUTPUT. 2. Read the complete file. | File is exactly {} plus newline. | Scripted pass, C1 config-output-private-truncated. |
| CFG-05 | P1 | AL | File output restricts an existing file to mode 0600 (finishes). | Existing output mode 0644. | 1. Run CFG-04. 2. Inspect permission bits. | Permission bits are 0600. | Scripted pass, C1 config-output-private-truncated. |
| CFG-06 | P2 | AL | Selecting a file leaves stdout empty (modifiers). | Existing writable output; empty configuration. | 1. Run dump with -o OUTPUT. 2. Capture stdout. | Stdout is empty. | Scripted pass, C1 config-output-private-truncated. |
| CFG-07 | P1 | AL | Invalid values are omitted from diagnostics (exits immediately). | JSON with vault_auth containing string synthetic-private-marker as no_auth. | 1. Dump the invalid file. 2. Search captured diagnostic for the marker. | Nonzero status; diagnostic excludes the marker. | Scripted pass, C1 config-invalid-redacted. |
| CFG-08 | P2 | AL | Configuration errors use stderr (modifiers). | Same invalid JSON as CFG-07. | 1. Capture both streams separately. 2. Run dump. | Stdout is empty; the error is on stderr. | Scripted pass, C1 config-invalid-redacted. |
| CFG-09 | P2 | AL | Only explicitly selected files are loaded (modifiers). | Put invalid al.lua in the case directory. | 1. Run AL config dump there without --config. 2. Read output. | Empty JSON succeeds; the unselected file has no effect. | — |
| CFG-10 | P2 | AL | Trusted Lua can include an environment-derived value (modifiers). | Lua contributes a plugin name from synthetic AL_FIXTURE_NAME=from-environment. | 1. Select only that Lua file. 2. Inspect the dump. | The synthetic value appears as the plugin name. | — |
| CFG-11 | P2 | AL | Declarative inspection needs no TTY or stdin (modifiers). | Empty configuration; stdin closed; captured output pipes. | 1. Run AL config dump without a terminal. 2. Capture result. | Empty JSON succeeds. | — |
| CFG-12 | P2 | TTY, gate | Cancellation can stop configuration loading before output work (interrupts). | Gate configuration followed by another file; output initially absent. | 1. Wait for ready. 2. Press Ctrl+C once. 3. Inspect output and status. | Cancellation is reported; no complete dump is claimed. | — |
| CFG-13 | P2 | TTY, gate | A second Ctrl+C has no guaranteed force-kill meaning (interrupts). | Same gate setup; a separate invocation for this row. | 1. Wait for ready. 2. Press Ctrl+C twice. 3. Record exit and output state. | Record behavior; do not infer a universal second-signal escalation. | — |
| CFG-14 | P2 | AL, gate | SIGTERM cancels before a later configuration load (interrupts). | Gate first, synthetic second input, absent output. | 1. Wait for ready. 2. Send SIGTERM to AL. 3. Inspect result. | No completed merged dump is reported. | — |
| CFG-15 | P1 | AL, controlled writer | Cancellation does not promise restoration of truncated output (interrupts). | Large synthetic dump and preexisting output; watch for its truncation. | 1. Start dump. 2. Send SIGTERM after output changes. 3. Inspect all retained bytes. | Record resulting bytes; no restoration guarantee is assumed. | — |
| CFG-16 | P2 | TTY, gate | Hangup has no setup recovery protocol (interrupts). | Gate setup in disposable terminal. | 1. Wait for ready. 2. Close terminal. 3. Inspect process and output. | Record termination and residue; no successful dump is implied. | — |
| CFG-17 | P2 | TTY, controlled writer | Hangup can leave incomplete output (interrupts). | Large synthetic dump to a file; disposable terminal. | 1. Close terminal after output begins. 2. Inspect file completeness. | Record retained bytes; a partial file is not treated as success. | — |
| CFG-18 | P2 | AL | Closing stdin does not remove named declarative inputs (interrupts). | Valid JSON file; closed stdin. | 1. Run dump selecting the file. 2. Parse output. | Input is read from its path and succeeds. | — |
| CFG-19 | P2 | AL, pipe | A closed output pipe need not contain a complete dump (interrupts). | Large synthetic configuration; reader closes after first bytes. | 1. Start dump into the controlled reader. 2. Close reader. 3. Capture process status separately. | Record failure/termination and partial stream; no complete JSON guarantee. | — |
| CFG-20 | P2 | AL, offline fixture | Local declarative loading needs no network before work (interrupts). | Valid local JSON/YAML; already isolated offline environment. | 1. Run dump with network unavailable. 2. Parse output. | Local inputs succeed. | — |
| CFG-21 | P2 | AL, gate | Local declarative inputs remain independent of network during work (interrupts). | Gate followed by local JSON; no Lua network activity. | 1. Wait at gate in isolated offline environment. 2. Create continue. 3. Parse output. | Local merged representation succeeds. | — |
| CFG-22 | P1 | AL | Missing input fails before output replacement (interrupts). | Missing selected configuration; output containing preserve. | 1. Run dump to that output. 2. Read the file. | Error; existing output remains preserve. | — |
| CFG-23 | P1 | AL, failure injection | Output failure can leave changed contents (interrupts). | Synthetic large dump and isolated limited output storage. | 1. Start writing. 2. Trigger the isolated limit. 3. Inspect status and file. | Write fails; record any partial content. | — |
| CFG-24 | P2 | AL, gate | Inputs are read as their turn arrives (interrupts). | Gate first, second file naming plugin old. | 1. Wait for ready. 2. Change second file to new. 3. Open gate. | Later file contributes new. | — |
| CFG-25 | P2 | AL, controlled input | Concurrent source editing has no whole-input snapshot guarantee (interrupts). | Large synthetic configuration and a writer confined to that file. | 1. Start dump. 2. Change the input while read is active. 3. Record output or error. | Record observation; no atomic snapshot is assumed. | — |
| CFG-26 | P2 | AL | Independent invocations can use separate outputs (interrupts). | Two valid inputs and two absent output paths. | 1. Start both dumps. 2. Wait for both. 3. Parse both files. | Each contains its selected representation. | — |
| CFG-27 | P2 | AL | Shared output is not serialized by a documented lock (interrupts). | Two large different configurations; one disposable output. | 1. Start both dumps to that path. 2. Inspect results and file. | Record final content; do not require one atomic complete winner. | — |
| CFG-28 | P2 | AL, gate | Forced kill before output gives no completed dump (interrupts). | Gate and absent output. | 1. Wait for ready. 2. Send SIGKILL to AL. 3. Inspect output. | No successful completion is reported. | — |
| CFG-29 | P2 | AL, controlled writer | Forced kill may leave partial output (interrupts). | Large synthetic dump to fresh output. | 1. Send SIGKILL after writing starts. 2. Inspect retained content. | Record partial/full bytes; process termination is not a completion receipt. | — |
| CFG-30 | P2 | AL | Unsupported .yml suffix is refused (invoke). | Valid YAML saved as config.yml. | 1. Select it with --config. 2. Capture result. | Nonzero status identifying invalid extension. | — |
| CFG-31 | P2 | AL | Dumping does not reject duplicate plugin names (edge cases). | Two JSON files with the same plugin name. | 1. Dump both. 2. Count plugin entries. | Both entries remain in JSON. | — |
| CFG-32 | P2 | AL | Trusted Lua can print before the JSON representation (edge cases). | Lua file calls print("synthetic prefix"), then config({}). | 1. Dump that file. 2. Capture stdout. | Synthetic prefix precedes the JSON representation. | — |
Not checkable by hand:
- The absence of an output lock or a whole-input snapshot is a source-derived
boundary; individual race observations cannot prove every possible outcome.
- Historical Lua fixtures predate native-configuration-targets and no longer describe supported inputs. Their original effects needed a
separate review; this checklist covers only synthetic configuration programs.
Run a command with plugins
| ID | P | Needs | Claim | Setup | Steps | Expected | Result |
|---|
| RUN-01 | P1 | Installed AL | A child without selected plugins runs without runfiles (summary). | Clean environment; no adjacent or declared runfiles. | 1. Run the TestRunStandaloneCLI/plain installed fixture. 2. Inspect its child receipt and status. | Exit 0; the intended child runs. | Fixture pass, C2 TestRunStandaloneCLI/plain; C1 failure retained in B-01 history. |
| RUN-02 | P1 | R | A no-plugin child runs when explicit runfiles setup is available (while running). | R; no configuration or labels. | 1. Run AL run -- /usr/bin/printf 'synthetic child output'. 2. Capture stdout. | Exit 0; exact child text. | Scripted pass, C1 run-empty-runfiles-no-plugins. |
| RUN-03 | P1 | R | Positive child exit status is preserved (finishes). | R; Python child immediately exits 23. | 1. Run child through AL. 2. Inspect AL status. | Exit 23. | Scripted pass, C1 run-child-exit-code. |
| RUN-04 | P1 | R | Configuration alone selects no plugins (begins running). | R; first merge input names a nonexistent plugin executable. | 1. Run with --config first.json, no label, and a child printing no selected plugin. 2. Capture result. | Child succeeds; plugin executable is not needed. | Scripted pass, C1 run-unselected-plugin. |
| RUN-05 | P1 | Installed AL | Output overrides create missing files (output). | TestRunStreamFiles/existing-false; absent stdout/stderr paths. | 1. Run the fixture. 2. Read both output files. | Both files contain exactly their child stream bytes. | Fixture pass, C2 TestRunStreamFiles/existing-false; C1 refusal retained in B-02 history. |
| RUN-06 | P1 | Installed AL | Output overrides truncate old trailing bytes (modifiers). | TestRunStreamFiles/existing-true; both outputs contain longer old text. | 1. Run the fixture. 2. Read the complete output files. | Each contains only its new child stream bytes. | Fixture pass, C2 TestRunStreamFiles/existing-true; C1 stale bytes retained in B-02 history. |
| RUN-07 | P1 | Installed AL | Output overrides retain existing permissions (permissions). | C2 existing-output fixture; initial modes 0644. | 1. Run the fixture. 2. Inspect both retained output modes. | Existing stdout/stderr files remain 0644. | Fixture observation, C2 TestRunStreamFiles/existing-true; same boundary observed in C1. |
| RUN-08 | P2 | R | An input override supplies the child’s stdin (modifiers). | R; input file exactly synthetic input plus newline. | 1. Run /usr/bin/cat with --stdin INPUT. 2. Capture stdout. | Exact input bytes reach stdout. | Scripted pass, C1 run-stdin. |
| RUN-09 | P2 | R | Arguments after -- belong to the child (modifiers). | R; child prints its argument list. | 1. Pass --literal and two words after the separator. 2. Read list. | Arguments arrive unchanged and remain separate. | — |
| RUN-10 | P2 | Plugin fixture | Selected plugin startup is reported on stderr (modifiers). | Synthetic fixture; capture streams separately. | 1. Start its selected plugin and ordinary child. 2. Inspect stderr. | Startup messages identify the plugin. | — |
| RUN-11 | P1 | R | Inherited environment reaches the child (modifiers). | R plus synthetic AL_TEST_VALUE=example; child prints only that key. | 1. Run child through AL. 2. Read output. | Output is example. | — |
| RUN-12 | P1 | Plugin fixture | Plugin environment exports reach the child (modifiers). | Synthetic injector fixture exports only a case-local synthetic resource path. | 1. Run its consumer. 2. Check the consumer’s receipt. | Consumer reads the selected synthetic resource. | — |
| RUN-13 | P1 | Plugin fixture | Startup logging names exported keys without printing their returned values (modifiers). | Synthetic distinct export value; child deliberately prints nothing. | 1. Run fixture. 2. Search AL startup logs. | Key name appears; synthetic value does not. | — |
| RUN-14 | P2 | R, TTY | Ordinary streams are inherited (modifiers). | R; interactive echo child; no overrides. | 1. Type a synthetic line in the foreground. 2. Observe child output. | Child receives input and prints on the same terminal. | — |
| RUN-15 | P2 | R, gate | Cancellation during setup prevents a subsequent child launch (interrupts). | Gate configuration; child would write a separate launched marker. | 1. Wait for gate readiness. 2. Press Ctrl+C. 3. Inspect child marker. | Child launch is not completed. | — |
| RUN-16 | P1 | R, TTY | Ctrl+C requests shutdown without a defined second-press escalation (interrupts). | Waiting child; disposable terminal. | 1. Wait for child readiness. 2. Press Ctrl+C once, then repeat in a fresh case with two presses. 3. Record shutdown. | Record child/AL termination and cleanup; no universal escalation is assumed. | — |
| RUN-17 | P2 | R, gate | SIGTERM during setup prevents a later child launch (interrupts). | Gate configuration; child writes launched. | 1. Wait for gate readiness. 2. Send SIGTERM to AL. 3. Inspect marker. | Child does not reach its marker. | — |
| RUN-18 | P1 | Plugin fixture | Resources remain available while a cancelled child shuts down (interrupts). | Existing synthetic injector cancellation fixture. | 1. Start the fixture’s cancellation scenario. 2. Wait for readiness. 3. Request cancellation and inspect stopped evidence. | Child confirms access to its synthetic file during shutdown. | — |
| RUN-19 | P2 | R, TTY, gate | Setup hangup has no AL cleanup guarantee (interrupts). | Gate configuration in disposable terminal. | 1. Wait for readiness. 2. Close terminal. 3. Inspect processes and files. | Record residue; no child completion is inferred. | — |
| RUN-20 | P2 | R, TTY | Hangup during execution requires state inspection (interrupts). | Waiting child in disposable terminal. | 1. Wait for child readiness. 2. Close terminal. 3. Inspect only recorded child/process state. | Record termination and remaining resources; no cleanup guarantee is assumed. | — |
| RUN-21 | P2 | R | Default streams can be pipes at invocation (interrupts). | R; finite synthetic stdin pipe to cat. | 1. Run cat through AL. 2. Close input after one line. 3. Read output and status. | Child sees its input and EOF, then exits normally. | — |
| RUN-22 | P2 | R, pipe | Output pipe closure is handled by the child before AL cleanup (interrupts). | Child writes repeatedly to a controlled reader. | 1. Start child through AL. 2. Close reader after first bytes. 3. Record child and AL completion. | Record child stream failure; prior writes are not undone. | — |
| RUN-23 | P2 | Plugin fixture | A failed network-dependent startup prevents the child (interrupts). | Synthetic plugin fixture configured to fail startup without contacting a live service. | 1. Start selected plugin with a marker-writing child. 2. Inspect status and marker. | Nonzero status; child marker absent. | — |
| RUN-24 | P2 | Local service fixture | Network loss during execution follows the selected child’s policy (interrupts). | Synthetic child using only a disposable loopback service. | 1. Wait for child readiness. 2. Stop its service. 3. Record child failure and AL cleanup. | Record child/service behavior; no AL-wide network retry is assumed. | — |
| RUN-25 | P1 | R | Inaccessible required stream prevents child startup (interrupts). | Missing stdout override; marker-writing child. | 1. Invoke run. 2. Inspect status and marker. | Failure before child marker exists. | — |
| RUN-26 | P2 | R, failure injection | Child write failure does not undo earlier writes (interrupts). | Child writes a marker, then writes into isolated limited storage. | 1. Run child. 2. Trigger fixture storage limit. 3. Inspect marker. | Earlier marker remains after failure. | — |
| RUN-27 | P2 | R, gate | Setup checks later inputs when reached (interrupts). | Gate configuration followed by another selected file. | 1. Wait at gate. 2. Remove later file. 3. Open gate. | Setup fails before child execution. | — |
| RUN-28 | P2 | R | Changing a file during child execution does not restore its old contents (interrupts). | Waiting child; independent case-local file containing old. | 1. Wait for child readiness. 2. Replace file with new. 3. Stop child. | File remains new. | — |
| RUN-29 | P2 | R | Independent invocations can prepare separate outputs (interrupts). | Two children with separate case-local marker paths. | 1. Start both through AL. 2. Wait for both markers. | Both independent children run. | — |
| RUN-30 | P2 | R | Shared output is not protected by a command-wide lock (interrupts). | Two output-writing children; one disposable existing file. | 1. Run both with the same stdout override. 2. Inspect file and statuses. | Record interleaving/final bytes; no serialization guarantee is assumed. | — |
| RUN-31 | P2 | R, gate | Forced kill during setup gives no completed child execution (interrupts). | Gate and marker-writing child. | 1. Wait at gate. 2. Send SIGKILL to AL. 3. Inspect child marker. | No successful child completion is reported. | — |
| RUN-32 | P1 | R | Forced kill can leave a child running (interrupts). | Waiting child; retain its PID and AL PID. | 1. Send SIGKILL only to AL. 2. Inspect child. 3. Stop only the recorded fixture child afterward. | Record survival/residue; do not infer cleanup from AL termination. | — |
| RUN-33 | P1 | R | Duplicate plugin names fail even without selected labels (configuration). | R; configuration contains two plugins with one name. | 1. Run with no labels and a marker-writing child. 2. Inspect status. | Duplicate-name error prevents child. | — |
| RUN-34 | P2 | Plugin fixture | Bare label key matches any configured value (edge cases). | Synthetic plugin labelled fixture=selected. | 1. Invoke with --plugin_label fixture. 2. Inspect startup evidence. | Plugin is selected. | — |
| RUN-35 | P2 | Plugin fixture | Any matching selector is sufficient (begins running). | Synthetic plugin labelled fixture=selected. | 1. Supply fixture=selected and another nonmatching key. 2. Inspect startup. | Matching plugin starts. | — |
| RUN-36 | P2 | Plugin fixture | A selected call starts its owning plugin (edge cases). | Plugin’s own labels do not match; its call label does. | 1. Select the call label. 2. Inspect plugin/call evidence. | Owning plugin starts for the call. | — |
| RUN-37 | P1 | Plugin fixture | Startup failure rolls back partially initialized resources (begins running). | Existing injector startup-failure scenario. | 1. Run that scenario. 2. Inspect consumer marker and synthetic file directory. | Child never runs; synthetic resources are cleaned up. | — |
| RUN-38 | P1 | Plugin fixture | Ordinary completion removes synthetic plugin resources (finishes). | Existing injector success scenario. | 1. Run its consumer. 2. Wait for AL return. 3. Inspect its synthetic resource directory. | Synthetic resource files are absent. | — |
| RUN-39 | P1 | Plugin collision fixture | Different selected exports for one key prevent child launch (begins running). | C2 conflict and conflict-reversed cases. | 1. Run both cases. 2. Inspect status and child marker absence. | Nonzero status; the child never writes its receipt. | Fixture pass, C2 TestRunPluginEnvironment/conflict and conflict-reversed. |
| RUN-40 | P1 | Plugin fixture | Equal selected exports for one key are accepted (edge cases). | C2 equal-export case, including an unselected conflicting plugin. | 1. Run TestRunPluginEnvironment/equal. 2. Inspect the child receipt. | The child receives the shared selected value. | Fixture pass, C2 TestRunPluginEnvironment/equal. |
| RUN-41 | P1 | Installed AL | An absolute selected plugin path needs no runfiles (invoke). | C2 absolute-plugin case; no runfiles context. | 1. Run TestRunStandaloneCLI/absolute-plugin. 2. Inspect plugin and child receipts. | The selected plugin starts and the child runs successfully. | Fixture pass, C2 TestRunStandaloneCLI/absolute-plugin. |
| RUN-42 | P1 | Installed AL | A relative selected plugin identifier requires runfiles (invoke). | C2 relative-plugin case; no runfiles context. | 1. Run TestRunStandaloneCLI/relative-plugin. 2. Inspect status and child marker. | The command fails before child launch. | Fixture pass, C2 TestRunStandaloneCLI/relative-plugin. |
| RUN-43 | P1 | Installed AL | Invalid declared runfiles remain setup errors (invoke). | C2 invalid-manifest and invalid-directory cases. | 1. Run both cases. 2. Inspect status and child marker absence. | Both commands fail before child launch. | Fixture pass, C2 TestRunStandaloneCLI/invalid-manifest and invalid-directory. |
| RUN-44 | P1 | Installed AL | A valid runfiles context resolves a relative selected plugin (invoke). | C2 relative-plugin-with-runfiles case. | 1. Run the case. 2. Inspect child and plugin receipts. | The plugin and child run successfully with the declared context. | Fixture pass, C2 TestRunStandaloneCLI/relative-plugin-with-runfiles. |
| RUN-45 | P2 | Installed AL | Adjacent runfiles are propagated to the child (invoke). | C2 adjacent-runfiles case. | 1. Run the case. 2. Inspect the child context receipt. | The child receives the discovered runfiles directory. | Fixture pass, C2 TestRunStandaloneCLI/adjacent-runfiles. |
| RUN-46 | P1 | Installed AL | New output files have private permissions (permissions). | C2 missing-output fixture with its ordinary permission mask. | 1. Run TestRunStreamFiles/existing-false. 2. Inspect both output modes. | Both new output files have mode 0600. | Fixture pass, C2 TestRunStreamFiles/existing-false. |
| RUN-47 | P1 | Plugin fixture | Selected exports can override inherited values (begins running). | C2 equal-export case; inherited synthetic value differs. | 1. Run the case. 2. Inspect the child receipt. | The selected export replaces the inherited value. | Fixture pass, C2 TestRunPluginEnvironment/equal. |
| RUN-48 | P1 | Plugin collision fixture | Conflict diagnostics use stable plugin ordering (begins running). | C2 conflict and conflict-reversed cases. | 1. Run both declaration orders. 2. Compare the conflict diagnostic. | Both name the same key and plugins in the same order. | Fixture pass, C2 TestRunPluginEnvironment/conflict and conflict-reversed. |
| RUN-49 | P1 | Plugin fixture | Export diagnostics omit returned values (begins running). | All three C2 environment cases; synthetic values known to the fixture. | 1. Run the cases. 2. Search captured stdout/stderr for those values. | Returned values are absent from the captured diagnostics. | Fixture pass, C2 TestRunPluginEnvironment. |
| RUN-50 | P1 | Plugin collision fixture | Started plugins clean up after an export conflict (begins running). | Both C2 conflict cases with startup/shutdown markers. | 1. Run each case. 2. Inspect both plugins’ retained markers. | Both plugins record startup and shutdown even though the child is refused. | Fixture pass, C2 TestRunPluginEnvironment/conflict and conflict-reversed. |
| RUN-51 | P1 | Installed AL | A later setup failure does not restore truncated output (output). | Existing nonempty output; selected relative plugin without runfiles. | 1. Run with that stdout override and plugin selection. 2. Inspect status and file. | The child is refused; the output file remains truncated. | — |
Not checkable by hand:
- Best-effort cleanup cannot promise secure erasure or recovery from every host
failure; consult the owning lifecycle reference instead of extrapolating from
successful fixture cleanup.
Select affected tests
The selector cases use TestAffectedBazelCLI and its
affected-bazel-tests.json artifact where named below. That fixture runs real
Git and AL against an instrumented Bazel process. It checks selection inputs,
fallback decisions, output, and invocation boundaries; a separate real Bazel
graph verifies dependency selection. B2 records the scripted fixture results;
unperformed cases remain unmarked.
| ID | P | Needs | Claim | Setup | Steps | Expected | Result |
|---|
| BAZ-41 | P1 | Installed AL fixture | The selector requires a valid explicit base (invoke). | Fresh Git/workspace fixture; missing, nonexistent, and option-shaped base values. | 1. Run the selector for each invalid input. 2. Inspect exit, stdout, and Bazel calls. | Failure before tests; no successful selection report. | — |
| BAZ-42 | P1 | Real Git and Bazel fixture | Reverse dependencies select affected tests within the requested scope (begins running). | Two independent tests; one depends transitively on an edited source; clean comparison base. | 1. Edit the transitive input. 2. Run dry run and inspect tests. 3. Run the selected tests. | Dependent test selected; unrelated test excluded; ordinary Bazel executes the selected set. | Scripted pass, B2 real transitive graph and selected executable artifact. |
| BAZ-43 | P1 | Installed AL fixture | Changed paths include committed, staged, working-tree, and nonignored untracked changes (invoke). | TestAffectedBazelCLI committed, staged_reverted, source, untracked, and spaces cases. | 1. Run the cases. 2. Read changed_paths and invocation evidence. | Git-root-relative paths retain staged changes and names with spaces; untracked input cannot silently disappear. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-44 | P1 | Installed AL fixture | Uncertain mapping widens to the full requested scope (begins running). | TestAffectedBazelCLI deleted, renamed, build_file, bzl_file, untracked, outside_workspace, and external_scope cases. | 1. Run the cases. 2. Inspect selection, reasons, and tests. | full_scope reports explain the fallback and include the scoped independent test. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-45 | P1 | Real Git and Bazel fixture | Workspace and absolute target patterns bound selection (invoke). | Repository with two Bazel workspaces and distinct test scopes. | 1. Select one with –workspace and a scoped pattern. 2. Inspect workspace, scope, and tests. 3. Repeat from a subdirectory without –workspace. | Explicit selection and nearest-workspace discovery choose the intended workspace; tests do not expand outside the requested scope. | — |
| BAZ-46 | P1 | Installed AL fixture | Dry run reports selection without testing (while running). | TestAffectedBazelCLI dry_run case. | 1. Run the case. 2. Inspect JSON and recorded Bazel calls. | One JSON report with dry_run true; queries may run, but bazel test does not. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-47 | P1 | Installed AL fixture | Failed queries cannot supply partial accepted labels (exits immediately). | TestAffectedBazelCLI query_failure case prints partial query output before failing. | 1. Run the case. 2. Inspect stdout, status, and calls. | Nonzero result, no selection JSON, and no test invocation. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-48 | P1 | Installed AL fixture | Empty comparisons and selections skip tests (finishes). | TestAffectedBazelCLI unchanged and no_tests cases. | 1. Run both cases. 2. Inspect selection and calls. | unchanged reports no_changes without any Bazel call; an empty test list succeeds without bazel test. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-49 | P1 | Installed AL fixture and real Bazel workspace | Manual tags follow Bazel root selection and suite expansion (begins running). | TestAffectedBazelCLI manual_explicit, manual_suite_wildcard, manual_suite_explicit, and similar_manual_tag cases; repeat with real Bazel. | 1. Compare wildcard and exact test/suite scopes. 2. Inspect selected tests and test argv. 3. Include a manual-tagged suite member and similar tag names. | Wildcards exclude roots tagged exactly manual before suite expansion. Explicit tests/suites and members of eligible suites remain eligible; similar tag names are not manual. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-50 | P1 | Installed AL fixture | Selection JSON does not imply test success (finishes). | TestAffectedBazelCLI test_failure case. | 1. Run the case. 2. Parse stdout and inspect stderr/status. | Selection JSON remains on stdout; failed test output uses stderr and the command returns nonzero. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
| BAZ-51 | P1 | Installed AL fixture | Cancellation stops the active selection client without claiming completion (interrupts). | TestAffectedBazelCLI cancellation case with a waiting query helper. | 1. Wait for the fixture checkpoint. 2. Send SIGTERM through the fixture. 3. Inspect result and calls. | The client is cancelled, no selection success is emitted, and tests do not start. | Fixture pass, B2 affected-bazel-tests.json; real graph supplements selection cases. |
Inspect local diagnostics
BAZ-01–04, BAZ-08–09, BAZ-12, BAZ-14, BAZ-16, BAZ-18, BAZ-27, and BAZ-30
are retired with the removed Bazel forwarding command. Their IDs remain reserved;
C1’s forwarding records remain historical evidence, not checks of the current CLI.
| ID | P | Needs | Claim | Setup | Steps | Expected | Result |
|---|
| BAZ-05 | P1 | AL, doctor workspace | Doctor recognizes a task/run scratch path (simple case). | Valid workspace; scratch below out/task/run. | 1. Run doctor with both explicit paths. 2. Read scratch.namespaced. | Field is true. | Scripted pass, C1 doctor-namespaced. |
| BAZ-06 | P1 | AL, doctor workspace | Bare out is a conflicting scratch classification (finishes). | Valid workspace; select --task-scratch out. | 1. Run doctor. 2. Read scratch fields. | namespaced:false, reason:"conflict". | Scripted pass, C1 doctor-shared-scratch. |
| BAZ-07 | P1 | AL, doctor workspace | A conflicting scratch classification still exits zero (finishes). | Same setup as BAZ-06. | 1. Run doctor. 2. Capture status. | Exit 0. | Scripted pass, C1 doctor-shared-scratch. |
| BAZ-10 | P1 | AL, doctor workspace | Doctor reports declared configuration without exposing environment values (modifiers). | Synthetic AL_PRIVATE_MARKER; valid pin file. | 1. Run doctor. 2. Inspect rc fields and search output for marker. | Declared rc names are present; environment marker is absent. | — |
| BAZ-11 | P2 | AL, doctor workspace | Doctor needs no TTY (modifiers). | Valid workspace; closed stdin and captured stdout. | 1. Run doctor without terminal. 2. Parse stdout. | JSON report succeeds. | Scripted pass, C1 doctor-namespaced. |
| BAZ-13 | P2 | AL, controlled reader | Cancellation during a diagnostic read gives no prompt-stop guarantee (interrupts). | Doctor fixture with a controlled slow required-file read. | 1. Start report. 2. Send SIGINT before read finishes. 3. Release reader. | Record exit and report; do not assume immediate stop. | — |
| BAZ-15 | P2 | AL, controlled reader | SIGTERM before a complete diagnostic gives no completed-report claim (interrupts). | Controlled doctor read. | 1. Start report. 2. Send SIGTERM during required read. 3. Inspect captured output. | Record report completion or interruption; no early success is inferred. | — |
| BAZ-17 | P2 | TTY, controlled reader | Setup hangup has no AL recovery protocol (interrupts). | Controlled doctor read in disposable terminal. | 1. Start report. 2. Close terminal before read finishes. 3. Inspect process/output. | Record incomplete or completed observation; no recovery step is performed. | — |
| BAZ-19 | P2 | AL, doctor workspace | Doctor does not consume stdin (interrupts). | Valid workspace; stdin contains arbitrary synthetic text then closes. | 1. Run doctor. 2. Parse stdout. | Report is independent of stdin contents. | — |
| BAZ-20 | P2 | AL, closed pipe | Closed stdout can prevent complete doctor JSON (interrupts). | Parent closes report reader before completion. | 1. Run doctor into controlled pipe. 2. Close reader. 3. Record status/captured bytes. | No complete-output guarantee; record failure or termination. | — |
| BAZ-21 | P2 | AL, offline fixture | Doctor can begin from local inputs without network (interrupts). | Valid local workspace in already isolated offline environment. | 1. Run doctor. 2. Parse report. | Local report succeeds. | — |
| BAZ-22 | P2 | AL, controlled reader | Network loss does not create a doctor recovery step (interrupts). | Controlled local doctor read; isolated network already unavailable. | 1. Release the local read. 2. Inspect report. | Local report completes without service access. | — |
| BAZ-23 | P1 | AL, doctor workspace | Unreadable required pin input prevents a report (interrupts). | TestDoctorConfiguration/pins-missing and pins-invalid with a selected nondefault pin path. | 1. Run both fixture cases. 2. Capture streams and status. | Nonzero status and required-pin diagnostic; stdout contains no JSON report. | Fixture pass, C3 doctor-pins-missing.json and doctor-pins-invalid.json. |
| BAZ-24 | P2 | AL, failure injection | Doctor output failure can prevent a complete report (interrupts). | Report redirected to isolated limited fixture storage. | 1. Run doctor. 2. Trigger local output limit. 3. Inspect status/file. | Record incomplete output or write failure. | — |
| BAZ-25 | P2 | AL, two fixtures | Current PATH determines the executable at setup (interrupts). | Different private fixture first for each invocation. | 1. Run doctor separately with each PATH. 2. Compare bazel.executable. | Field follows selected PATH. | — |
| BAZ-26 | P2 | AL, controlled inputs | Doctor has no whole-file-set snapshot guarantee (interrupts). | Case-local pins and built-binary fixture can change independently. | 1. Run report while changing only fixture inputs. 2. Record field combinations or errors. | Record observations without assuming a common instant. | — |
| BAZ-28 | P2 | AL, doctor workspace | Doctor has no shared mutable report file (interrupts). | Valid workspace; two separately captured stdout streams. | 1. Run two doctor invocations. 2. Parse both captures. | Both reports are independently readable. | — |
| BAZ-29 | P2 | AL, controlled reader | Forced kill before report completion gives no completed observation (interrupts). | Controlled doctor read. | 1. Start report. 2. Send SIGKILL before read completes. 3. Inspect output. | No successful report completion is claimed. | — |
| BAZ-31 | P1 | AL, doctor workspace | A missing selected built binary means comparison unavailable (edge cases). | TestDoctorConfiguration/defaults and source-missing; absent default or explicitly selected comparison file. | 1. Run doctor. 2. Read source. | reason:"unavailable"; no current-install conclusion. | Fixture pass, C3 doctor-defaults.json and doctor-source-missing.json; C1 default observation retained. |
| BAZ-32 | P1 | AL, doctor workspace | Declared pin is not the resolved program’s reported version (edge cases). | Fixture Bazel would print a different version marker if run; valid explicit pin. | 1. Run doctor. 2. Read bazel.version and inspect fixture invocation marker. | Declared pin is reported; fixture is not invoked. | — |
| BAZ-33 | P2 | AL, doctor workspace | Doctor does not create the selected scratch path (while running). | Valid workspace; absent path out/task/new-run. | 1. Run doctor selecting it. 2. Check path existence. | Path remains absent. | — |
| BAZ-34 | P2 | AL | Doctor help avoids report collection (exits immediately). | Workspace without pin file. | 1. Run AL doctor --help. 2. Capture output/status. | Usage succeeds despite missing workspace pins. | — |
| BAZ-35 | P1 | AL, doctor workspace | Missing Bazel on PATH prevents doctor reporting (exits immediately). | Invoke AL by absolute path; PATH contains only an empty private directory. | 1. Run doctor selecting valid workspace. 2. Capture result. | Failure identifying missing Bazel executable. | — |
| BAZ-36 | P1 | Installed AL fixture | A configured pin-file path resolves against the selected workspace (invoke). | TestDoctorConfiguration/configured; pin file under config/. | 1. Run the fixture with a relative –bazelisk-config value. 2. Inspect reported version and archive digest. | The values come from the selected pin file. | Fixture pass, C3 doctor-configured.json. |
| BAZ-37 | P1 | Installed AL fixture | The selected source binary controls the installed comparison (begins running). | TestDoctorConfiguration/configured and source-stale; equal and different copied binaries. | 1. Run both cases with relative –source-binary. 2. Inspect source.binary and staleInstall. | The binary path is absolute; equal bytes report false and different bytes true. | Fixture pass, C3 doctor-configured.json and doctor-source-stale.json. |
| BAZ-38 | P1 | Installed AL fixture | Configured rc entries replace the default inventory without requiring those files (begins running). | TestDoctorConfiguration/configured; two absent rc paths, one relative and one absolute. | 1. Run with repeated –rc-file. 2. Read rcFiles. | The two entries retain order and are reported relative to the workspace; absent files do not fail reporting. | Fixture pass, C3 doctor-configured.json. |
| BAZ-39 | P2 | Installed AL fixture | An explicitly empty rc path is refused (exits immediately). | TestDoctorConfiguration/rc-empty. | 1. Pass –rc-file with an empty value. 2. Capture both streams and status. | Nonzero status, no JSON report, and a nonempty-path diagnostic. | Fixture pass, C3 doctor-rc-empty.json. |
| BAZ-40 | P2 | Installed AL fixture | Default rc inventory contains only .bazelrc (invoke). | TestDoctorConfiguration/defaults; no –rc-file flags. | 1. Run the fixture. 2. Read rcFiles. | The list is exactly [.bazelrc], without invented repository-specific imports. | Fixture pass, C3 doctor-defaults.json. |
Not checkable by hand:
- The configured rc inventory is a declaration. A matching list in one report cannot
establish which files a real Bazel process will load.
- Bazel’s network, server coordination, build consistency, and cancellation
belong to its existing validation and operator procedures.
- Timing races between doctor reads do not establish a
universal timing guarantee. Record limitations rather than promoting a fast
successful sample to such a guarantee.
Source revision for this checklist is the AL documentation baseline.
3.2.10.2 - Verification: delivery
Use the verification protocol and the revision identified by the
delivery feature.
The rebase and selected-base rows cite the R1/R2 fixture passes in the protocol;
other results remain unrun for this documentation pass. Fixture observations are
automated evidence, not a manual production or interactive-terminal pass.
For a named test, run from the projects/al workspace with
bazel test //internal/delivery:go_test --test_arg=-test.run=^TEST_NAME$ --test_output=all, replacing TEST_NAME with the
exact name in the row. Keep the test log and any undeclared output artifact under
the pass evidence directory. Read the named fixture before running it so its
assertions, controlled environment, and coverage limits are clear. Do not infer
that a passing fixture exercised live GitHub timing.
Rows labeled instrumented fixture require a disposable Git/forge setup with
the stated pause or failure hook. Existing tests provide its reference behavior,
but these rows are blocked until that setup exists; do not substitute the real
repository or forge. TTY rows require a controlling terminal. No row authorizes
a live push, review comment, or credential change.
Delivery workflow
DEL-10, DEL-13–22, and DEL-26 describe retired target suggestions, structured
check plans, result ledgers, and combined validation/publication helpers. Their
IDs remain reserved; historical evidence does not verify the current workflow.
The ordinary-check workflow is covered by DEL-58–63 below.
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| DEL-01 | P1 | Local CLI | Provider output separates adapter and transport support (invoke). | Disposable repository with SSH origin identifying GitHub; no remote contact needed. | 1. Run al delivery --repository FIXTURE provider. 2. Parse stdout as JSON. | Adapter availability and SSH transport availability are separate fields. | — |
| DEL-02 | P1 | Local CLI | Provider output does not print endpoint URLs (invoke). | DEL-01 fixture with a known synthetic remote string. | 1. Capture provider stdout and stderr. 2. Search for the complete configured remote string. | The endpoint string is absent from the sanitized report. | — |
| DEL-03 | P1 | Local CLI | HTTPS does not silently become SSH (invoke). | Disposable repository with an HTTPS GitHub origin. | 1. Run provider. 2. Read its transport fields. 3. Read the configured remote afterward. | Delivery transport is unavailable and the remote remains HTTPS. | — |
| DEL-04 | P2 | Local CLI | Help does not prepare or publish a candidate (exits immediately). | Clean disposable repository; record HEAD and refs. | 1. Run al delivery prepare --help. 2. Compare HEAD and refs. | Help is printed; recorded Git state is unchanged. | — |
| DEL-05 | P1 | Existing fixture | Scope includes the complete existing feature diff (begins running). | TestPreparePathConstrainsExistingAggregateDiff. | 1. Run the named test. 2. Inspect its omitted-path refusal. | Preparation refuses a requested scope that excludes existing aggregate changes. | — |
| DEL-06 | P1 | Existing fixture | Explicit tracked deletions can be staged (begins running). | TestPrepareStagesExplicitTrackedDeletion. | 1. Run the named test. 2. Inspect the candidate tree assertion. | The explicitly owned deletion is included in the candidate. | — |
| DEL-07 | P1 | Existing fixture | Consolidation requires explicit exact-head selection (begins running). | TestPrepareRefusesMultiCommitRangeWithoutExactConsolidation. | 1. Run the named test. 2. Inspect the refusal cases. | An unselected or stale multi-commit replacement is refused. | — |
| DEL-08 | P1 | Existing fixture | An eligible explicitly selected range becomes one candidate (begins running). | TestPrepareConsolidatesExactOwnedLinearRange. | 1. Run the named test. 2. Inspect the resulting range assertions. | The prepared range is one aggregate commit preserving the owned content. | — |
| DEL-09 | P1 | Existing fixture | Index preparation freezes exact aggregate paths (begins running). | TestPreparedIndexReceiptFreezesExactAggregatePaths. | 1. Run the named test. 2. Inspect receipt scope assertions. | The receipt carries immutable exact aggregate paths. | — |
| DEL-11 | P1 | Existing fixture | Direct rebase preserves remote publication while updating the local candidate (begins running). | TestRebasePreservesRemoteUntilPublication, with an advanced base and both existing and absent remote feature refs. | 1. Run both subcases. 2. Compare local heads, remote refs, leases, and PR state. | Status is rebased, pushed is false, the new head includes base changes, and remote/PR state is unchanged. | Fixture pass, R1 TestRebasePreservesRemoteUntilPublication. |
| DEL-12 | P1 | Existing fixture | Direct rebase refuses a dirty worktree (begins running). | TestRebaseRequiresCleanWorktree. | 1. Run the named test. 2. Inspect its refusal and retained files. | Rebase preserves HEAD and the tracked and untracked edits. | Fixture pass, R1 TestRebaseRequiresCleanWorktree. |
| DEL-23 | P1 | Existing fixture | Exact remote feature progress is protected (while running). | TestPublishReceiptRejectsChangedRemoteHeadLease. | 1. Run the named test. 2. Inspect the changed remote head refusal. | A stale lease cannot replace the newly observed remote head. | — |
| DEL-24 | P1 | Existing fixture | A PR identity replacement is refused (while running). | TestPublishReceiptRejectsReplacementPullRequest. | 1. Run the named test. 2. Inspect identity checks. | A replacement PR is not silently adopted. | — |
| DEL-25 | P1 | Existing fixture | Verification preserves changed PR metadata (while running). | TestVerifyRefusesPullRequestMetadataEditAfterInitialInspection. | 1. Run the named test. 2. Inspect the mutation/refusal boundary. | Changed metadata causes a refusal instead of being overwritten. | — |
| DEL-27 | P1 | Existing fixture | A final read failure retains known publication evidence (finishes). | TestPublicationRetainsEvidenceAfterReviewFailure; push and PR synchronization succeed before the final review read fails. | 1. Run the named fixture. 2. Inspect publication-review-recovery.json and the remote-state assertions. | The pending report retains candidate and PR identity with verified false; later verification observes the completed publication without repeating it. | Fixture pass, D1 publication-review-recovery.json; working-tree candidate. |
| DEL-28 | P1 | Existing fixture | Review inspection covers all bounded review categories (review). | TestGitHubInspectReviewsReadsEveryReviewCategory. | 1. Run the named test. 2. Inspect returned reviews, threads, comments, and requests. | Each category appears without implying a review job completed. | — |
| DEL-29 | P1 | Existing fixture | Address recovery does not duplicate a confirmed reply (review). | TestReviewAddressPublishedCandidateAndRecovery. | 1. Run the named test. 2. Inspect the retained review-address.json artifact when available. | The restored unexpired attempt resolves the thread with only one reply. | — |
| DEL-30 | P1 | Existing fixture | Unknown reply outcome blocks automatic reposting (review). | TestReviewAddressRefusesDuplicateAfterUnknownReplyOutcome. | 1. Run the named test. 2. Inspect the reply-call count. | The next attempt does not post a second reply. | — |
| DEL-31 | P1 | Existing fixture | Address refuses changed candidate or reply inputs (review). | TestReviewAddressRefusesChangedInputs. | 1. Run the named test. 2. Inspect dirty, stale, expired, and altered-evidence cases. | Changed authority or evidence does not resolve the thread. | — |
| DEL-32 | P2 | Local CLI | Repository selection changes the inspected local target (modifiers). | Two disposable repositories with different synthetic forge identities. | 1. Run provider with each --repository path. 2. Compare sanitized identity fields. | Each report identifies its selected repository. | — |
| DEL-33 | P2 | Local CLI | Structured command reports are separate from errors (modifiers). | Missing disposable repository path; stdout/stderr captured separately. | 1. Run provider with the missing path. 2. Inspect both streams and exit status. | Nonzero status and stderr diagnostic; stdout is not a successful JSON report. | — |
| DEL-34 | P1 | Instrumented fixture | Missing forge execution prerequisites fail rather than starting plugins (modifiers). | Instrumented local CLI with no valid forge executable and a synthetic configuration file. | 1. Invoke inspect using the absent executable path. 2. Observe the failure boundary and child process log. | The selected executable fails; no AL credential plugin startup is implied. | — |
| DEL-35 | P1 | Instrumented fixture | Cancellation before a selected operation does not establish readiness (interrupts). | AL paused before the first subprocess; fresh receipt path. | 1. Deliver SIGINT once before releasing the pause. 2. Capture status and receipt state. 3. Repeat from a fresh fixture with two SIGINT signals. | Record cancellation state; no completed operation or publication is inferred from either run. | — |
| DEL-36 | P1 | Instrumented fixture / TTY | Ctrl+C during work can leave earlier durable state (interrupts). | Disposable workflow paused after candidate creation and before a slow next subprocess. | 1. Press Ctrl+C. 2. Read HEAD and the receipt. 3. Repeat with two presses in a fresh fixture. | Earlier candidate/evidence can remain; a second press is not assumed to force rollback. | — |
| DEL-37 | P1 | Instrumented fixture | SIGTERM before work uses cancellation (interrupts). | Fresh invocation paused before its first subprocess. | 1. Deliver SIGTERM. 2. Capture exit and evidence. | No completed operation is inferred; cancellation is reported where observed. | — |
| DEL-38 | P1 | Instrumented fixture | SIGTERM during work does not undo the complete workflow (interrupts). | Disposable workflow paused after a confirmed local commit. | 1. Deliver SIGTERM. 2. Inspect HEAD and evidence. | The already created commit can remain; no rollback guarantee is claimed. | — |
| DEL-39 | P2 | TTY fixture | Terminal loss before work has no dedicated AL recovery (interrupts). | Fresh process in a disposable controlling terminal, paused before work. | 1. Close the terminal. 2. Inspect process and files from another terminal. | Record OS termination behavior and existing state; no AL recovery report is required. | — |
| DEL-40 | P1 | TTY fixture | Terminal loss during remote work can hide the outcome (interrupts). | Disposable forge update acknowledged internally but final report paused. | 1. Close the terminal. 2. Inspect fixture remote state and receipt from another terminal. | The mutation can exist without visible completion output. | — |
| DEL-41 | P2 | Instrumented fixture | Closed stdin is not publication approval input (interrupts). | Prepared disposable candidate with a known publication. | 1. Close stdin. 2. Invoke receipt-bound verify. 3. Inspect forge state. | Verification does not push; stdin closure does not select a publication mutation. | — |
| DEL-42 | P1 | Instrumented fixture | Broken stdout can occur after a durable operation (interrupts). | Disposable candidate preparation paused immediately before final JSON writing. | 1. Close the stdout reader. 2. Release the pause. 3. Inspect HEAD and receipt. | Preserve any committed candidate even when its report is lost or writing fails. | — |
| DEL-43 | P2 | Local CLI / offline | Provider detection is local (interrupts). | DEL-01 fixture with external network blocked. | 1. Run provider. 2. Capture its result. | Local sanitized provider detection still succeeds. | — |
| DEL-44 | P1 | Instrumented fixture | Connection loss during publication leaves an observable recovery boundary (interrupts). | Disposable forge accepts a mutation but drops its response. | 1. Invoke receipt-bound publication. 2. Restore fixture reads. 3. Run receipt-bound verify. | Verification reports the observed postcondition without repeating the push or PR mutation. | — |
| DEL-45 | P1 | Local fixture | Inaccessible required input fails before its use (interrupts). | Disposable repository with a missing message file and otherwise valid scope. | 1. Invoke prepare with that message path. 2. Inspect HEAD and diagnostic. | Required input error; no successful preparation is reported. | — |
| DEL-46 | P1 | Instrumented filesystem fixture | Evidence failure can follow candidate creation (interrupts). | Receipt installation fault injected after the candidate write. | 1. Fail the evidence write. 2. Capture the command result. 3. Inspect HEAD and receipt bytes. | Record remaining candidate and any uncertainty; do not infer that failure removed the commit. | — |
| DEL-47 | P1 | Existing fixture | Stale input is refused before remote mutation (interrupts). | TestPublishRefusesChangedReceiptBeforeRemoteMutation. | 1. Run the named test. 2. Inspect the remote-mutation assertion. | Changed receipt evidence prevents the remote mutation. | — |
| DEL-48 | P1 | Existing fixture | Late task-scope edits are rechecked (interrupts). | TestPublishRechecksPreparedScopeAfterFinalForgeRead. | 1. Run the named test. 2. Inspect the final-scope refusal. | Publication refuses the late edit rather than using stale source. | — |
| DEL-49 | P1 | Existing fixture | Concurrent receipt transitions serialize (interrupts). | TestReceiptLockSerializesOverlappingTransition. | 1. Run the named test. 2. Inspect entry ordering. | The second cooperating transition does not overlap the first. | — |
| DEL-50 | P1 | Existing fixture | Lock-ignoring writers are outside the receipt lock guarantee (interrupts). | TestReceiptComparisonDoesNotExcludeLockIgnoringWriter. | 1. Run the named test. 2. Read its race observation. | The result does not claim exclusion of a writer that ignores the lock. | — |
| DEL-51 | P1 | Instrumented fixture | Forced kill before work proves no completion (interrupts). | Fresh process paused before any operation. | 1. Send SIGKILL. 2. Inspect process and evidence. | No application completion report or cleanup is expected. | — |
| DEL-52 | P1 | Instrumented fixture | Forced kill during an attempt can prevent evidence finalization (interrupts). | Disposable workflow paused after an attempted forge write and before final evidence. | 1. Send SIGKILL. 2. Inspect remote state and retained attempt evidence. 3. Resume verification only after diagnosis. | Partial evidence and completed remote state can coexist; do not delete evidence to force a retry. | — |
| DEL-53 | P1 | Existing fixture | Identical base entries can shrink rebase scope safely (edge cases). | TestPublishRebaseDropsOnlyPathsIdenticalInAdvancedBase. | 1. Run the named test. 2. Inspect accepted and refused scope changes. | Only the exact identical-entry reduction is accepted. | — |
| DEL-54 | P2 | Instrumented fixture | A message-only amendment changes commit identity (edge cases). | Prepared disposable candidate and revised aggregate message. | 1. Record old head/tree. 2. Prepare the message-only amendment. 3. Compare returned head/tree. | The tree remains identical while the candidate OID changes. | — |
| DEL-55 | P1 | Existing fixture | An already-based branch is not published by direct rebase (begins running). | TestRebaseAlreadyBasedPreservesRemote. | 1. Run the named test. 2. Inspect the report and absent remote feature ref. | Status is already_based, pushed is false, local HEAD is unchanged, and no remote branch is created. | Fixture pass, R1 TestRebaseAlreadyBasedPreservesRemote. |
| DEL-56 | P2 | Delivery fixture | Direct rebase reports the required preparation, ordinary checks, and publication steps (begins running). | Eligible single-commit branch with an advanced base. | 1. Run direct rebase. 2. Read next_action from the JSON report. | The next action directs preparation of the rebased candidate, ordinary checks, then explicit publication. | — |
| DEL-57 | P1 | Existing fixture | Inspection bases rebase decisions on the selected branch (invoke). | TestDeliveryInspectionUsesSelectedBase; explicit release base or existing PR base. | 1. Advance unrelated trunk and inspect. 2. Advance the selected release base and inspect again. | Unrelated advancement causes no stale-base refusal or rebase request; selected-base advancement sets needs_rebase while local HEAD stays unchanged. | Fixture pass, R2 selected-base-{false,true}.json and selected-base-advanced-{false,true}.json. |
| DEL-58 | P1 | Isolated Git/forge fixture | Preparation performs only Git preparation (begins running). | Valid task scope and message; Bazel absent from fixture PATH; standalone AL. | 1. Run prepare with its Git options. 2. Read the candidate and receipt. 3. Inspect subprocess observations. | Candidate and preparation receipt are created without launching Bazel or requiring a check plan. | — |
| DEL-59 | P1 | Isolated Git/forge fixture | Publication uses the prepared receipt without a validation ledger (while running). | Exact prepared candidate, matching clean state and remote expectations; no check-plan or result files. | 1. Run explicitly authorized fixture publish --receipt-file RECEIPT. 2. Inspect remote ref and PR state. | Publication uses the receipt’s candidate and current matching HEAD; no validated-head flag or validation log is required. | Fixture pass, D1 source-publication.json; working-tree candidate. |
| DEL-60 | P1 | Isolated Git/forge fixture | Changed candidate or prepared scope refuses publication (while running). | Separate prepared cases with a changed HEAD, staged change, and unstaged edit in task scope. | 1. Run receipt-bound publish in each case. 2. Inspect diagnostic and remote state. | Mismatched candidate or dirty prepared inputs refuse publication before remote mutation. | — |
| DEL-61 | P1 | Isolated Git/forge fixture | An advanced base produces a rebased candidate requiring checks (while running). | Prepared clean feature candidate; advance fixture base without conflicts. | 1. Publish using the receipt. 2. Read the report and updated receipt. 3. Compare local candidate and remote feature ref. | Nonzero result with checks_required; receipt identifies the rebased head/tree and remote feature publication is unchanged. | — |
| DEL-62 | P1 | Isolated Git/forge fixture | The updated receipt can publish after ordinary checks (while running). | Successful DEL-61 rebase; source and base remain unchanged. | 1. Run the fixture’s ordinary Bazel checks. 2. Invoke publish with the same receipt. 3. Inspect head and publication. | No additional prepare or commit rewrite is needed; the rebased candidate is published under its exact lease. | — |
| DEL-63 | P1 | Isolated Git/forge fixture | Review addressing uses the clean prepared candidate and verified publication (review). | Published prepared candidate, controlled unresolved thread, authorized reply file; no validation logs. | 1. Run review address with the preparation receipt and thread. 2. Inspect reply and resolution evidence. 3. Repeat from a fresh case with dirty inputs. | The clean exact published case can reply and resolve without check logs; the dirty case is refused. | — |
Not checkable by hand
Check selection and adequacy remain the operator’s responsibility. AL does not
inspect ordinary Bazel results; successful publication is not evidence that
tests ran or passed.
A finite pass cannot prove absence of all GitHub-side races or moderation
events omitted from its bounded projection. The documented boundary is a
limitation, not a claim to be certified by one successful mutation.
Unimplemented pause/failure hooks above are verification setup work, not
product defects. Record those rows as blocked when attempting a pass without
the required setup; do not mark them passed from source reading.
3.2.10.3 - Verification: foundations
Use the setups in the protocol. AL denotes the absolute path of
the source-built executable; SCRATCH is an isolated task directory. Inspect
stdout and stderr separately and retain both.
Invocation
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| INV-01 | P1 | Local | Direct command families (entry). | No config. | 1. Run AL --help. | All seven documented families appear. | —; B1 records the earlier six-family CLI |
| INV-02 | P1 | Local | Unknown commands fail (entry). | No config. | 1. Run AL unknown-command. | Nonzero exit; diagnostic on stderr. | pass (scripted: unknown-command) |
| INV-03 | P2 | Local | Leaf help is discoverable (entry). | No config. | 1. Run AL help version show. | Help names repository and format options. | — |
| INV-04 | P1 | Local | No universal JSON flag (entry). | No config. | 1. Run AL --json. | Unsupported flag fails; no command work. | — |
| INV-05 | P1 | Interrupt fixture | SIGINT requests cancellation (signals). | Slow version Git helper. | 1. Start inspection. 2. Send one SIGINT to AL. 3. Observe helper exit. | Invocation fails; helper is stopped. | — |
| INV-06 | P1 | Interrupt fixture | SIGTERM requests cancellation (signals). | Slow version Git helper. | 1. Start inspection. 2. Send SIGTERM to AL. 3. Observe helper exit. | Invocation fails; helper is stopped. | — |
| INV-07 | P2 | TTY | Git can prompt in foreground (signals). | Controlling-terminal fixture in cmd/al/lifecycle_e2e_test.go. | 1. Start terminal fixture. 2. Supply its synthetic prompt input. 3. Observe restored foreground owner. | Git receives input; terminal returns to caller. | — |
| INV-08 | P2 | Interrupt fixture | Repeated signals have no promised escalation (signals). | Slow cleanup fixture. | 1. Send SIGINT twice during cleanup. 2. Record timing and remaining children. | Characterize behavior; do not assume second signal is force kill. | — |
| INV-09 | P2 | Interrupt fixture | SIGHUP/pipe closure have no rollback promise (signals). | Disposable slow writer. | 1. Separately close terminal and stdout pipe. 2. Inspect written state. | Record partial state and exit; no rollback claim. | — |
State
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| STATE-01 | P1 | Git | Source publication is separate (boundaries). | Scratch Git and bare remote. | 1. Publish source refs. 2. Inspect artifact destination fixture. | Source refs exist; artifact publication was not invoked. | pass (scripted: version-publish-local; no artifact destination configured) |
| STATE-02 | P1 | Local | Bundle is local state (boundaries). | One generated bundle. | 1. Read manifest and files. 2. Inspect command arguments. | Payload exists locally; no publication was selected. | pass (scripted: bundle-generate) |
| STATE-03 | P1 | SSH fixture | Upload does not activate (boundaries). | Inactive version, artifact publication. | 1. Run al release publish. 2. Read current link. | Publication exists; current selection unchanged. | — |
| STATE-04 | P1 | SSH fixture | Started step is unknown (receipts). | Receipt and blocked transport. | 1. Start upload. 2. Read receipt after checkpoint but before acknowledgment. | Step unknown; invocation running. | — |
| STATE-05 | P1 | SSH fixture | Completed operations survive a later invocation failure (receipts). | Upload succeeds; a separate website extraction has an injected failure. | 1. Publish with one receipt. 2. Extract with a new receipt. 3. Read both after failure. | Upload remains completed; extraction is unknown/incomplete in its own receipt. | — |
| STATE-06 | P1 | Interrupt fixture | Killed invocation can leave running evidence (receipts). | Blocked artifact step after checkpoint. | 1. Send SIGKILL. 2. Read last persisted receipt. | Running/unknown evidence can remain; remote state needs inspection. | — |
| STATE-07 | P1 | Git | Linked worktrees share source lock (recovery). | Fixture Git with second linked worktree. | 1. Hold source operation lock. 2. Attempt second publication. | Second operation cannot acquire lock. | — |
| STATE-08 | P2 | Local | Receipt formats are distinct (receipts). | Source-ref and artifact fixture receipts. | 1. Compare schemas and fields. | Source-ref evidence is not a step journal or delivery receipt. | — |
| STATE-09 | P1 | Delivery fixture | Direct rebase updates only local candidate state (summary). | R1 rebase fixtures with existing and absent remote feature refs. | 1. Run TestRebasePreservesRemoteUntilPublication. 2. Compare local head, remote ref, and PR state. | The local candidate changes; remote publication does not. | Fixture pass, R1 TestRebasePreservesRemoteUntilPublication. |
Not checkable by hand: universal absence of races and externally introduced state; source review and failure-injection fixtures remain necessary.
3.2.10.4 - Verification: releases
Use only the isolated setups in the protocol. AL is an absolute
binary path. Define GEN as AL release generate --project projects/example --version_file STATUS --add_file PAYLOAD --output_dir OUTPUT, replacing uppercase
paths with absolute scratch paths. A development STATUS contains
STABLE_VERSION 0.0.0-dev and STABLE_VERSION_CHANNEL development; a release
status comes from the isolated Git fixture’s version bazel-status output.
PUB means the fixture’s AL release publish --release_dir BUNDLE --environment local --ssh_host FIXTURE --ssh_root ROOT with the fixture SSH/rsync executables
and trust inputs. ROOT is disposable fixture content, never a live host. Use a
fresh receipt path for each attempt. Existing fixtures own transport setup;
reuse them rather than weakening host trust. EXTRACT and ACTIVATE use those
same fixture selectors with AL release website extract and
AL release website activate; only EXTRACT accepts --site_archive.
PLAN and INSPECT use those same fixture selectors with release plan and
release inspect. Planning is an offline metadata preview; inspection reads the
fixture’s current state. Neither authorizes a publication. Preserve the original
scripted observations when adding later fixture results.
Later planning/inspection rows cite O1, the complete release-package fixture
pass recorded in the protocol. Its numbered JSON
reports are retained under out/unify-release-versioning/release-observation/final-evidence/.
The fixture uses the built CLI, synthetic payloads, and controlled SSH transport;
it is not a live-destination or manual-terminal pass. W1 records the later
nested website-command fixtures, with current preview reports under
out/unify-release-versioning/api-naming/website-evidence/. Earlier observations
retain their original command surface. Unrecorded rows remain —.
Generate a project bundle
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| BUNDLE-01 | P1 | Local | Manifest describes copied bytes (finish). | Release status and one payload. | 1. Run GEN. 2. Hash copied payload. 3. Compare manifest name, size and digest. | Exact identity and matching bytes. | pass (scripted: bundle-generate; independent SHA-256) |
| BUNDLE-02 | P1 | Local | Occupied output is refused (short path). | Previously generated output. | 1. Run GEN again. | Nonzero; existing bundle not overwritten. | pass (scripted: bundle-occupied-output) |
| BUNDLE-03 | P1 | Local | Missing release source is refused (begin). | Concrete version but no commit/tree state. | 1. Run GEN with that status and new output. | Nonzero; no completed bundle manifest. | pass (scripted: bundle-missing-source) |
| BUNDLE-04 | P2 | Local | Repeated payload flags select several files (flags). | Two distinct payload basenames. | 1. Add second --add_file. 2. Run GEN. 3. Inspect manifest. | Both files copied and described. | — |
| BUNDLE-05 | P2 | Local | Formatting/mode flags affect output (flags). | Fresh bundle. | 1. Set --indent to two spaces and --output_file_mode 0600. 2. Inspect manifest. | Requested JSON layout and manifest permissions. | — |
| BUNDLE-06 | P1 | Local | Basename collisions fail (edge cases). | Two different directories containing same basename. | 1. Add both files. 2. Run GEN. | Nonzero; no completed manifest. | — |
| BUNDLE-07 | P1 | Local | Empty bundles fail (short path). | Valid status without payload. | 1. Remove --add_file. 2. Run GEN. | Nonzero; no complete bundle. | — |
| BUNDLE-08 | P2 | Local | No plugin startup (systems). | No plugin configuration. | 1. Generate with minimal environment. | Bundle generation succeeds without plugin launch. | pass (scripted: bundle-generate) |
| BUNDLE-09 | P2 | Interrupt fixture | Ctrl+C once or twice, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Send SIGINT, then repeat in a separate attempt with two SIGINTs. 2. Inspect manifest and payloads. | Signal cancellation is requested; record whether copying stops promptly. | — |
| BUNDLE-10 | P2 | Interrupt fixture | Ctrl+C once or twice, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Send SIGINT, then repeat in a separate attempt with two SIGINTs. 2. Inspect manifest and payloads. | Signal cancellation is requested; record whether copying stops promptly. | — |
| BUNDLE-11 | P2 | Interrupt fixture | SIGTERM, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Send SIGTERM to the recorded AL PID. 2. Inspect manifest and payloads. | No transaction-wide rollback is assumed. | — |
| BUNDLE-12 | P2 | Interrupt fixture | SIGTERM, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Send SIGTERM to the recorded AL PID. 2. Inspect manifest and payloads. | No transaction-wide rollback is assumed. | — |
| BUNDLE-13 | P2 | Interrupt fixture | Terminal closed (SIGHUP), before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Send SIGHUP to the disposable process. 2. Inspect manifest and payloads. | No AL recovery handler; record surviving output. | — |
| BUNDLE-14 | P2 | Interrupt fixture | Terminal closed (SIGHUP), during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Send SIGHUP to the disposable process. 2. Inspect manifest and payloads. | No AL recovery handler; record surviving output. | — |
| BUNDLE-15 | P2 | Interrupt fixture | Input or output pipe closes, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Close the diagnostic pipe; keep named payload intact. 2. Inspect manifest and payloads. | Named payload remains independent of stdin; record exit and files. | — |
| BUNDLE-16 | P2 | Interrupt fixture | Input or output pipe closes, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Close the diagnostic pipe; keep named payload intact. 2. Inspect manifest and payloads. | Named payload remains independent of stdin; record exit and files. | — |
| BUNDLE-17 | P2 | Interrupt fixture | Disk full or file inaccessible, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Use a fixture-controlled failing file or filesystem. 2. Inspect manifest and payloads. | Error is visible; during copying partial files may remain. | — |
| BUNDLE-18 | P2 | Interrupt fixture | Disk full or file inaccessible, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Use a fixture-controlled failing file or filesystem. 2. Inspect manifest and payloads. | Error is visible; during copying partial files may remain. | — |
| BUNDLE-19 | P2 | Interrupt fixture | Required state changes, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Change the fixture input at the controlled checkpoint. 2. Inspect manifest and payloads. | Record result; there is no snapshot guarantee. | — |
| BUNDLE-20 | P2 | Interrupt fixture | Required state changes, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Change the fixture input at the controlled checkpoint. 2. Inspect manifest and payloads. | Record result; there is no snapshot guarantee. | — |
| BUNDLE-21 | P2 | Interrupt fixture | Concurrent invocation, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Start a second GEN sharing OUTPUT. 2. Inspect manifest and payloads. | Record both exits and output; no whole-bundle lock guarantee. | — |
| BUNDLE-22 | P2 | Interrupt fixture | Concurrent invocation, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Start a second GEN sharing OUTPUT. 2. Inspect manifest and payloads. | Record both exits and output; no whole-bundle lock guarantee. | — |
| BUNDLE-23 | P2 | Interrupt fixture | Forced kill, before work (interrupt). | GEN held at a pre-copy fixture checkpoint. | 1. Send SIGKILL to the disposable AL PID. 2. Inspect manifest and payloads. | No completed bundle is implied; inspect partial files. | — |
| BUNDLE-24 | P2 | Interrupt fixture | Forced kill, during work (interrupt). | GEN held at a mid-copy fixture checkpoint. | 1. Send SIGKILL to the disposable AL PID. 2. Inspect manifest and payloads. | No completed bundle is implied; inspect partial files. | — |
Network loss has no ordinary local-input interaction. Snapshot/race absence and prompt cancellation cannot be established from a single observation.
Publication
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| PUB-01 | P1 | SSH fixture | New identity becomes complete (begin). | Valid clean bundle; absent destination identity. | 1. Run PUB. 2. Inspect public manifest/file set/digests. | Complete verified identity; no public files layer. | — |
| PUB-02 | P1 | SSH fixture | Identical retry skips payload reads (begin). | Existing matching publication; remove local payloads. | 1. Run PUB again. 2. Inspect transport calls. | Success without payload transfer. | — |
| PUB-03 | P1 | SSH fixture | Conflicting bytes refuse overwrite (begin). | Existing publication; different candidate bytes. | 1. Run PUB. 2. Compare original remote hashes. | Failure; original publication unchanged. | — |
| PUB-04 | P1 | SSH fixture | Corrupt/extra remote files fail retry (edge cases). | Disposable publication. | 1. Add an extra file; retry. 2. Reset fixture, corrupt payload; retry. | Both retries fail verification. | — |
| PUB-05 | P1 | SSH fixture | Upload alone does not extract (while running). | Archive payload; absent retained site. | 1. Run default PUB. 2. Inspect site root. | Published archive exists; no extracted site. | — |
| PUB-06 | P1 | SSH fixture | Website extraction then activation selects the site (while running). | Published valid site archive with root index.html. | 1. Run EXTRACT. 2. Inspect retained site. 3. Run ACTIVATE. | Retained binding matches; current points to selected site. | — |
| PUB-07 | P1 | SSH fixture | Rollback retains versions (while running). | Two published/extracted versions. | 1. Activate second. 2. Activate first. 3. Inspect both. | Both retained; current returns to first. | — |
| PUB-08 | P1 | SSH fixture | Active deletion is refused (while running). | Selected website. | 1. Run release delete with same bundle/destination. 2. Inspect both trees. | Failure before removing content. | — |
| PUB-09 | P1 | SSH fixture | Delete permits different republish (finish). | Inactive release. | 1. Delete. 2. Publish same version with different bytes. 3. Inspect Git tags. | New bytes accepted; source refs remain. | — |
| PUB-10 | P2 | SSH fixture | Absent deletion succeeds (finish). | Already deleted identity. | 1. Repeat deletion. | Success; no restoration state required. | — |
| PUB-11 | P1 | SSH fixture | Unsafe ancestry/mounts refuse removal (edge cases). | Mount namespace fixture. | 1. Test symlink ancestry and bind-mounted file separately. 2. Attempt deletion. | Neither release tree removed. | — |
| PUB-12 | P1 | SSH fixture | Selection follows flags (invoke). | Manifest with two environment assignments. | 1. Publish selected environment without host override. 2. Reset and use explicit host. | First selects matching items; override selects all. | — |
| PUB-14 | P1 | Local | OCI publication refuses (short path). | Legacy OCI metadata. | 1. Invoke publish without SSH selection. | Immutability refusal; no registry push. | — |
| PUB-15 | P1 | SSH fixture | Separate operations retain their own evidence (while running). | Upload succeeds; subsequent extraction has an injected failure. | 1. Run PUB with one receipt. 2. Run EXTRACT with a new receipt. 3. Read both receipts and stdout. | Upload remains completed in its receipt; extraction has an unknown step and incomplete status in its own receipt. | — |
| PUB-16 | P2 | SSH fixture | Trust/authentication are noninteractive (modifiers). | Wrong known-host entry. | 1. Run PUB with that trust file. | Failure without accepting a new host key interactively. | — |
| PUB-17 | P1 | SSH fixture | Ctrl+C once or twice, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Send SIGINT; test repeated SIGINT separately. 2. Compare receipt, publication, staging and current. | Preserve completed steps; inspect unknown state instead of assuming rollback. | — |
| PUB-18 | P1 | SSH fixture | Ctrl+C once or twice, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Send SIGINT; test repeated SIGINT separately. 2. Compare receipt, publication, staging and current. | Preserve completed steps; inspect unknown state instead of assuming rollback. | — |
| PUB-19 | P1 | SSH fixture | SIGTERM, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Send SIGTERM to the recorded process. 2. Compare receipt, publication, staging and current. | Cancellation can leave completed and unknown steps. | — |
| PUB-20 | P1 | SSH fixture | SIGTERM, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Send SIGTERM to the recorded process. 2. Compare receipt, publication, staging and current. | Cancellation can leave completed and unknown steps. | — |
| PUB-21 | P1 | SSH fixture | Terminal closed (SIGHUP), before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Send SIGHUP to the isolated process. 2. Compare receipt, publication, staging and current. | Inspect persisted receipt and remote content; no special recovery. | — |
| PUB-22 | P1 | SSH fixture | Terminal closed (SIGHUP), during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Send SIGHUP to the isolated process. 2. Compare receipt, publication, staging and current. | Inspect persisted receipt and remote content; no special recovery. | — |
| PUB-23 | P1 | SSH fixture | Input or output pipe closes, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Close output pipe while transport is controlled. 2. Compare receipt, publication, staging and current. | Lost completion output does not establish remote failure. | — |
| PUB-24 | P1 | SSH fixture | Input or output pipe closes, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Close output pipe while transport is controlled. 2. Compare receipt, publication, staging and current. | Lost completion output does not establish remote failure. | — |
| PUB-25 | P1 | SSH fixture | Network lost, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Fail the fixture transport before send or after remote completion. 2. Compare receipt, publication, staging and current. | Before effects fails; after acknowledgment loss remote outcome may be unknown. | — |
| PUB-26 | P1 | SSH fixture | Network lost, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Fail the fixture transport before send or after remote completion. 2. Compare receipt, publication, staging and current. | Before effects fails; after acknowledgment loss remote outcome may be unknown. | — |
| PUB-27 | P1 | SSH fixture | Disk full or file inaccessible, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Refuse receipt writes or fail staging filesystem at checkpoint. 2. Compare receipt, publication, staging and current. | Requested pre-step receipt failure prevents that step; earlier completed work remains. | — |
| PUB-28 | P1 | SSH fixture | Disk full or file inaccessible, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Refuse receipt writes or fail staging filesystem at checkpoint. 2. Compare receipt, publication, staging and current. | Requested pre-step receipt failure prevents that step; earlier completed work remains. | — |
| PUB-29 | P1 | SSH fixture | Required state changes, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Change candidate remote contents using the fixture controller. 2. Compare receipt, publication, staging and current. | Locked verification rejects conflicting content/bindings. | — |
| PUB-30 | P1 | SSH fixture | Required state changes, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Change candidate remote contents using the fixture controller. 2. Compare receipt, publication, staging and current. | Locked verification rejects conflicting content/bindings. | — |
| PUB-31 | P1 | SSH fixture | Concurrent invocation, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Start a second identical or conflicting PUB. 2. Compare receipt, publication, staging and current. | Final locked verification preserves immutability; identical attempts may succeed. | — |
| PUB-32 | P1 | SSH fixture | Concurrent invocation, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Start a second identical or conflicting PUB. 2. Compare receipt, publication, staging and current. | Final locked verification preserves immutability; identical attempts may succeed. | — |
| PUB-33 | P1 | SSH fixture | Forced kill, before work (interrupt). | PUB held before the first remote step; fresh receipt. | 1. Send SIGKILL at the checkpoint. 2. Compare receipt, publication, staging and current. | Cleanup can be skipped; inspect running/unknown receipt and remote state. | — |
| PUB-34 | P1 | SSH fixture | Forced kill, during work (interrupt). | PUB held after its started checkpoint; fresh receipt. | 1. Send SIGKILL at the checkpoint. 2. Compare receipt, publication, staging and current. | Cleanup can be skipped; inspect running/unknown receipt and remote state. | — |
| PUB-35 | P1 | Local | Planning reports the selected publication metadata (preview and inspection). | Valid fixture bundle and destination selectors. | 1. Run PLAN. 2. Parse identity, payloads, steps, destination, and publication digest. | The report describes the selected publication without claiming it was performed. | Fixture pass, O1 observation-01-plan.json. |
| PUB-36 | P1 | Local | Planning distinguishes explicit and environment-based selection (preview and inspection). | Manifest with two environment assignments. | 1. Plan with an environment only. 2. Plan with an explicit host or deployment file. | Selection mode identifies the choice; item selection follows the publication rules. | Fixture pass, O1 selected-plan.json and observation-01-plan.json. |
| PUB-37 | P1 | Local | A publication plan is metadata-only (preview and inspection). | Valid manifest with unavailable destination. | 1. Run PLAN. 2. Read the report boundary. | The output identifies a metadata preview and makes no publication-readiness guarantee. | Fixture observation, O1 observation-01-plan.json. |
| PUB-38 | P1 | Local | Planning does not require payload contents (preview and inspection). | Valid manifest; remove declared local payloads. | 1. Run PLAN. 2. Inspect its payload declarations. | Metadata preview still succeeds without opening missing payloads. | Fixture pass, O1 observation-11-plan.json. |
| PUB-39 | P1 | Local | Planning starts no SSH or rsync process (preview and inspection). | SSH and rsync paths both /bin/false; nonexistent identity path. | 1. Run PLAN with those paths. 2. Inspect exit status and report. | Preview succeeds without executing the failing transport commands or opening the identity. | Fixture pass, O1 observation-01-plan.json. |
| PUB-40 | P2 | Local | A port owned by SSH configuration stays unspecified (preview and inspection). | Destination without an explicit port. | 1. Run PLAN. 2. Inspect its destination port. | The report does not invent a resolved SSH port. | Fixture pass, O1 observation-01-plan.json. |
| PUB-41 | P1 | SSH fixture | Local payload validity and matching remote publication are independent (preview and inspection). | Matching published fixture; remove then corrupt the local payload in separate observations. | 1. Run INSPECT. 2. Compare local and remote observations. | Local missing data is reported alongside the matching remote publication. | Fixture pass, O1 observations 10 and 12. |
| PUB-42 | P1 | SSH fixture | Inspection distinguishes an absent publication (preview and inspection). | Valid bundle; absent fixture publication. | 1. Run INSPECT. 2. Read publication state. | Publication is reported absent without being created. | Fixture pass, O1 observation-02-inspect.json. |
| PUB-43 | P1 | SSH fixture | Inspection verifies a matching publication (preview and inspection). | Complete matching fixture publication. | 1. Run INSPECT. 2. Read publication state. | Publication matches the selected manifest and payload declarations. | Fixture pass, O1 observation-09-inspect.json. |
| PUB-44 | P1 | SSH fixture | Inspection reports a conflicting publication identity (preview and inspection). | Different canonical manifest at the selected publication path. | 1. Run INSPECT. 2. Compare the remote files before and afterward. | Conflict is reported; original publication remains unchanged. | Fixture pass, O1 observation-15-inspect.json. |
| PUB-45 | P1 | SSH fixture | Inspection reports damaged published bytes (preview and inspection). | Matching manifest with a corrupt or extra payload. | 1. Run INSPECT. 2. Read the publication finding. | Corruption is reported without repair. | Fixture pass, O1 observations 13 and 14. |
| PUB-46 | P1 | SSH fixture | Inspection reports retained-site and activation state separately (preview and inspection). | Published/extracted fixture site initially inactive. | 1. Inspect. 2. Activate through a separate authorized fixture operation. 3. Inspect again. | Retention and activation are separate observations. | Fixture pass, O1 observations 16 and 17. |
| PUB-47 | P1 | SSH fixture | Activation does not hide invalid retained-site state (preview and inspection). | Current link selects the fixture version; damage its retained-site binding. | 1. Run INSPECT. 2. Read both retained-site and activation observations. | The invalid site is reported independently from its active selection. | Fixture pass, O1 observations 23 and 24. |
| PUB-48 | P1 | SSH fixture | A failed remote read is unavailable rather than absent (preview and inspection). | Missing/inaccessible root, failed transport, malformed response, timeout, and excessive-output cases. | 1. Run INSPECT. 2. Capture JSON and exit status. | Nonzero status; unavailable or unknown remote observations do not claim absence. | Fixture pass, O1 observations 03 through 08. |
| PUB-49 | P2 | SSH fixture | Third-party inspection has no website lifecycle (preview and inspection). | Valid third_party artifact selection. | 1. Run INSPECT. 2. Read site observation. | Website state is not applicable. | — |
| PUB-50 | P1 | SSH fixture | Inspection does not create staging or mutation locks (preview and inspection). | O1 fixture captures destination entry names, bytes, modes, modification times, and symlink targets. | 1. Run every plan/inspection case. 2. Compare each before/after tree. | No publication, staging, lock, extraction, or link mutation is introduced. | Fixture pass, O1 TestReleaseObservationCLI destination-tree comparisons. |
| PUB-51 | P1 | Local and SSH fixture | Inspection rejects operation-receipt flags (inspection). | Valid fixture selection and a disposable receipt path. | 1. Run INSPECT with --receipt PATH. 2. Capture its status. | The unsupported flag causes a nonzero exit. | Fixture pass, O1 TestReleaseObservationCLI receipt-flag rejection. |
| PUB-52 | P1 | Local and SSH fixture | A later publication rereads inputs after planning (preview and inspection). | Successful plan followed by changed bundle metadata. | 1. Change the fixture input. 2. Run a separate publication attempt. 3. Inspect the selected identity or refusal. | The earlier report does not bind or authorize the changed publication. | — |
| PUB-53 | P2 | Pipe fixture | A lost observation report is not a publication (interrupts). | PLAN and INSPECT separately paused before final output. | 1. Close each stdout reader. 2. Inspect fixture destination and receipt paths. | A complete report is not assumed; no publication or recovery mutation is started. | — |
| PUB-54 | P1 | Interrupt fixture | Interrupting inspection does not publish or repair (interrupts). | INSPECT paused during a controlled remote read. | 1. Send SIGINT and SIGTERM in separate cases. 2. Inspect destination contents and receipt paths. | No mutation is started; obtain fresh observations in a later invocation. | — |
| PUB-55 | P2 | SSH fixture | Inspection does not reserve observed state (preview and inspection). | Valid inspection followed by a separate controlled destination change. | 1. Capture the first report. 2. Change the fixture destination. 3. Inspect again. | The later report reflects new observations; the earlier report grants no lock. | Fixture pass, O1 observations 02, 09, 16, and 17. |
| PUB-56 | P1 | SSH fixture | Unsafe current selection is unknown rather than inactive (inspection). | Current targets with trailing/embedded newline or an absolute path, and a current directory, in separate cases. | 1. Run INSPECT. 2. Read current-link and active fields. | Current is unsafe and active is null; site validity remains a separate finding. | Fixture pass, O1 observations 18 through 21. |
| PUB-57 | P1 | SSH fixture | A dangling link can still name the selected version (inspection). | Current link names this version, but its retained directory is absent. | 1. Run INSPECT. 2. Read site, current, and active fields. | Site is absent, current is dangling, and active is true as a selection observation. | Fixture pass, O1 observation-22-inspect.json. |
| PUB-58 | P1 | SSH fixture | Inspection supports reconciliation without rewriting the attempt receipt (finishes). | Unknown upload receipt and a matching published fixture identity. | 1. Run INSPECT with the same bundle/destination. 2. Compare publication digest and remote state with the receipt. 3. Read receipt bytes again. | Matching remote state is observable; the original receipt is unchanged and no retry starts automatically. | — |
| PUB-59 | P2 | Local | Planning reports configured execution accounts (inspection). | O1 plan with explicit synthetic SSH and content accounts. | 1. Run PLAN. 2. Read destination account selectors. | The report names the configured ssh_user and publish_user without resolving credentials. | Fixture pass, O1 observation-01-plan.json. |
| PUB-60 | P2 | Local | Planning rejects operation-receipt flags (inspection). | Valid selection and disposable receipt path. | 1. Run PLAN with --receipt PATH. 2. Inspect status. | The unsupported flag causes a nonzero exit. | — |
| PUB-61 | P2 | Local and SSH fixture | An unreadable local payload does not suppress destination inspection (inspection). | Unprivileged isolated fixture with a selected mode-000 local payload and readable matching destination. | 1. Run INSPECT. 2. Read local and remote fields. | Local status is unreadable and remote matching is reported independently. | — |
| PUB-62 | P1 | SSH fixture | Completed corruption/conflict observations can exit zero (inspection). | O1 corrupt and conflicting publication cases. | 1. Run the cases. 2. Compare finding and process exit. | Exit zero accompanies the finding; it does not certify publication readiness. | Fixture pass, O1 observations 13 through 15. |
| PUB-63 | P2 | Local and SSH fixture | Planning and inspection identify their JSON contracts (inspection). | O1 valid plan and absent-publication inspection. | 1. Parse both reports. 2. Read schema and mode. | Plan uses release/artifact_plan/v1 and offline_metadata; inspection uses release/artifact_inspection/v1 and read_only_snapshot. | Fixture observation, O1 observations 01 and 02. |
| PUB-64 | P1 | Linux interrupt fixture | Cancellation interrupts local hashing before SSH (inspection). | TestReleaseInspectionCancellationCLI observes hashing of a large sparse synthetic payload. | 1. Wait for the fixture hash-start observation. 2. Send SIGTERM. 3. Inspect exit and SSH marker. | The command promptly returns nonzero, starts no SSH, and does not report cancellation as corruption; no fixed elapsed-time guarantee is implied. | Fixture pass, O1 inspection-cancellation.json. |
| PUB-65 | P1 | Local | Website extraction has an offline preview (preview). | Valid archive declaration; failing transport executables and nonexistent identity path. | 1. Run EXTRACT with –dry-run.
2. Read JSON and compare the fixture tree. | Plan uses offline_metadata with only extract; no SSH call or destination mutation occurs. | Fixture pass, W1 observation-02-extract.json and unchanged-tree checks. |
| PUB-66 | P1 | Local | Website activation has an offline preview (preview). | Valid bundle metadata; failing transport executables and nonexistent identity path. | 1. Run ACTIVATE with –dry-run.
2. Read JSON and compare the fixture tree. | Plan uses offline_metadata with only link; retained-site readiness is not asserted and no SSH call starts. | Fixture pass, W1 observation-03-activate.json and unchanged-tree checks. |
| PUB-67 | P1 | Local | Website dry runs reject requested receipts (invoke). | Both website operations; absent receipt and transport marker. | 1. Add –dry-run and –receipt PATH to each website operation.
2. Inspect receipt paths and the fixture tree. | Nonzero before any receipt or remote effect. | Fixture pass, W1 TestReleaseObservationCLI receipt refusal and no-file checks. |
| PUB-68 | P2 | Local | Archive selection belongs only to extraction (invoke). | Valid bundle metadata and destination selectors. | 1. Preview EXTRACT with –site_archive NAME.
2. Supply –site_archive to ACTIVATE and PUB separately. | Extraction accepts its archive selector; the other commands reject the unknown flag. | Fixture pass, W1 extraction preview and al-retired-invocations.json. |
| PUB-69 | P1 | Local | Artifact planning selects upload only (preview). | Valid fixture bundle with a site archive. | 1. Run PLAN.
2. Read steps. | The fixed operation is upload; no extraction or activation is planned. | Fixture pass, W1 observation-01-plan.json. |
Not checkable by hand: guarantees across all crash timings or noncooperating writers. Use source inspection and controlled fault fixtures; never interpret one successful run as universal atomicity.
Versioning
VER-04, VER-13, and VER-26 are retired with create-time checkout; VER-24 is
retired with the stamped-build wrapper. Those IDs remain reserved. Ordinary
Bazel stamping is covered by VER-45–47; release creation and explicit checkout
are covered by VER-48–49.
VER below means AL version --repository REPOSITORY, with an absolute path to
a fresh synthetic Git checkout under task scratch. Initialize it with clean
trunk, one ordinary payload commit, and a local bare origin whose trunk points
to that commit. The fixed example date is 2026-11-02; it makes the sample
identity reproducible. PLAN and RECEIPT are absolute task-scratch paths.
CREATE means AL release create --repository REPOSITORY. A prepared weekly
fixture has run CREATE and then git -C REPOSITORY checkout releases/2026.45;
creation alone leaves the selected branch unchanged.
Never point these preparation or publication commands at the real repository.
The scripted results name observations from the local-bare-remote pass recorded
on 2026-11-02 in observations-release/observations.json. They do not claim live
SSH authentication or interactive-terminal coverage. Interrupt rows need
controlled pause/failure hooks in a disposable process or remote; mark them
blocked if the setup is unavailable.
| ID | P | Device | Claim | Setup | Steps | Expected | Result |
|---|
| VER-01 | P1 | Local | A clean untagged checkout reports development (invoke). | Fresh REPOSITORY fixture. | 1. Run VER show --format json. 2. Read version, branch and tree state. | Development version, trunk branch, exact commit, and clean state. | pass (scripted: version-development) |
| VER-02 | P2 | Local | Dry run reports the intended weekly branch (short path). | Fresh REPOSITORY fixture. | 1. Run CREATE --date 2026-11-02 --dry-run. | Exit zero and the intended weekly branch name on stdout. | pass (C1: dry-run branch output and unchanged refs; fixture date 2026-08-30) |
| VER-03 | P1 | Local | Dry run does not switch the checkout (short path). | Fixture immediately after VER-02. | 1. Run VER show --format json. 2. Compare branch and source version with VER-01. | Checkout remains on trunk with the development version. | —; prior version-after-dry-run is historical |
| VER-05 | P1 | Local | The plan names exact source refs and commit (begin). | Prepared weekly fixture. | 1. Run VER release-plan --lease fixture --plan PLAN. 2. Read emitted JSON. | Plan names the weekly branch, initial tag, exact source commit, expected trunk and atomic selection. | pass (scripted: version-plan) |
| VER-06 | P1 | Local bare remote | Publication reports verified remote source refs (finish). | VER-05 plan and matching bare origin. | 1. Run VER release-publish --plan PLAN --receipt RECEIPT. 2. Read receipt JSON. | Receipt is verified and binds the planned branch/tag to the exact commit. | pass (scripted: version-publish-local) |
| VER-07 | P1 | Local bare remote | Existing identical source refs can be verified on retry (running). | Already published VER-06 refs. | 1. Repeat VER release-publish --plan PLAN. 2. Compare receipt ref bindings. | Success with the same ref-to-commit bindings. | pass (scripted: version-publish-retry) |
| VER-08 | P1 | Local | Release status emits concrete source identity (running). | Clean prepared weekly fixture. | 1. Run VER bazel-status. | Stable version, channel, commit and clean-tree keys are printed. | pass (scripted: version-status) |
| VER-09 | P2 | Local | Text is the default inspection format (modifiers). | Fresh fixture with known version. | 1. Run VER show. 2. Compare with JSON version field. | Stdout contains the version text and newline. | — |
| VER-10 | P2 | Local | Repository selection works before or after the leaf command (modifiers). | Fresh fixture outside the current working directory. | 1. Run AL version --repository REPOSITORY show --format json. 2. Run AL version show --repository REPOSITORY --format json. 3. Compare JSON. 4. Try the removed --repo flag. | Both canonical placements report the selected fixture; --repo fails as an unknown flag. | Fixture pass, TestLifecycleCLI; api-naming/compatibility-evidence/al-retired-invocations.json retains both canonical observations and explicit obsolete-input refusals. |
| VER-11 | P1 | Local | Inspection selectors cannot mutate refs (invoke). | Fresh clean trunk fixture. | 1. Run VER --channel nightly nightly-tag --date 2026-11-02. 2. Inspect failure and local refs. | The selector is refused for ref mutation; no requested refs are created. | — |
| VER-12 | P2 | Local | A date flag fixes the intended calendar operation (modifiers). | Fresh fixture. | 1. Run two dry runs with dates in distinct ISO weeks. 2. Compare printed branch names. | Names follow each explicitly selected week. | — |
| VER-14 | P1 | Local | Dirty nondevelopment stamping is refused (short path). | Prepared weekly fixture with an unstaged payload edit. | 1. Run VER bazel-status. | Nonzero status; no successful release status output. | — |
| VER-15 | P1 | Local | Dry run checks ref collisions (short path). | Fresh fixture with an existing target weekly branch. | 1. Run CREATE --date 2026-11-02 --dry-run. | The existing ref causes a refusal. | — |
| VER-16 | P1 | Local | A second nightly on unchanged source is refused (begin). | Fresh fixture on trunk. | 1. Create a nightly for 2026-11-02. 2. Attempt another for 2026-11-03 without a commit. | The second invocation refuses another nightly at the same source commit. | — |
| VER-17 | P1 | Local bare remote | Conflicting remote tags are not overwritten (running). | Weekly plan; bare origin’s planned tag points to a different fixture commit. | 1. Invoke VER release-publish --plan PLAN. 2. Inspect remote tag. | Publication fails and the conflicting tag is preserved. | — |
| VER-18 | P1 | Local bare remote | Atomic selection must match the plan (begin). | Atomic weekly plan. | 1. Invoke VER release-publish --plan PLAN --atomic=false. | Mismatch is refused before publication. | — |
| VER-19 | P1 | Local bare remote | Atomic publication requires an explicit plan lease (begin). | Plan generated without --lease; matching remote. | 1. Invoke VER release-publish --plan PLAN. | Publication refuses the missing lease rather than assuming authority. | — |
| VER-20 | P1 | Local bare remote | Patches can publish independently of diverged trunk (running). | Disposable weekly branch with one patch commit, matching remote weekly branch, and separately advanced remote trunk. | 1. Tag the patch. 2. Generate its plan. 3. Publish to the bare origin. | Patch tag verifies without requiring trunk to equal the patch. | — |
| VER-21 | P1 | Local | Ambiguous detached source needs explicit context (edge cases). | Detached fixture commit with matching nightly and release tags. | 1. Run VER show. 2. Retry with an explicit valid channel. | Ambiguous automatic selection fails; explicit matching context resolves it. | — |
| VER-22 | P2 | Local | Workspace environment can choose the default repository (modifiers). | Synthetic BUILD_WORKSPACE_DIRECTORY=REPOSITORY; shell starts elsewhere. | 1. Run AL version show --format json without a repository flag. | Output identifies REPOSITORY rather than the shell’s directory. | — |
| VER-23 | P1 | TTY Git fixture | Foreground Git can authenticate through the terminal (modifiers). | Existing controlling-terminal fixture using synthetic prompts from cmd/al/lifecycle_e2e_test.go. | 1. Start its version operation. 2. Supply requested test input. 3. Observe foreground ownership after child exit. | Input reaches Git and AL restores terminal ownership. | — |
| VER-25 | P1 | Filesystem fault fixture | Remote publication can precede local receipt failure (finish). | Matching bare remote and plan; receipt path fails writing after publication. | 1. Publish with that receipt path. 2. Inspect diagnostic and remote refs. | Command fails to write evidence although remote refs can already match the plan. | — |
| VER-27 | P1 | Interrupt fixture | Ctrl+C once or twice, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Send SIGINT once; repeat from a fresh fixture with two SIGINT signals. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cancellation is requested; inspect any refs and outputs already created. | — |
| VER-28 | P1 | Interrupt fixture | Ctrl+C once or twice, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Send SIGINT once; repeat from a fresh fixture with two SIGINT signals. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cancellation is requested; inspect any refs and outputs already created. | — |
| VER-29 | P1 | Interrupt fixture | SIGTERM, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Send SIGTERM to the recorded AL PID. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cancellation is requested without whole-workflow rollback. | — |
| VER-30 | P1 | Interrupt fixture | SIGTERM, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Send SIGTERM to the recorded AL PID. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cancellation is requested without whole-workflow rollback. | — |
| VER-31 | P1 | Interrupt fixture | Terminal closed (SIGHUP), before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Close the disposable controlling terminal or send SIGHUP. 2. Compare local refs, bare-remote refs, receipt and lock state. | No dedicated AL recovery; inspect state and any source-ref lock. | — |
| VER-32 | P1 | Interrupt fixture | Terminal closed (SIGHUP), during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Close the disposable controlling terminal or send SIGHUP. 2. Compare local refs, bare-remote refs, receipt and lock state. | No dedicated AL recovery; inspect state and any source-ref lock. | — |
| VER-33 | P1 | Interrupt fixture | Input or output pipe closes, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Close the selected input/output pipe at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Record authentication/report failure and persistent state; published refs can remain. | — |
| VER-34 | P1 | Interrupt fixture | Input or output pipe closes, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Close the selected input/output pipe at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Record authentication/report failure and persistent state; published refs can remain. | — |
| VER-35 | P1 | Interrupt fixture | Network lost, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Make the isolated transport fail at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Local inspection needs no remote; publication can fail without proving remote refs are absent. | — |
| VER-36 | P1 | Interrupt fixture | Network lost, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Make the isolated transport fail at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Local inspection needs no remote; publication can fail without proving remote refs are absent. | — |
| VER-37 | P1 | Interrupt fixture | Disk full or file inaccessible, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Activate a controlled read/write failure at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Record the error and existing refs/evidence; earlier changes can remain. | — |
| VER-38 | P1 | Interrupt fixture | Disk full or file inaccessible, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Activate a controlled read/write failure at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Record the error and existing refs/evidence; earlier changes can remain. | — |
| VER-39 | P1 | Interrupt fixture | Required state changes, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Change the relevant fixture source or remote ref at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Conflicting expectations are refused where rechecked; record the boundary. | — |
| VER-40 | P1 | Interrupt fixture | Required state changes, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Change the relevant fixture source or remote ref at the pause. 2. Compare local refs, bare-remote refs, receipt and lock state. | Conflicting expectations are refused where rechecked; record the boundary. | — |
| VER-41 | P1 | Interrupt fixture | Concurrent invocation, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Start another fixture operation on the same refs and common Git directory. 2. Compare local refs, bare-remote refs, receipt and lock state. | Local creates remain guarded and publication contends for its shared operation lock. | — |
| VER-42 | P1 | Interrupt fixture | Concurrent invocation, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Start another fixture operation on the same refs and common Git directory. 2. Compare local refs, bare-remote refs, receipt and lock state. | Local creates remain guarded and publication contends for its shared operation lock. | — |
| VER-43 | P1 | Interrupt fixture | Forced kill, before work (interrupt). | Invocation held before its selected local/ref-publication operation. | 1. Send SIGKILL to the recorded disposable AL PID. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cleanup may not run; inspect retained refs, lock and evidence before retrying. | — |
| VER-44 | P1 | Interrupt fixture | Forced kill, during work (interrupt). | Invocation held after a controlled durable-step or remote-transfer checkpoint. | 1. Send SIGKILL to the recorded disposable AL PID. 2. Compare local refs, bare-remote refs, receipt and lock state. | Cleanup may not run; inspect retained refs, lock and evidence before retrying. | — |
| VER-45 | P1 | Installed AL, Bazel, Git fixture | Ordinary Bazel supplies stamped source identity (running). | Clean tagged fixture with a release bundle and the root workspace-status adapter; AL on PATH. | 1. Run bazel build --config=release //:bundle in the fixture. 2. Read release.json and compare with the Git commit/tag. | Bundle version, channel, commit, and clean-tree fields match the selected source. | Fixture pass, B1 plain-release-consumer/result.json. |
| VER-46 | P1 | Installed AL, Bazel, Git fixture | A release build refuses dirty source (short path). | VER-45 fixture with an unstaged tracked payload edit. | 1. Repeat the ordinary release build. 2. Inspect status and diagnostics. | Workspace-status failure reports dirty nondevelopment source; no successful release build is claimed. | Fixture pass, B1 dirty-build.log; clean recovery verified. |
| VER-47 | P1 | Bazel, Git fixture | Release stamping requires installed AL (running). | Clean release fixture with the status adapter; invoke Bazel by its absolute path and remove AL from the fixture PATH. | 1. Build the release bundle. 2. Capture status and diagnostic. | The build fails with AL installation guidance; no nested Bazel bootstrap starts. | Fixture pass, B1 missing-al-build.log; installation guidance. |
| VER-48 | P1 | Local Git fixture | Weekly creation creates both refs without changing the checkout (begin). | Fresh clean trunk fixture; record HEAD and the selected branch. | 1. Run CREATE --date 2026-11-02. 2. Read the created branch and tag OIDs. 3. Compare HEAD and the selected branch with the recorded values. | releases/2026.45 and v2026.45.0 name the original trunk commit; HEAD and the selected branch are unchanged. | pass (C1: release-creation.json; both refs match trunk, HEAD unchanged) |
| VER-49 | P1 | Local Git fixture | Ordinary Git checkout selects the created release for inspection and builds (simple case). | Successful VER-48 fixture. | 1. Run git -C REPOSITORY checkout releases/2026.45. 2. Run VER show --format json. | The selected branch is releases/2026.45, channel is release, and version is 2026.45.0. | pass (C1: explicit Git checkout and stamped 2026.35.0; release-create-consumer/result.json) |
Not checkable by hand: all possible crash timings, remote implementations, or
arbitrary external writers. The non-atomic option is a product choice with a
partial-progress boundary; one successful invocation cannot establish stronger
atomicity. No interruption result above should be marked passed from source
reading alone.
3.3 - Bazel setup, affected tests, and diagnostics
Direct Bazel commands, Git-aware test selection, and local configuration reports
Run Bazel directly from the owning workspace:
bazel test //path/to/package:all
bazel build --config=release //projects/autoscroll/releases:bundle
The repository’s Bazelisk configuration pins Bazel. Per-user output and resource
defaults belong in ~/.bazelrc; the repository setup guide
describes the agent setup and its managed host configuration. No AL command or
named agent profile is required to build or test. Bazel owns argument parsing,
progress, signals, and exit status.
The root release configuration enables stamping through the installed AL command.
See Build one project for prerequisites and
source-version selection. It does not start another Bazel client during a build.
Bazel actions use declared outputs and Bazel-managed temporary storage, and
tests use their test temporary-directory contract. Repository-updating host
tools that need scratch accept or derive an explicit task/run path under
out/<task>/; do not propagate ambient TMPDIR, TMP, or TEMP to the whole
build.
Test affected targets
Use al bazel test to select tests affected by changes since an explicit Git
base, then run those tests with ordinary Bazel:
al bazel test --base master --dry-run
al bazel test --base master
al bazel test --base master //projects/example/...
Target patterns must be absolute; the scope defaults to //....
--workspace PATH selects another Bazel workspace, resolving a relative path
from the current directory. Otherwise discovery starts from
BUILD_WORKSPACE_DIRECTORY when present or the current directory and finds the
nearest workspace root. The base is resolved in the enclosing Git repository
and must have one merge base with HEAD. Selection includes changes from that
merge base through the working tree, staged edits, and nonignored untracked paths.
Bazel queries map changed source files to their reverse dependencies and tests
within the requested scope. Deleted, unknown, configuration, or outside-workspace
paths select the full test scope when a narrower set cannot be established. A query failure
fails the command; partial query results are not accepted as a complete test
selection. The scope belongs to one workspace; check other affected nested
workspaces separately.
When selection narrows the requested tests, work needed only by unrelated tests
stays outside the test invocation. Missing or evicted cache entries for that
unrelated work therefore do not trigger rebuilds or reruns. The dependency query
still loads the requested graph, and selected tests use Bazel’s normal cache
behavior. No speedup is guaranteed for a particular change.
The command prints one JSON selection on stdout before any tests run. Query
diagnostics and all test output go to stderr. Its bazel/test_selection/v1
report contains the resolved workspace/base/merge base, requested scope,
Git-root-relative changed_paths, selection, reasons, tests, and dry_run.
selection is affected, full_scope,
or no_changes; fallback reasons identify the paths that prevented narrowing.
No changed paths means no Bazel query or test invocation. An empty test selection
also succeeds without invoking tests. Wildcard scopes exclude root targets with
the literal manual tag before expanding test suites. An explicitly named test
or suite remains eligible, as do the members listed by an eligible suite,
including manual-tagged members. Ordinary Bazel test filters can further filter
the selected labels.
--dry-run skips test execution but can still run dependency queries. Normal
test failures return a nonzero status; the preceding JSON is a selection report,
not a passing-test receipt. This command selects tests; it does not implement a generic
Bazel passthrough, prepare a delivery candidate, or record a validation ledger.
Use ordinary Bazel commands for builds, other subcommands, and custom invocations.
Diagnostics
al doctor --workspace-root PATH --task-scratch out/<task>/<run> is a read-only
JSON diagnostic. It reports AL and built-source identity, declared Bazelisk
pins, platform, a configured rc-file inventory, and
task scratch classification without dumping the environment or launching Bazel.
The workspace root defaults to the current directory. Select a different layout
with --bazelisk-config PATH, --source-binary PATH, and repeated --rc-file PATH.
Relative inputs resolve against the selected workspace root. For example:
al doctor --workspace-root /absolute/workspace \
--bazelisk-config config/bazelisk.conf \
--source-binary build/al \
--rc-file .bazelrc --rc-file "$HOME/.bazelrc" \
--task-scratch out/task/run
The pin-file default is .bazeliskrc. Without a source-binary override, doctor
looks for the executable built by @rules_al//:al in the selected workspace’s
default bazel-bin directory. An available comparison reports its resolved
absolute path and digest. A missing comparison file reports
source.reason: unavailable.
The rc inventory defaults to .bazelrc. Explicit --rc-file entries replace
that default and are reported relative to the workspace when possible. Doctor
does not read those files, verify their existence, or discover Bazel’s imports;
the list describes the supplied configuration and does not establish effective
Bazel options. Reading the required pins or available source
binary can fail the command; an unavailable comparison or conflicting scratch
classification remains a report finding.
Installation
From this repository’s root, install or update AL with:
bazel run //tools/al:install
The shared binary installer atomically copies the executable to
~/.local/bin/al with mode 0755. It accepts
-- --directory /absolute/path for an isolated destination. After every
code update to this project, rerun the install target; the installed binary is
not updated automatically.
3.4 - Repository delivery
Guarded Git and pull-request delivery
al delivery implements the deterministic part of repository delivery. It
invokes native Git and a selected forge CLI; it does not infer task ownership,
choose validation commands, resolve conflicts, or judge review feedback.
Status and immutable changed-path inventories, and preparation receipts,
support complete output up to 4 MiB so large source relocations can use the
guarded workflow. Stable reads and writes enforce that
limit; other typed local records retain their 256 KiB limit. Receipt schema,
scope, integrity, and publication checks apply at either size.
Build and install
@rules_al//:al builds the current local source. Install the standalone
command explicitly:
bazel run //tools/al:install
al delivery provider
Installation atomically replaces ~/.local/bin/al with mode 0755.
Ensure that directory is on PATH. It copies the executable rather than
linking to Bazel outputs, so it remains available after those outputs are
removed. Rerun the target to update an installed command after source changes.
No AL executable cache or binary download is involved.
For an isolated installation, pass an absolute destination directory:
bazel run //tools/al:install -- --directory "$PWD/out/install/bin"
Provider and delivery workflow
Run delivery commands from this Git worktree’s repository root, which owns the
root MODULE.bazel and imports rules_al. This also applies when changed
files belong to a nested Bazel module: its workspace does not own the delivery
target. Use the same feature worktree, not another checkout. The Bazel entry
point builds AL from the current source. Detect the provider without printing a
credential-bearing remote URL:
bazel run @rules_al//:al -- delivery provider
The installed al delivery command is an optional direct entry point. An
execution failure or delivery refusal requires diagnosis. All examples below
use the Bazel entry point.
The repository’s delivery skill
owns remote selection. Pass --remote <name> consistently when selecting a
remote other than the default origin. The PR belongs on the selected remote’s
forge; a GitHub or Forgejo mirror does not become the destination merely because
its tooling is available. The Forgejo procedure
uses fj when the selected remote is Forgejo, even while the AL adapter is unavailable.
The sanitized report distinguishes forge support from Git transport support.
adapter_available reports whether the forge has an adapter;
git_transport reports ssh, https, or mixed_or_unsupported by default,
and gh when that mode is explicitly selected.
delivery_transport_available is true when both captured endpoints are valid
for the selected mode: canonical SSH endpoints by default, or canonical GitHub
SSH/HTTPS endpoints in gh mode. It never reports either endpoint.
For the supported GitHub adapter, preparation, checks, and publication are
separate commands:
bazel run @rules_al//:al -- delivery inspect --base master
bazel run @rules_al//:al -- delivery prepare \
--base master \
--message-file out/task/commit.md \
--receipt-file out/task/prepare.json \
--path path/to/task/file
bazel test //:repo_quality_test @rules_al//internal/delivery:go_test
bazel run @rules_al//:al -- delivery publish \
--receipt-file out/task/prepare.json
bazel run @rules_al//:al -- delivery verify \
--receipt-file out/task/prepare.json
Use --rewrite <inspect.local_head_oid> when replacing an existing owned
single-commit candidate, or --consolidate <inspect.local_head_oid> for an
explicitly reviewed task-owned multi-commit range. The inspected value must be
carried literally.
To add a co-author to agent commits, set the account’s global Git configuration
key al.deliveryCoAuthor to one Name <email> identity. prepare adds the
configured identity once in the final trailer block, immediately before the LLM
disclaimer. Use the account’s global Git file directly. The lookup excludes
included and repository-local files.
prepare performs Git preparation and writes the typed receipt. It does not
invoke Bazel, select affected targets, or produce a validation plan. Run the
normal build, test, and lint commands appropriate to the changed components
after preparation. The test command above is an example for delivery changes,
not a complete check selection for every task. Use each target’s owning
workspace, ordinary Bazel options, and Bazel’s normal cache behavior.
Inspect the check results before publishing. Failed checks leave the prepared
candidate available for diagnosis; AL does not record a check ledger or enforce
their outcome. After fixing source, prepare the changed candidate again. If
the candidate is unchanged, rerun the relevant ordinary Bazel checks without
creating another commit merely to retry them.
publish --receipt-file PATH verifies that current HEAD and tree match the
prepared candidate, requires a clean index and unchanged prepared scope, and
checks the remote lease and PR expectations before publication. The receipt binds Git state; it
does not assert that checks passed.
If push and PR synchronization complete but final verification fails,
publication_verification_pending retains the known candidate and PR identity
with verified: false. Preserve that report, link the known PR, and use
verify --receipt-file PATH while the original candidate remains checked out
to inspect the postcondition before deciding whether any mutation needs recovery. Do not infer that a failed final read
undid a successful push.
A PR update failure after the push also retains publication_verification_pending
with its candidate, observed remote head, and existing PR identity. GitHub’s PR
object can still report the exact previous head even though Git and the branch
API already identify the prepared candidate. Generic inspection remains strict.
For that exact receipt-bound state, explicitly synchronize only the historical
PR projection:
al delivery recover-pull-request --receipt-file out/task/prepare.json
Retain --git-transport gh when that transport is bound by the receipt. Recovery
requires the original receipt, same repository/endpoints/refs, exact already-pushed
commit/tree/scope, and unchanged PR identity, author/draft state, and prior or
desired projection. It rejects third heads, changed remote refs, human edits,
replacement PRs, and missing PRs. It preserves later local commits, index and
working files, and the receipt. It never pushes, rebases, or creates another PR.
An already synchronized PR needs no further mutation.
The recovery report’s head_oid is the historical prepared commit; local_head_oid
can be later local progress, and pushed is always false. Status
pull_request_synchronized verifies only the PR projection, without claiming
checks or remote review of current source. If mutation verification fails,
pull_request_verification_pending retains the known identities. Inspect the
actual remote/PR state before choosing another recovery attempt. After recovery,
resume normal inspection, preparation and validation for the current candidate;
ordinary publish and verify still require the exact clean prepared source.
To synchronize a prepared, task-owned, single-commit feature branch with an
advanced base before prepare, use the guarded adapter workflow:
bazel run @rules_al//:al -- delivery rebase --base master
The command refuses dirty trees, divergent remote feature tips, multi-commit
or merge-containing ranges, and incompatible pull-request metadata. It fetches
fresh refs, replays the commit in an isolated worktree, preserves signature
requirements, and reports the literal local head and captured remote lease.
It does not push or update the PR. Prepare the resulting candidate, run its checks,
then publish through the receipt-bound workflow. When the remote feature exists,
authorize its exact captured replacement only after confirming that all prior
task-owned progress is preserved. The later publisher refreshes both refs and
uses its exact lease; a rebase report is not validation evidence.
Remote rewrites use rewrite-authorize to write a typed, non-authorizing
authorization receipt (old remote OID, new head OID, owner root, task paths,
provider ownership), then prepare --rewrite-authorization <file> instead of
raw --replace-remote handoff. Review replies accept --goal-ref,
--delivery-ref, and --defect-id durable join references.
prepare refuses a divergent remote feature tip by default. Use
--replace-remote <literal-inspect.remote_head_oid> only after the
al-rebase workflow has preserved that exact old tip and established
that it is task-owned history the user authorized rewriting. Never infer the
OID or use this escape hatch for shared, stacked, human-owned, unrelated, or
ambiguous history. A mismatched, malformed, absent, or unnecessary
authorization is refused. The final fresh snapshot and preparation receipt
bind the same old remote OID for the later exact force-with-lease push.
prepare --consolidate <literal-inspect.local_head_oid> is the explicit
ownership authorization for replacing a multi-commit feature range with one
aggregate commit. It is not inferred from author names. The adapter still
requires a merge-free linear chain, one author and committer identity across
the range, the ownership disclaimer on its oldest commit, pull-request
metadata matching the requested aggregate message, and the exact inspected
head.
It preserves any signature requirement found in the range and keeps the
fetched remote feature tip as the publication lease. --consolidate and
--rewrite are mutually exclusive.
When a clean replay onto an advanced base makes an expected aggregate path
disappear from the resulting diff, the adapter accepts that shrink only when
the prior candidate and the new base have byte-identical Git tree entries at
that path. A new path, a non-identical disappearance, or an entirely empty
aggregate remains a refusal. The derived receipt records the reduced exact
aggregate path set.
For a message-only amendment, use
prepare --message-only --rewrite <exact-oid> with the new message and a
preparation receipt. Run the checks appropriate to that changed commit before
publishing through the same receipt-bound workflow.
SSH is the default Git transport, accepting canonical SCP-style or ssh://
fetch and push endpoints. Select --git-transport gh explicitly to use GitHub
CLI credentials over HTTPS. This mode accepts canonical GitHub SSH or HTTPS
remotes, derives the HTTPS endpoint for the captured repository, and uses the
selected --forge-cli executable (default gh) as a host-scoped credential
helper. It never reads tokens into AL, imports global Git configuration,
runs gh auth setup-git, rewrites remotes, or falls back automatically.
Authenticate using gh auth login when needed, then pass the same transport
selector throughout inspection, preparation, publication and verification:
al delivery provider --git-transport gh
al delivery inspect --git-transport gh --base master
al delivery publish --git-transport gh --base master \
--receipt-file out/task/prepare.json
Preparation receipts also bind transport mode; legacy receipts imply SSH.
Changing modes requires preparing a new receipt. HTTPS transport verifies TLS,
disables redirects and proxies, resets ambient credential helpers, disables
prompts and credential diagnostics, and rejects credentials in endpoint URLs.
gh authentication uses its configured credential store or supported token
environment variables; secrets do not belong in command arguments or output.
GitHub API preflight uses the selected forge CLI in both Git modes. An HTTP
401 there is independent of --git-transport. A sandbox can prevent the CLI
from retrieving a valid stored credential: the same login can succeed outside
it. AL’s HTTP 401 diagnostic points to an approved-context comparison; it does
not retry, extract tokens, change login state, or escalate itself. Follow the
delivery skill’s authentication recovery
procedure before requesting a new login or changing transport.
prepare writes a strict versioned receipt under an ignored
out/<task>/ directory. The receipt binds the prepared head and tree to the
exact worktree and Git directories, fetch and push endpoint digests, sanitized
repository identity, forge adapter, base and head refs, fetched base, expected
remote feature ref, expected pull-request identity or absence, and immutable
aggregate path scope. The file contains no
remote URL, must remain untracked, and is installed with mode 0600 by atomic
rename. It is a consistency record, not an unforgeable authorization token.
The adjacent receipt lock serializes receipt transitions and reads performed
by cooperating al delivery processes. Keep the ignored receipt path
trusted and do not edit, replace, copy over, or otherwise write it while
prepare, publish, or receipt-bound verify is running. Stable byte and
revision checks detect changes visible before their checks, but operating
systems do not provide a portable atomic
pathname-content compare-and-swap. A same-user process that ignores the lock
can race the final comparison and rename; the tool does not claim to exclude
that writer. A persistent exclusive revision-claim sidecar would have the same
trust boundary, while a crash before installation could strand the receipt
without a safe automatic cleanup decision, so it is not used.
Use repeated --path flags for fully task-owned paths, or pre-stage only
task-owned hunks and use --use-index. Both modes bind the complete existing
feature diff, not merely the paths newly staged by that invocation.
--message-only --rewrite <exact-oid> preserves the tree but changes the
commit OID. Consolidation also changes the commit OID and parent structure.
Every prepare, consolidation, or message-only amendment therefore requires a
validation decision bound to its returned exact head. Run required checks
after preparation by default. For a tree-preserving amendment, prior passing
evidence may be reused only after recording its exact prior candidate, the
matching tree OID, the new OID, and unchanged inputs relevant to each check.
Those inputs include commands, tools, configuration, and environment. Rerun
checks affected by commit identity, history, or stamping, and any check whose
input stability is unknown. The caller owns and records this applicability
judgment; the receipt neither proves validation nor authorizes reuse.
When an authorized remote replacement is pending, rewrite evidence accepts an
existing pull request only if its metadata matches the exact projectable local
or fetched-remote commit projection. A legacy remote tail that lacks an
aggregate disclaimer cannot block a matching local aggregate, and unrelated
pull-request text remains a refusal.
Publish and receipt-bound verify require current HEAD and tree to match the
receipt, a clean index, and no unstaged or untracked changes in the prepared
task scope. Unrelated unstaged and untracked files are preserved when no rebase
is needed. A required rebase demands a fully clean worktree and index.
Preparation receipts do not make later source edits part of the candidate.
If the base advances after preparation, publish rebases the exact captured
commit in an isolated ignored worktree and updates the preparation receipt.
It exits nonzero before pushing with status checks_required, identifying
the new head, tree, and derived receipt. Run the normal Bazel checks against
that candidate, then retry publish --receipt-file PATH with the same receipt.
Do not run prepare again unless content or the commit message must change.
A receipt also supports a guarded retry when the remote already equals its
prepared head but PR creation or metadata synchronization stopped partway
through. Inspect the current remote state first. Replacement PR identities and
any state other than the exact prior or desired projection are refused.
Multi-commit consolidation likewise requires an existing PR to equal the
requested aggregate message’s projection, so consolidation cannot silently
replace independently edited PR text.
The tool creates commits with Git plumbing and pushes one exact ref with hooks
disabled. It rejects shallow, promisor, or grafted history and ignores
replacement objects. Each network operation runs in a fresh private,
config-free bare Git directory bound to the captured endpoint, selected
transport, and repository’s canonical object database. It does not load mutable main-repo
local/worktree URL rewriting, proxy, TLS, SSH-command, or remote
configuration. Normal DNS resolution and SSH host-key verification still
apply; the tool does not claim to pin an IP address or server key. Ordinary
local Git operations still intentionally use repository identity and signing
configuration. Fetches use isolated temporary refs without pruning, then
install exact private refs locally; pushes use an exact force-with-lease.
Repository-required hook checks remain the caller’s responsibility and must
complete before publication.
The feature-ref lease and base-ref checks are separate because Git forges do
not offer a cross-ref compare-and-swap. If the base advances in the narrow push
window, the feature ref may be visible briefly before the tool detects the
race and attempts an exact guarded rollback. Coordinate consumers that react
immediately to branch-update webhooks.
Review workflow
Start with a bounded structured inventory:
bazel run @rules_al//:al -- delivery review inspect
For authorized feedback on a clean exact prepared candidate whose publication
is verified, use one command:
bazel run @rules_al//:al -- delivery review address \
--receipt-file out/task/prepare.json \
--thread-id <thread-id> --body-file out/task/reply.md
address checks the exact prepared candidate and verified remote publication,
derives current provider guards, posts the reasoned reply, saves its receipt,
and resolves the thread. It does not run checks or read validation logs.
The default reply receipt path is derived from the preparation receipt
and thread; --reply-receipt-file selects an explicit path in the same task
directory. A durable attempt checkpoint beside that file prevents duplicate
replies after interruption, success, or an unknown reply outcome. Retry with
the same paths after an explicitly reported read-failure restoration to resume
resolution using the unchanged receipt and expiry. Expired, consumed, or
changed authority stops without reposting. Inspect the actual remote state
before explicitly selecting a fresh receipt path for recovery. Keep checkpoints
trusted and do not delete them to bypass this protection.
Thread inventory includes each thread’s first comment page in its enclosing
request. Only additional comment pages need separate queries. All pages retain
shared byte, node, request, cursor, and metadata consistency checks.
The low-level commands remain available. Carry values from the latest inspection literally. All mutations require the
pull-request node ID, expected head, and pull-request expectation digest. A
top-level reply also requires the
reported last-comment sentinel and top-level inventory digest:
bazel run @rules_al//:al -- delivery review comment \
--pull-request-id <pull_request.id> \
--expected-head <pull_request.head_ref_oid> \
--expected-pull-request-digest <pull_request_expectation_digest> \
--expected-last-top-level-comment \
<expected_last_top_level_comment> \
--expected-top-level-comments-digest \
<expected_top_level_comments_digest> \
--body-file out/task/comment.md
Thread replies and resolutions additionally bind the thread, its last comment,
and its complete expectation digest:
bazel run @rules_al//:al -- delivery review reply \
--pull-request-id <pull_request.id> \
--expected-head <pull_request.head_ref_oid> \
--expected-pull-request-digest <pull_request_expectation_digest> \
--thread-id <review_threads[index].id> \
--expected-last-comment-id <review_threads[index].comments[-1].id> \
--expected-thread-digest <review_threads[index].expectation_digest> \
--body-file out/task/reply.md \
--reply-receipt-file out/task/reply.json
bazel run @rules_al//:al -- delivery review resolve \
--pull-request-id <pull_request.id> \
--expected-head <pull_request.head_ref_oid> \
--expected-pull-request-digest <pull_request_expectation_digest> \
--thread-id <review_threads[index].id> \
--expected-last-comment-id <review_threads[index].comments[-1].id> \
--expected-thread-digest <review_threads[index].expectation_digest> \
--reply-receipt-file out/task/reply.json
bazel run @rules_al//:al -- delivery review request \
--pull-request-id <pull_request.id> \
--expected-head <pull_request.head_ref_oid> \
--expected-pull-request-digest <pull_request_expectation_digest> \
--reviewer <login>
Comment and reply bodies must be ignored files under out/<task>/; the tool
adds the exact comment disclaimer. Resolution requires the strict reply
receipt written by review reply, and the receipt must still match the exact
pull request, head, thread, reply, body, and complete bounded review inventory
projection. The parent pull-request UpdatedAt is a nondecreasing floor,
rather than an exact value, because reply side effects can advance it
asynchronously; every review, top-level comment, thread and thread comment, and
review request remains bound.
Reinspect after every mutation and use the newly reported IDs and digests for
the next one.
The one-use reply authority expires no more than five minutes after issuance.
Resolution verifies the authority window and atomically consumes the receipt
before contacting the provider. If a provider read fails or the review epoch advances before any resolution
mutation is attempted, the tool can restore the original unexpired receipt
without replacing another file or extending its authority window. Only an
explicit restoration report permits retry with that receipt; no additional
public reply is needed for that read failure.
Expiration, semantic or full-inventory mismatch, mutation failure, and an
unknown mutation outcome still consume authority. Never recreate the receipt
yourself. Reinspect the remote state and, if resolution remains appropriate,
leave a fresh reasoned reply to obtain new one-use authority.
GitHub provides neither compare-and-swap resolution nor a documented monotonic
review-thread epoch. A human resolve followed by unresolve can therefore be
unobservable if it restores identical thread and pull-request state inside the
five-minute authority window. The exact-state checks, short expiration, and
one-use consumption narrow that risk; they do not prove that such an ABA or a
change to provider metadata omitted from the bounded projection did not occur.
Do not resolve a thread that may be concurrently moderated.
GitHub does not expose atomic compare-and-swap mutations for pull-request
metadata, comments, replies, resolutions, or review requests. The adapter
checks exact expectations before each mutation and verifies the complete
result afterward, but a concurrent human change can still occur inside that
narrow provider-side window. Do not mutate an actively coedited pull request.
Post-mutation inspection failures are reported as outcome unknown; reinspect
instead of retrying blindly.
Forge adapters
GitHub is supported through the gh CLI. Forge behavior is selected behind a
Go interface and uses argument-vector subprocess calls, so another structured
CLI adapter can be added without changing delivery policy. --forge auto
selects GitHub for github.com; use
--forge github --forge-cli <gh-path> to select an explicit executable.
Unknown or unsupported forges fail before any commit rewrite or push.
Version 1 is limited to same-repository pull requests. It cannot reliably
discover or map an upstream pull request whose head lives in a fork. Treat
same-repository topology as a caller-enforced precondition: do not use the
delivery or review commands for a fork-based or otherwise cross-repository
pull request, and stop when remote or pull-request ownership is uncertain.
The adapter fails closed when it observes an unsupported or inconsistent
topology, but that refusal is not a substitute for this caller check.
The read-only provider command recognizes known Forgejo hosts, but there is
currently no Forgejo delivery adapter. Use the repository’s documented
Forgejo compatibility workflow instead of pretending GitHub operations are
portable.
4 - OpenSpec
4.1 - Specifications
4.1.1 - Project al
4.1.1.1 - Al Specification
Purpose
Describe AL, the repository command runner that prepares plugin resources and
environment variables, executes a command, and releases those resources.
Sources: project README,
lifecycle contract,
command implementation,
lifecycle manager,
Bazel package, and
toolchain registration.
Baseline source revision: 550d7e79b1f5fdbc2b6017b75178471d6914082f,
observed 2026-09-08.
Requirements
Requirement: Prepare selected plugins before command execution
al run SHALL load its supplied configurations, start the plugins selected by
--plugin_label, and append their environment values to the child command’s
environment before starting that command. It SHALL reject invocation without
a command argument.
- WHEN configuration loading and selected-plugin startup succeed
- THEN the requested command receives its arguments, inherited environment,
Bazel runfiles environment, and prepared plugin environment.
Requirement: Roll back failed resource startup
The lifecycle manager SHALL cancel sibling starts after a startup failure and
attempt cleanup for every attempted resource, including the resource that
failed to start. It SHALL return startup and cleanup failures to its caller.
Scenario: A plugin fails during startup
- WHEN one selected plugin cannot start
- THEN AL does not execute the requested command and releases resources
allocated during the unsuccessful startup.
Requirement: Retain resources until the command stops
AL SHALL wait for its command to exit before stopping plugin resources. On
cancellation it SHALL request direct-child termination, allow up to ten seconds
for shutdown, and kill and reap the child if the grace period expires.
Scenario: Cancel a command using plugin resources
- WHEN the invocation context is cancelled while the command is running
- THEN the command can use its prepared plugin resources during graceful
shutdown, and plugin cleanup follows command termination.
Requirement: Report cleanup failure
Dependency-ordered lifecycle resources SHALL stop in reverse registration
order. AL SHALL include cleanup errors in its invocation result even when the
requested command itself succeeded.
Scenario: Cleanup fails after successful command execution
- WHEN the command exits successfully but a plugin shutdown returns an error
- THEN
al run reports failure rather than treating cleanup as successful.
4.1.2 - Project bazel agent
4.1.2.1 - Bazel Agent Specification
Purpose
Describe the validated AL Bazel entry point and installation diagnostics used by repository agents.
Sources: project README,
Bazel targets,
command and diagnostic implementation,
and runner tests.
Baseline source revision: 550d7e79b1f5fdbc2b6017b75178471d6914082f,
observed 2026-09-08.
Requirements
Requirement: Validate and preserve Bazel arguments
al bazel SHALL require a recognized Bazel command and insert
--config=agent immediately after that command. Subsequent options, targets,
and arguments after a run separator SHALL pass through unchanged.
Scenario: Run a target with application arguments
- WHEN the caller invokes
al bazel run //path:target -- argument - THEN the runner constructs
bazel run --config=agent //path:target -- argument.
Requirement: Replace the runner with Bazel
The Bazel entry point SHALL resolve bazel from PATH and replace the runner
process with it, preserving the supplied environment without creating or
injecting a host temporary directory.
Scenario: Bazel receives a termination signal
- WHEN a validated invocation starts Bazel
- THEN Bazel owns the runner process and its resulting exit status directly.
Requirement: Report bounded installation diagnostics
doctor SHALL emit a read-only JSON report containing runner and available
built-source identities, Bazelisk pins, platform, configured profile and rc
paths, and task-scratch classification without dumping environment values.
Unavailable built-source identity SHALL remain explicit.
Scenario: Inspect a workspace without a built runner artifact
- WHEN
doctor cannot find the expected Bazel output for the runner - THEN the source report records that it is unavailable rather than claiming
that the installed runner matches current source.
4.1.3 - Project dns
4.1.3.1 - project-dns Specification
Purpose
Record the retirement of this project’s landing DNS infrastructure while
preserving its repository documentation and builds.
Requirements
Requirement: Keep landing infrastructure retired
The project SHALL have no dedicated landing DNS declaration, Terraform root, or
operational source export. Its documentation SHALL be published by the main site
under /docs/projects/al/ without a separate project landing page.
Scenario: Inspect the project after landing retirement
- WHEN the project tree is consumed
- THEN it contains no landing DNS declaration, Terraform DNS stage, or
landing build target, and the main site owns its documentation.
4.1.4 - Review delivery
4.1.4.1 - review-delivery Specification
Purpose
Make validated pull-request review delivery reliable and concise while preserving exact-candidate and mutation consistency checks.
Requirements
Requirement: Guarded reply and resolution
The CLI SHALL offer a single review-address operation using a published validation receipt, a thread ID, and a reasoned reply file. It SHALL derive current expectations, post at most one reply per durable reply receipt, and resolve only the verified resulting thread. A retry SHALL resume an existing valid reply receipt rather than posting another reply.
Scenario: Address a finding
- WHEN the published validated head and unresolved thread match the supplied candidate receipt
- THEN the operation posts the reasoned reply, verifies it, resolves the unchanged thread, and returns the resulting inventory
Scenario: Candidate or thread changes
- WHEN the published head differs or the target thread changes during processing
- THEN the operation refuses mutation or stops further mutation with diagnostic state
Requirement: Pre-mutation read recovery
The CLI SHALL preserve the original unexpired reply receipt when a transient provider read or advancing review epoch prevents observing a coherent inventory before any resolution mutation. It SHALL retain single-use consumption on attempted mutations, semantic mismatches, and expiry, without extending authority.
Scenario: Advancing epoch before resolution
- WHEN read-only inventory collection observes an advancing GitHub epoch before resolution
- THEN the operation reports that resolution was not attempted and leaves the original unexpired receipt available for a guarded retry
Scenario: Unknown mutation result
- WHEN a resolution mutation was attempted but its result cannot be verified
- THEN the receipt remains consumed and the tool requires fresh inspection
Requirement: Bounded complete inventory
Review inspection SHALL include every returned thread and comment while fetching the first comment page with the thread page. It SHALL fetch additional comment pages when necessary and retain request, byte, and node limits, identity checks, and duplicate detection.
Scenario: Many ordinary threads
- WHEN every returned thread has one page of comments
- THEN inspection obtains their comments without one separate details request per thread
- WHEN a thread has more comments than its embedded page
- THEN inspection follows its cursor and returns all comments or refuses incomplete state
4.1.5 - Ssh release deployment
4.1.5.1 - ssh-release-deployment Specification
Purpose
Publish release files and activate archived static websites through the
existing release tool using authenticated SSH and explicit target selection.
Requirements
Requirement: SSH deployment through the release command
The existing release deploy command SHALL use rsync over OpenSSH and accept SSH deployment metadata
alongside existing OCI deployments. An SSH-only deployment SHALL require
neither Ansible nor an OCI executable. It SHALL verify the selected host using
the configured SSH trust mechanism and reuse existing release metadata for
version and file identity.
Scenario: Deploy an SSH-only release
- WHEN a valid SSH release is selected without Soras or Ansible
- THEN the tool deploys over SSH to the explicitly configured environment
- AND an unknown or mismatched host key causes failure before upload
Scenario: Continue using OCI
- WHEN an existing OCI release is deployed
- THEN its existing deployment behavior remains available
The tool SHALL publish each file directly beneath
projects/<project>/releases/<version>/ on the selected host. Regular archives
SHALL remain files. The tool SHALL use rsync over SSH for transfer verification and temporary-file
publication, update existing filenames using rsync semantics, and preserve
unrelated retained files.
Scenario: Publish two ordinary artifacts
- WHEN a release contains a binary and a compressed archive
- THEN both are downloadable under their original filenames in the release directory
- AND the archive is not extracted and no public
files/ layer is added
Scenario: Interrupt or update an upload
- WHEN upload is interrupted
- THEN rsync reports failure and leaves previously completed files available
- AND a later successful run updates the selected filenames without deleting unrelated files
Requirement: Activate a declared website archive
Only the extract step with an explicitly designated website archive SHALL
trigger extraction.
The tool SHALL accept .tar.gz and .zip archives containing a static site
at archive root, preserve the public archive, and publish extracted content
under sites/<project>/releases/<version>/. The link step SHALL select the
completed release by atomically changing sites/<project>/current after
validation.
Scenario: Publish a new static website
- WHEN upload, extract, and link are selected for a valid archive with
index.html - THEN the original archive remains downloadable
- AND the site’s unchanged main URL serves the completed extracted release
Requirement: Reject invalid extraction and preserve the selected site
Unsafe paths, unsupported archive entries, malformed archives, insufficient
space, or missing required site content SHALL cause activation to fail.
Concurrent deployments SHALL NOT corrupt release contents or the selected
link. Failed activation SHALL leave the previous selection intact.
Scenario: Reject an escaping archive
- WHEN a site archive contains traversal, an absolute path, or a link entry
- THEN extraction is rejected without writing outside its staging directory
- AND the selected site remains unchanged
Scenario: Run out of disk space
- WHEN upload or extraction cannot complete because storage is full
- THEN the tool reports failure and preserves previously published content
Requirement: Redeploy retained sites by selecting their release
Running the link step for an existing validated extracted release SHALL
select it through the same deploy command without uploading or extracting it
again. The
version SHALL identify the retained extracted release; changed site content
requires a new version. The tool SHALL NOT introduce a separate rollback
command or delete other releases.
Scenario: Select an earlier retained release
- WHEN an operator runs link for a retained extracted version
- THEN only the site’s selected-release link changes
- AND newer retained releases and their archives remain available
Requirement: Independently selectable publication steps
SSH deployment SHALL accept an ordered subset of upload, extract, and link,
with upload as the default. Extraction SHALL use a published archive, and
linking SHALL select an existing extracted release without local payload files.
Scenario: Prepare a site before selecting it
- WHEN an administrator uploads release files and later runs extract alone
- THEN the archive becomes an extracted versioned site
- AND the current website selection remains unchanged until link is selected
Scenario: Select a retained release independently
- WHEN an administrator runs link alone with a release manifest
- THEN the current symlink selects that existing site version
- AND no archive access or rsync transfer is required
Scenario: Refuse invalid step selection
- WHEN step selection is empty, unknown, duplicated, or out of order
- THEN deployment fails before any remote change
4.1.6 - Tool cache
4.1.6.1 - Explicit tool installation
Purpose
Record AL’s explicit source-built installation boundary after removal of the
private executable cache.
Requirements
Requirement: Use explicit source-built installation
AL SHALL be built by Bazel and installed only through an explicitly requested
installation target. It SHALL NOT expose al tool or maintain a private executable
cache. Updating source SHALL NOT change an installed executable automatically.
Scenario: Update an installed command
- WHEN an operator requests the repository’s AL install target
- THEN the installer atomically copies the current source-built executable.
- WHEN a caller invokes
al tool - THEN AL reports usage failure without inspecting a tool cache.
5 - Proto
Protobuf contracts
6 - Release operations
Artifact publication, website operations, preview, and inspection
This package owns artifact identity, the project publication lifecycle, and the
website extraction and activation operations. See
the AL release documentation
for operator commands and their guarantees.
al release publish uploads artifacts; al release website extract creates a retained
site and al release website activate selects it. Each website command supports offline
preview with --dry-run; al release plan previews upload. Mutating commands
can checkpoint --receipt, while a website dry run rejects that flag.
These operations share destination selection and canonical manifest preparation.
Read-only al release inspect keeps local payload
availability independent of the remote snapshot, so operators can investigate
an uncertain publication after local build outputs have been removed.
The observation transport uses the existing strict SSH settings and content
account. Its remote script performs reads only, without locks or staging. Each
captured stream is limited to 16 KiB; overflow cancels the subprocess. Unsafe
filesystem state is reported without repair, while transport and read failures
remain unavailable evidence. A snapshot is not a lease against later changes.
7 - Vault resource provider
Invocation-scoped Vault resources for AL’s built-in injector
@rules_al//plugins/vault:config registers the provider executable and its
runfiles. Compose it with AL configuration when resources need Vault. The
repository’s shared //tools/al:config already includes this registration.
Builtin-only calls do not discover or launch an otherwise unselected provider.
Startup initializes handlers and advertises kv, op, oidc, vault_env and vault_ssh without reading
secrets in PluginStartResponse.resource_types; its optional result is absent. ResourceFetch returns ResourceResult directly from opaque settings and declared dependencies;
Vault-specific schema and dispatch remain in this package. The provider uses
generic resource data as the write payload for op resources; args holds
the operation method, path and Vault connection/authentication settings.
The provider uses
AL’s configured Vault connection/authentication, including per-resource
vault_conn and vault_auth settings. Authentication is lazy and issued tokens
remain invocation-owned.
Provider shutdown drains RPCs, revokes owned tokens and removes temporary SSH
material. OIDC requests honor cancellation, verify the configured TLS transport
and reject redirects. Template, authentication and endpoint errors omit secret
values and response contents. no_auth explicitly exports an empty VAULT_TOKEN
so an inherited token is overridden; it does not remove token-helper files.
The AL-owned local Vault and generic provider fixtures verify selected fetches,
resource templates, dependency order, failures, cancellation and cleanup without
contacting live infrastructure. The parent repository separately tests the pinned
Vault dev-server executable at //tools/al:vault_dev_server_test.