Skip to content

tacctl 0.2.29 - #47

Merged
rett merged 76 commits into
masterfrom
release/0.2.29
Nov 10, 2026
Merged

rett merged 76 commits into
masterfrom
release/0.2.29

Conversation

@rett

@rett rett commented Nov 10, 2026

Copy link
Copy Markdown
Owner

release 0.2.29

rett added 30 commits November 9, 2026 10:09
AGENTS.md now holds what CLAUDE.md held (commands, rules), with a
"Read first" list of pointers, a "Development environment" section
(where the Go and linter pins live, what `make bootstrap` and
`make doctor` do) and a line on how the whole-suite runs are gated.

The authorship rule now says the owner authors the commits made with
the project's own tooling, with one exception: an outside pull request
keeps its contributor as author and is merged with a merge commit.

The one reference that pointed a reader at CLAUDE.md for the acceptance
commands (docs/plans/apply-deferred.md) points at AGENTS.md. CLAUDE.md
is left as it is; the next commit reduces it to an import.
CLAUDE.md is the single line `@AGENTS.md`; the instructions live in
AGENTS.md. This commit is its own change and can be reverted on its
own, which restores the previous CLAUDE.md content (AGENTS.md stays).
Describes the branches, what a change carries (CHANGELOG item, man page and
docs page, examples from the table, no private names or trailers), how
authorship is kept for outside pull requests, the checks before a pull
request and where releases are described. The commands and rules stay in
AGENTS.md.
The header said every commit has the owner as author. State the exception:
commits of outside pull requests keep their author and are not listed.
No mapping line changes.
A read-only, no-network check that prints one line per item (ok, missing
with the one-line fix, or expected with why this host may lack it) and
exits 1 when anything is missing. It covers the pinned Go (GO_VERSION of
bin/tacctl.sh) with gofmt and a C compiler, golangci-lint at the
Makefile's pin, the tools whose absence makes tests of internal/cli and
internal/console skip silently (the list in test.yml), the bats
submodules and the 0.2.2 tag, then the optional tools (GNU parallel,
PyYAML, podman, weasyprint) and the host (/dev/shm, root or sudo, the
private-pattern file) as expected. The pins are read from where they
live, so a bump needs no change here.
The target passes the Makefile's GO, GOFMT and GOLANGCI_LINT to the
script, so the check looks at the same tools as lint-go and gate-go.
Each release and A hotfix now follow the flow that runs: release verify,
start, push and finish, then the after-steps assets, sign, publish,
reproducible, site and prune, each with who does it and what proves it.
The checks before the first step, the signing step and the host check keep
their content; the hand-run git-flow commands move to a last section for a
release made without the tooling.
… declared gates

The dependency comment lists github.com/pkg/sftp and kr/fs, which go.mod
has; the structure listing and the Working rules name AGENTS.md and
CONTRIBUTING.md; the gates rule names the declared gates (make lint and
make gate-go per feature, make gate-ci per release); the release rule says
when release-reproducible runs.
bin/tacctl.sh installs Go only when it is missing or older and never
replaces a newer one, so the Go check of make doctor now accepts a Go
equal to the pin or newer (compared with sort -V) and says so when it
is newer. An older or unknown version is still reported missing.
Right after a release the CHANGELOG has no unreleased section. Say to
add the item under the next version's heading and to create that
heading above the newest release section when it is missing.
The Gates rule read awkwardly after an earlier edit. It now says what
runs per feature (make lint, the static checks, make gate-go) and per
release (make gate-ci), then continues unchanged. The project-structure
listing notes that tests/tools/doctor.sh is make doctor.
…metadata

The release metadata is made in step 2 (Start) and checked again before
the assets in step 5 (Assets); the failure message said step 1. Nothing
in tests or docs expects the old text.
…se assets

The assets verb builds the files in a clean detached worktree of the tag
under qargi's state directory and prints its path; it never touches the
repository's own dist/release. The sign verb is what the key holder runs in
their own terminal: it runs ssh-keygen -Y sign and make release-verify in
that worktree and records the result, which the publish verb waits for.

