Skip to content

Add kata status for one-line issue ownership and lease state - #335

Merged
wesm merged 5 commits into
kenn-io:mainfrom
naveenspark:feature/agent-status
Sep 3, 2026
Merged

Add kata status for one-line issue ownership and lease state#335
wesm merged 5 commits into
kenn-io:mainfrom
naveenspark:feature/agent-status

Conversation

@naveenspark

@naveenspark naveenspark commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

kata status <ref> reports, in one call, who the daemon thinks you are and who holds an issue. Until now an agent had to combine kata whoami (client-side actor only), the full kata show output, and the federation lease rules to decide whether it could safely start on an issue.

The command reads the issue and the daemon's /api/v1/instance endpoint, then prints the issue status and revision, the effective actor, the daemon instance UID, the owner, and one hold value:

hold Meaning
active A federation lease is held and not expired
expired A cached timed lease is past its expiry
pending A lease request is queued but not yet granted
assigned Open issue with an owner and no live or pending lease. This is what kata claim produces outside federation
unassigned Open issue with no owner and no lease
closed The issue is closed

When the daemon authenticated the actor, actor is the daemon's principal and actor_source is daemon; auth carries the principal kind. Otherwise actor_source is the client-side source that kata whoami reports. Expiry is judged against the hub clock returned with the issue when present, otherwise local time.

Human, --json, and --agent output carry the same fields, including lease expiry and pending lease count. The agent line has a fixed field order and includes the project name so short IDs stay unambiguous across projects. Both reference docs describe the contract.

The issue body, comments, metadata, links, and lease violations stay on kata show.

@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (c80a19f)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 4m22s

@wesm wesm self-assigned this Sep 3, 2026
@wesm wesm changed the title Add compact issue identity status Add kata status for one-line issue ownership and lease state Sep 3, 2026
`kata status` reported its lease-or-ownership state under a field named
`claim`. That name collides with the `kata claim` command, which sets
ownership: an agent that had just run `kata claim` would read
`claim=assigned` and could not tell whether its claim had worked. The
field is now `hold`, with the same six values, and the docs say that a
successful `kata claim` outside federation yields `hold=assigned`.

`actor_source` mixed two vocabularies. When the daemon authenticated the
actor it copied the principal kind, such as `db_token`; otherwise it used
the client-side `whoami` sources. Readers had to consult `auth` to know
which one they were looking at. A daemon-authenticated actor now reports
`actor_source=daemon`, and `auth` alone carries the principal kind.

The human renderer omitted the lease expiry and pending lease count that
the JSON and agent modes carried, so `hold=expired` or `hold=pending`
gave no time or count. It now prints both when present.

Generated with Claude Code (claude-fable-5-1)
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (8eb428b)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 4m17s

@wesm
wesm merged commit 88ff5b3 into kenn-io:main Sep 3, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants