Skip to content

Show enforceable node assignment in nodes list, show, and claim - #75

Merged
austpryb merged 1 commit into
mainfrom
cursor/enforceable-node-assignment-5bb9
Nov 16, 2026
Merged

austpryb merged 1 commit into
mainfrom
cursor/enforceable-node-assignment-5bb9

Conversation

@austpryb

@austpryb austpryb commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

graphwatch follows enforcer-graph PR #503 (cabee17b9b601ed771b0dfeeb100661720b2bb18): a node read carries assignment_mode (advisory|required), private, viewer_can_claim, and claim_block (null|node_reserved). A claim of someone else's required node is 409 {"error":"node_reserved","detail":"this node is reserved for its assignee"}.

This repo has no vendored graph spec. The client reads those fields off the node payload; --json prints the server's bytes unchanged.

  • nodes show prints assignment: after assignee: (advisory, required (only <assignee> can run this), or required (only the <group> group can run this)). private: is printed only when true, same as reclaimable:.
  • nodes adds an ACCESS column after TIER: reserved, local, reserved,local, or -, from claim_block and private. Plain ASCII. On a terminal the table header is bold, which is the colour tables already use; the cells are not recoloured.
  • nodes claim <graph> <key|id> is one POST to the named claim. A 409 node_reserved prints graphwatch: node <key> is reserved for <assignee>; only they can run it (node_reserved) on stderr (or someone else when the node has no name) and exits 1. Assignee is the server's {account_id, group_slug} object, with a string fallback so an older payload still lists (this also unblocks decide, which was failing to decode that object).

private: true does not append "(local Qwen only)": that phrase is not a server field, and the line follows reclaimable:.

Not merged. Not deployed.

Tests

go test ./... and go vet ./.... Goldens:

  • testdata/nodes_show_advisory.txt
  • testdata/nodes_show_required_account.txt
  • testdata/nodes_show_required_group.txt
  • testdata/nodes_show_private.txt
  • testdata/nodes_list_access.txt
  • testdata/claim_node_reserved.txt
  • testdata/claim_node_reserved_unnamed.txt
Open in Web Open in Cursor 

Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

nodes show prints assignment (advisory, or required for an account or a
group) and private when the server says so. The nodes list gains an ACCESS
column from claim_block and private. nodes claim prints the node_reserved
line and exits 1. Assignee decodes as the server's object, with a string
fallback so an older payload still lists.

Co-authored-by: austpryb <austpryb@users.noreply.github.com>
@austpryb
austpryb merged commit 4206970 into main Nov 16, 2026
2 checks passed
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.

2 participants