Step 5 now says where the files are, and step 6 leads with the sign verb.
The raw ssh-keygen and make release-verify lines stay, as what it runs and
what to run by hand in a checkout of the tag after make release-assets.
The dated CHANGELOG heading, the .TH date and version and the release notes
are checked by tests/tools/release-preflight.sh, which make release-assets
runs, but only after the finish has pushed the tag, and a pushed tag is
final. The start runs only release-notes-check.sh, which accepts an
(unreleased) heading, and neither the gate nor the pull request checks look
at the metadata. Step 4 now runs the preflight on the release branch before
the finish, and the paragraph that claimed the gate, the start and the
checks covered it says what covers it.
The start verb with --hotfix checks, before changing anything, that the
CHANGELOG has content under its unreleased heading and runs the stored
preflight (release-notes-check.sh), which wants the release notes, a numbered
section of the version and rollbackFrom equal to it. On master none of that
exists before the hotfix branch does, so the start is refused. The section
said to run it and to date the heading by hand, which also contradicted
step 2.

It now says the start is refused for this project, cuts hotfix/VERSION by
hand, lists what the branch commits (the fix, the dated CHANGELOG section,
the notes, rollbackFrom, the .TH line), runs both checks, and uses the push
and finish verbs. It also says the route has not been exercised with the
tooling yet.
…e by-hand route

The text said every after-step is recorded with the step verb, but the check
on a host (step 9) is not one of them: the recorded ones are exactly assets,
sign, publish, reproducible, site and prune. It now says so.

The intro said all of the tooling's commands are plans. Only start, push,
finish, publish and prune print one; verify, assets and step print none.
Push, publish and prune also need the maintainer's go-ahead (publish and
finish take a plan token, push opens the pull request, prune deletes
branches); the table and the step texts now say so.

The by-hand route starts with the gate and the notes check, runs the
preflight before the finish, says the .TH line must carry the same date and
version as the CHANGELOG heading (the note of the earlier text), and its tail
now runs to step 11 and not 10.
With GOTOOLCHAIN=auto and a go.mod newer than the local Go, go version
run from the repository root may download a toolchain. Pin it to the
local binary, as tests/tools/release-stamps.sh and bin/tacctl.sh do, so
the doctor reports the version of the Go it found and never uses the
network. It is the only go call the script makes.
set -u made the script stop with 'HOME: unbound variable' when HOME was
unset, at the golangci-lint candidates and at the private-patterns path.
Use ${HOME:-}: the two home candidates for golangci-lint are skipped, and
the private-patterns item says that no path can be derived.
-x "$gofmt" tests a path, so GO=go GOFMT=gofmt was reported missing
although make runs gofmt from PATH. A value without a slash is now
resolved with command -v; one with a slash is still tested as a path.
When GOFMT is unset, the default is the gofmt beside the go the script
resolved (go itself was already resolved with command -v).
When the GO ?= line of the Makefile could not be parsed, the script fell
back to /usr/local/go/bin/go, a copy of a pin it promises to read. Fall
back to the go in PATH instead; when there is none, report 'missing go'
with the usual fix line. The gofmt default then looks gofmt up in PATH.
Without git, or outside a work tree, the tag item said 'missing
tag-0.2.2 ... git fetch --tags', a fix that cannot run. Add a git item
(ok with the version, missing with the install hint) before it. When git
is there but the root is not a work tree, or git is missing, the tag item
is 'expected' and says the tag cannot be checked.
lint, gate-go and build do not need the bats submodules, and a member
clone has them empty until make bootstrap, so reporting them 'missing'
(exit 1) made the doctor fail every such clone although AGENTS.md has
agents run it before the gates. The bats item is now 'expected' when they
are not initialised ('only the bats suite needs them') and 'ok' when
present. The header comment says what 'missing' and 'expected' mean.
The doctor prints only ok, missing and expected lines and exits 1 when
at least one is missing; the bullet named fail and error lines it never
prints. Read first points again to two things, as CLAUDE.md did: the
roadmap (backlog section 0) and the plan of the release in progress. The
last line of Commands named 'the static checks' as if it were a make
target; spell out what runs per feature and per release.
rett added 28 commits November 9, 2026 19:45
Rolling back in docs/install/upgrading.md gets a "To 0.2.28" section (nothing
is converted, no key or field is removed, no snapshot, no --yes; the file
transfer settings, the limits of the stored reports, the reports in the homes,
the marker of the offer of the PDF tools and the per-tier drop-in stay) and
says fifteen targets. The manual page, docs/cli/conventions.md and
docs/releasing.md list 0.2.28 as the release before this one, and the
CHANGELOG has item 2 of 0.2.29.

