~ knotless Search/
↑↓ move↵ open⇧↵ all results

chadtmiller.com/knotless

git that lives in your Atmosphere account

knotless.dev
1 collaborator

knotless 0.13.0 Latest 2 packages, 1 image

1
10

knotless commits as git does on your machine, and a runner as knotless

Merged
Merged chadtmiller.com asked to merge into main from chadtmiller.com/knotless:identity/commits-as-git

What changes

On your machine, knotless commits as git does. The CLI and MCP over stdio author repo commit (with no --author) and commit merges, squashes, branch updates and reverts as git var GIT_AUTHOR_IDENT / GIT_COMMITTER_IDENT give them with user.useConfigOnly: user.name and user.email, or GIT_AUTHOR_* and GIT_COMMITTER_*. Where git has no identity it would not guess from the machine's name, they fall back to the account, its handle at <did>@knotless.invalid, as before.

Servers acting for accounts are unchanged. The pages, MCP over HTTP and a gateway's commit with no author named still use the account (Signer::Account, the default).

A runner commits as knotless, at its account's <did>@knotless.invalid: the committer of the queue's squashes and auto-merges, and the author and committer of a workflow's write-back (was knotless-run, or the runner's handle).

Env::signer (Signer::{Account, Git, Runner}) carries this; knotless's cli::main and knotless-mcp's main set Git, knotless-run's main Runner. emails::signature names whoever commits; forge::committer and queue::stack take the Ctx for it.

Why

On GitHub, or any mirror of a knotless repository, commits authored or committed as <did>@knotless.invalid show as someone unlinked: that address can never be verified there. knotless's own history had 19 commits authored so (agents' repo commits and the runner's write-backs), missing from their author's contributions, and every merge committed by a DID address under the merger's or runner's handle, which changed name as the runner's account did. GitLab commits a squash as the merger, GitHub and Tangled as the forge itself; here, the merger as git knows them on their machine, and the runner, which is a separate actor, as knotless.

How it was checked

  • knotless/tests/cli.rs: repo commit with no author, in process, is the account; through the binary, Test <t@example.com> for both author and committer.
  • knotless-serve/tests/forge.rs: a squash merged by the binary keeps the head's author and is committed as Test <t@example.com>.
  • knotless-serve/tests/gateway.rs: a queue batch stacked as a runner is committed by knotless <runner did>@knotless.invalid.
  • knotless-run/tests/run.rs: the write-back's author is knotless.

Shortcomings

The history already made keeps its identities: rewriting it would change every hash pulls, checks and releases name. git var reads the config of the repository in the directory knotless runs in, so a per-repository user.email counts only when run from that checkout's top.

Approved

This adds Env::signer (Account, Git or Runner). The CLI and MCP over stdio now commit as git var GIT_AUTHOR_IDENT and GIT_COMMITTER_IDENT give them, read with user.useConfigOnly. Without a git identity they fall back to the account, as before. The runner commits as knotless at its account's <did>@knotless.invalid.

I read the whole diff and found nothing that must change.

  • emails::signature falls back to the account whenever git has no identity, including when only one of name or email is set. That matches the "git would not guess" rule.
  • Servers keep the default Account, so the pages and MCP over HTTP behave as before.
  • ident is now shared with claim_first, and that behavior is unchanged.
  • The runner write-back's knotless author is hardcoded in knotless-run/src/lib.rs rather than taken from the signer. It matches Signer::Runner's output.
  • Callers of committer, squash_commit and stack are updated, tests cover each path, and the docs pages and change file are included.

I did not read the checks' results.

Approved

I read the change since my approval. It only updates the expected pack counts in repository_lifecycle in crates/knotless/tests/cli.rs, from 2 packs to 3. The new count presumably comes from the extra commit the new tests make. It doesn't affect the behaviour I approved earlier, so that approval stands. I didn't read the checks' results.

Merged as 1baa04d