Version control and dependency diagnostics
Operational errors have stable codes and actionable recovery commands. They do not require invalid language programs: maintained store, history, queue, graph, merge and CLI tests exercise their behavior. The compiler diagnostic teaching corpus remains in diagnostics.md.
| Code | Meaning | Fixed example / help |
|---|---|---|
| E1000 | Store I/O or discovery failed | Run tenon vc init in an accessible
directory. |
| E1001 | Object hash mismatch | Preserve the store and run tenon vc fsck. |
| E1002 | Invalid object encoding or provenance | Use canonical object data and valid TENON_VC_BY
fields. |
| E1003 | Invalid or colliding tree entry | Use distinct valid UTF-8 names without separators or controls. |
| E1004 | Invalid store configuration | Correct duplicate, unknown or missing config fields. |
| E1005 | Invalid ref namespace, name, file kind or target | Use a real refs directory, a regular branch/tag file and an existing commit. |
| E1006 | Branch already exists or ref compare-and-swap failed | Choose a different branch name if it exists; otherwise run
tenon vc sync before retrying. |
| E1007 | Store or immutable tag already exists | Use a fresh directory or a different tag name. |
| E1008 | Store integrity failure, including an invalid root path or wrong object kind | Preserve the store and inspect the named path or object. |
| E1009 | Lock acquisition failed | Check store access before retrying. |
| E1015 | Invalid dependency input or arguments | Run tenon deps path/main.tn. |
| E1016 | Dependency source load or check failed | Correct the source diagnostics before requesting its graph. |
| E1017 | Checked-source parsing inconsistency | Report the input and compiler version. |
| E1018 | Graph cache or toolchain I/O failed | Correct the file access failure and retry
tenon deps. |
| E1020 | Invalid or missing worktree state | Run inside an initialized worktree; preserve inconsistent state for inspection. |
| E1021 | Invalid snapshot path or file kind | Use distinct ordinary files; remove symlinks and hardlinks from the snapshot scope. |
| E1022 | Invalid history revision or missing object | Use an existing commit, branch, tag or unique prefix of at least eight hex digits. |
| E1023 | Commit or history command refused | Check arguments; use a task branch, resolve state, and run
tenon vc sync if moved. |
| E1024 | Unresolved conflict markers | Resolve the listed conflict paths, then run
tenon vc commit -m resolved. |
| E1025 | Invalid branch command or missing protected ref | Run tenon vc branch task-name from an initialized
worktree. |
| E1026 | Branch origin is not protected history | Create the branch from the protected tip or a protected ancestor. |
| E1027 | Switch refused or unknown branch | Commit or resolve changes, then run
tenon vc switch branch-name. |
| E1028 | Branch deletion refused | Switch away first; protected and queued branches cannot be deleted. |
| E1029 | Unsafe or failed materialization | Choose an empty destination without user symlinks. Inspect any reported fork rollback failure before retrying. |
| E1030 | Item merge conflict | Resolve the marker files and commit before submitting again. |
| E1031 | Malformed or missing merge input | Preserve the store, run tenon vc fsck, and
inspect the named objects. |
| E1032 | Incompatible merged paths or formatter normalization failed | Resolve case-folding path collisions, or reformat the old module with the current compiler. |
| E1033 | Invalid sync invocation or ref state | Run tenon vc sync inside a task worktree. |
| E1034 | Sync requires clean or resolved state | Resolve outstanding conflicts or commit edits before syncing the protected tip. |
| E1035 | Gate binary or probe failed | Check configured probe commands and toolchain access. |
| E1036 | Gate failed or could not execute | Correct the gate failure before submitting the branch again. |
| E1037 | Invalid gate invocation or configuration | Set a validation command in the store config, then run
tenon vc gate. |
| E1038 | Queue input or protected-history check failed | protected branch kept moving; retry queue leaves
the entry active for runner retry. Other queue input /
protected-history failures are terminal: commit changes, resolve
state, configure a gate, and retry
tenon vc land. |
| E1039 | Invalid landing wait or timeout | Use tenon vc land --wait --timeout 120. An
invalid value leaves the queue untouched. An elapsed wait leaves
the entry queued. |
| E1040 | Ownership policy or required approval failed | Obtain exact-source owner/admin approval before resubmitting. |
| E1041 | Approval invalid or unavailable | Invalid/missing approval is terminal: set
TENON_VC_BY=agent=owner and approve the current
source commit before resubmitting. Approval-file I/O leaves the
entry active: correct file access and restart the runner to
retry. |
| E1042 | Queue I/O failed or a terminal receipt is malformed | Queue I/O leaves the entry active (retryable). Inspect the queue store and correct the I/O failure; a malformed terminal receipt still requires inspection and correction. Then restart the runner to recover its active entry. |
| E1043 | Invalid affected arguments | Run tenon vc affected --since revision or
--mine. |
| E1044 | Affected history or graph workspace unavailable | Correct the named input; unknown graph inputs conservatively
produce all. |
| E1045 | Invalid garbage collection invocation or lock failure | Run tenon vc gc with access to the store lock
directory. |
| E1046 | Garbage collection integrity or sweep failure | Preserve the store and run tenon vc fsck before
retrying. |
| E1047 | Workspace acquisition or provenance validation failed | Check the source store, trusted TENON_VC_BIN, selected policy and host lease ownership. |
| E1048 | Workspace finalization failed; work retained | Inspect the retained lease and protected recovery state before retrying checkpoint or release. |
| E1049 | Invalid merge-file inputs | Run tenon vc merge-file base.tn ours.tn theirs.tn
with readable files. |
Reserved: E1010–E1014 (split stores noncanonical inputs as raw), E1019.
Version-control remotes and Forge hosting
| Code | Meaning | Fixed example / help |
|---|---|---|
| E1100 | Unsupported wire or tracking-snapshot version | Use a peer that supports tvc-wire 1. |
| E1101 | Invalid remote URL, credential file, control document, tracking snapshot, pack page, or fragment framing | Use a supported endpoint and a private credential file. Check fields, order, lengths, pinned entries, and page digest. |
| E1102 | Wire or closure limit exceeded | Reduce the requested transfer or choose a repository within the v1 limits. |
| E1103 | A closure object is missing or object slices are incomplete | Fetch the complete verified history or resume the interrupted object. |
| E1104 | A closure edge has the wrong object kind, or the graph is cyclic | Inspect the named object and rebuild the malformed closure. |
| E1105 | The expected branch tip or ref snapshot is stale | Retry fetch. For a push, fetch and reconcile the branch before pushing a new commit. |
| E1106 | Push admission policy denied the update | Push an unqueued writable branch which advances by fast-forward. |
| E1107 | Remote repository, resource, or session is unavailable to the caller | Check the endpoint and credentials or retry the transfer. |
| E1108 | Remote authentication is unavailable or expired | Provide an active bearer token. |
| E1109 | The grant does not cover this actor, repository, or operation | Use the original account and an exact repository read or push grant. |
| E1110 | The connection, Forge service, identity store, or clock is unavailable | Check the local service, identity store, and clock before retrying. |
E1111–E1149 are reserved for later remote and hosting diagnostics.