The lists of "every target but" for the break-glass firewall, the users' email
addresses, the SNMP credential files, the covered staging entries, the server
name and timing scale, the scope of the server's own login, the user's
required password change and an emergency lockdown with enrolled hosts name
0.2.28 beside 0.2.27. The file transfer paragraph says that every target but
0.2.28 removes the settings, and the limits of the stored reports are said to
be kept by 0.2.26 to 0.2.28 (docs/cli/user.md and docs/devices/reports.md say
so too). The To 0.2.27, 0.2.26, 0.2.25, 0.2.23 and 0.2.22 sections and the man
page entries name 0.2.28 where they say what the target reads. The snapshot
note quoted in the pages names 0.2.29.
In the console the words after -- are the remote command, so ssh's own
-l admin is refused, and while break-glass is held on a device only its
local accounts work. 'tacctl ssh <name|address> --login <local-user>'
(and 'device ssh', the same code path) runs ssh as the caller with
-l <local-user> in place of the caller's name.

Registered devices of any vendor only: an enrolled host is refused in one
sentence and nothing is started. The device must have a pinned host key
(refused with the device hostkey command otherwise); ssh then checks it
strictly against the pin as for a plain session. The tier is the
engineer's and up, through deviceVerbAllowed like the other --login
verbs; the device must be in one of the caller's scopes (sshAdmit, as
for every ssh). The account name goes through localAccountOf.

The device asks for the password at its own prompt. The password cache
is never used for such a line: the shell leaves it shut (askpassWords),
the invocation drops the variable unread and makes no client, so nothing
is asked, stored or forgotten, not even on status 255.

The session start and end audit lines end with login=<local-user> (no
password field); a plain session's lines are unchanged. The held-device
warning says the local account is what is used.

The usage, the explain text, the completion spec (a --login value flag
with no candidates) and the generated blocks of the man page come with
it. Tests use the fake runner and a real cache agent to check that the
cache is untouched. The documentation pages and the CHANGELOG item are in
the next commit.
Describes the --login flag of 'tacctl ssh' and 'device ssh' (previous
commit): docs/cli/device.md (the entry), docs/cli/shell.md and
docs/cli/console.md (a --login line leaves the password cache shut),
docs/cli/conventions.md (the usage list), docs/devices/connecting.md,
docs/devices/walkthroughs.md (the log lines end with login=, the DENY
reasons) and docs/devices/break-glass.md (the way in while a hold
stands). Says that the password is asked by the device and is never
cached or stored by tacctl, and that it is the engineer's.

CHANGELOG item 1 under 0.2.29 (unreleased).
…e close

A file uploaded with a mode that lacks the owner's write bit (0444 or 0555
from a read-only source, 0400 or 0500 after the umask of the console) was
created with that mode, and the size step that the OpenSSH scp ends an upload
with (an fsetstat of the size, which the library turns into a setstat of the
path, a truncate by path) failed with permission denied: truncate(2) needs
write permission, and the owner had none.

openFile now creates such a file with the owner's write bit added, reads the
mode the kernel made from the descriptor (so the umask that applied is the
one that applied, without calling umask(2), which is process-wide), and
sets that mode without the owner's write bit on the descriptor when the
handle closes, before it is closed. The result is what open(2) would have
made: 0444 under 077 is 0400.

