Skip to main content

Module project_link

Module project_link 

Source
Expand description

Local worktree → team project mapping (AP06-D01, owner decision 19.10.).

Every checkout is its own local partition (hash_project_root, AP01). lean-ctx project link maps one partition to a team project id so team commands of that checkout address the project without --project. The mapping is local state of this machine: one JSON store in the data directory, keyed by partition, written atomically, bounded. It grants nothing — the team service still decides every request — and it is never the team artifact authority (intelligence_runtime.team_artifact_projects).

Structs§

ProjectLink
One checkout’s link. Fields that are not known locally stay None and are left out of every answer rather than invented.

Constants§

CHANGE_WITH
MAX_LABEL_CHARS
Longest label kept.
REMOVE_WITH

Functions§

link
Link the checkout at link.workspace_root; returns the link it replaced.
link_for_root
The link of the checkout at root, if any. An unreadable store reads as no link here; link/unlink report it.
link_time
now as a link time: RFC 3339 UTC, whole seconds.
linked_checkouts
The other checkouts linked to the same team project (and organization) as the checkout at root, with that link: the checkouts whose convention facts root is served (AP01 §4). Ordered by partition, so a reply built from them is byte-stable. None when root is unlinked.
mapping_json
project.mapping for root: the link object, or "unmapped".
unlink
Remove the link of the checkout at root; returns it.