An existing file is never touched: the create is tried with O_EXCL first (the
client's O_EXCL alone when it asked for it) and an existing file is opened
again without O_CREAT, so that the kernel's answer says whether this open
made the file. A setstat that sets the permissions of the file takes it off
the list of files waiting for their mode, so what the client sets between the
data and the close stays. A session that ends with the handle open closes it
through the library, which restores the mode too; only a process that is
killed leaves the file owner-writable, and it is the owner's own file.

The test fails without the change (the size step answers status 3). The
console page, the manual page and item 1 of 0.2.29 say it.
A version 3 attribute block with only the extended flag and a count of none is
four bytes of zero, as long as the permissions block the OpenSSH clients send,
and openMode read it as the mode 0000: the new file got no permission bits.
A four byte block with the value 0 now asks for nothing, so the file gets the
default mode (0644, 0600 after the umask of the console), and a client that
really wants 0000 sets it afterwards.

The comment of openMode and item 1 of 0.2.29 said that four bytes can only be
the permissions, which is not so; they now say that it is read as such and what
the exception is. The console page and the manual page name the mode 0.

The test covers the mode 0 and the extended flag with no attributes, under both
umasks, and fails without the change (the file is created with no mode).
The pages said that a new directory gets the mode the client asks for. It
never did: the library reads only the attribute flags of a mkdir packet
(sshFxpMkdirPacket.UnmarshalBinary) and sets no flags in the request for it, so
the handler never sees the permissions and every new directory is 0755, 0700
after the umask of the console. The console page, the manual page and item 1 of
0.2.29 now say that, and that a client that wants another mode sets it
afterwards. The comment of permBits no longer says that mkdir takes its mode
through it, and mkdir says why its branch is not reached. The new test makes a
directory with the mode 0500 and 0777 under both umasks and fails if a library
upgrade starts to deliver the permissions.

The pages and the item said that scp sets nothing after an upload and that
scp -p only gets the open's mode. Without -p scp sets the size afterwards (the
previous change); with -p the open carries the permissions and the times (twelve
bytes, read as asking for nothing, so the file is created 0644, 0600 after the
umask) and an fsetstat then sets the permissions and times, which setstat
applies as given, with no umask: a script ends with its source's mode, 0755. A
new test sends that sequence and checks the mode and the time.
…ng session

The mode a client asks for on an upload is honoured by this release (item 1 of
0.2.29). The rate-limited session that could stay a moment after the client
leaves was investigated and does not linger, so it is no longer open. The rest
of the row stays.
…a failed create gives the mode back

openNew opened an existing file without O_CREAT after the exclusive create
answered EEXIST. The kernel answers EEXIST for O_CREAT|O_EXCL before it
runs the sticky-directory checks of fs.protected_regular and
fs.protected_fifos, and an open without O_CREAT never runs them, so a file
that the single O_CREAT open of before would have refused (a file of
another user in a world-writable sticky directory) was opened and written.
After EEXIST the file is now opened again with the flags the client
asked for, O_CREAT included, so the kernel's checks apply as they did;
that also removes the retry loop and the ENOENT an O_CREAT open could end
in after three lost rounds. The comment of openNew said a client that does
not close the handle leaves the file owner-writable: the session ending
closes every handle (TestOpenModeWithoutOwnerWriteSessionEnds shows it),
only a killed server process leaves it. It now says so, and that a second
handle on a file that still waits for its mode loses its size step when
the creating handle closes first.

The errors of openFile after a create and before the file is registered
(a second name, a descriptor that cannot be made blocking, a failed
truncation) left the file at the mode asked for plus the owner's write bit
for good. They now go through one function that sets the asked mode on the
descriptor before closing it. The new afterOpen seam lets a test give the
file a second name between the open and the check.

The documentation and the changelog say that an interrupted upload of a
read-only source ends read-only, and that resuming it is refused.
The close of a file this open created owner-writable put the mode the
client asked for back whatever the file had by then, so a chmod made by
another session or by the user's shell between the data and the close was
overwritten; only a setstat of the same session was remembered. The open
now keeps the mode the kernel gave the new file, and the close looks at the
descriptor and gives the asked mode only to a file that still has exactly
that mode. The setstat of the permissions in the same session still takes
the file out of the wait, which also covers one that sets the very mode the
file had. The check and the change are two calls, so a chmod between them
is lost; the comment says so.

The documentation and the changelog say that any change of the
permissions before the close is kept.
… for the gaps of the open mode

openMode tested the raw value against zero, so a value that holds only
file type bits (0100000) counted as asking for the mode 0000: the file was
created 0200 and ended 0000. The permission bits are now tested, so such a
value, like a value of zero, asks for nothing and the new file gets the
default mode. The documentation and the changelog say "no permission bits".

Tests: the table of the request mode has the cases of file type bits and of
special bits only (they fail without the change). TestOpenModeWithoutOwnerWriteExistingFile
set the umask in a loop and put it back without defer, so a failure left
the process at 077; it uses a subtest per case and a helper that restores
the umask when the test ends. A check of the quota test that reduced to
"status is 0" says so. New tests: a directory, a symbolic link and a FIFO
at the name are refused as with any other mode and left as they were;
a umask that clears the owner's write bit makes the file and the close
changes nothing; an fsetstat of the times alone does not cancel the
restore; a file renamed before the close gets the mode, and the old name
stays empty.
The runner's sitecustomize makes Python's bcrypt salt deterministic by
replacing os.urandom. bcrypt 5.x makes the salt inside its Rust module
and no longer calls os.urandom, so the shim did nothing there and the
self-test failed ("bash against bash reports a difference") on a host
with bcrypt 5.0.

The sitecustomize now also replaces bcrypt.gensalt by a function that
builds the salt from the shimmed os.urandom(16) the way bcrypt 4.x did
(prefix, two-digit rounds, the 16 bytes in bcrypt's base64 without
padding), so the bytes-to-salt result is unchanged for the old kind.
The replacement is installed by an import hook on the first import of
bcrypt: a python3 that never uses bcrypt, or a host without it, pays
nothing and cannot fail on it.
# Conflicts:
#	CHANGELOG.md
#	docs/cli/user.md
#	man/tacctl.1
…ne finding

The case finding proposed the lower-case spelling for every user with
upper case, also for one whose name is over 32 characters. That spelling
is over the limit too, so 'user rename' refuses it: config validate
printed two Names: warnings with contradicting fixes, and --fix-names
offered the refused rename and failed every run (exit 1).

caseFindings now leaves a user over names.UsernameMax to lengthFindings,
whose warning names the rename and says when the name also has upper
case letters. --fix-names offers nothing for the user, counts nothing as
failed and exits as for a store with no fixable names.

Tests: a user that is both, through config validate text, --json and
--fix-names. The config page, the man page and the CHANGELOG item say so.
… not the last field

The pages and comments that say a session logs in as you and never as
another login now add 'or, with --login, the device's local account': the
session section of the man page, connecting.md, walkthroughs.md,
host-key-pinning.md and the package comment of the session code.

The two session log lines were said to end with login=<local-user>, but
from= and console= follow it. The man page, connecting.md, walkthroughs.md,
device.md and CHANGELOG item 5 now say that the lines carry it after the
device and address fields, with from= and console= after.

The man page writes the tier of the refusal as <tier>, as the CHANGELOG
does, and CHANGELOG item 5 lists console.md and conventions.md among the
pages it changed.
… tier is told

'tacctl device' and 'help device' listed every option of the ssh row but
--login. The row is there now, with an '(ssh)' opening: a bare text would
be picked by the help of 'device collect --login' (which has no option
line of its own and takes the shared line of onboard), since the line of
onboard names two verbs and loses to a line that names none. A test pins
both the row and the unchanged text of collect's flag.

The Requires lines of the manual page for ssh and device ssh said only
readonly, but --login needs the engineer tier. The gate sees both as
readonly rows (ssh is an AnySub row, whose note key has no sub-verb), so
the sentence is added to the notes the cli reads (tierNotes), which the
generated Requires lines, the TIERS list and the help of the device family
use; the generator trims the key of an AnySub row. The sentence belongs on
the rows of tier.Rules, as every other note does.

The help of ssh spells the value of --login as <local-user>, as the flag
does, and the comment of localLoginLine says the check also serves ssh,
device ssh and device collect.
… wording is made true

store import loaded a legacy user whose name is over 32 characters
without a word, while it says so for names with upper case. It now says
in one line how many such users it loaded as they are (they have no Linux
account; config validate lists them). A test pins the line, the maintenance
page, the man page and CHANGELOG item 3 describe it.

CHANGELOG item 2 (the rollback to 0.2.28) listed what had moved in 0.2.29
as item 1, a test and the documentation, which stopped being true with the
later items. It now says the claim it needs: no change of 0.2.29 writes a
stored file in a form 0.2.28 does not read.

upgrading.md said both that a name too long with its suffix is cut before
it and that the upgrade shortens no name. The upgrade shortens a name only
to make room for a suffix (upgrade_dots.go); a name it renames without one
keeps its length. The page and the man page say that.
docs/release-notes-0.2.29.md tells what the release is, in the form of
the 0.2.28 notes: the console keeps the owner's execute bit of an
uploaded file, a new user name is at most 32 characters with the
config validate warning for longer stored names, tacctl ssh <device>
--login <local-user>, and the rollback to 0.2.28 that converts nothing.
Every claim is taken from the CHANGELOG items of 0.2.29 and the pages
they name; the CHANGELOG list stays the full record.
@rett
rett merged commit c7c8fbb into master Nov 10, 2026
8 checks passed
@rett
rett deleted the release/0.2.29 branch November 10, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant