Skip to content

Never author a node's Version — and always merge main before you push - #867

Merged
rbuergi merged 8 commits into
mainfrom
docs/version-authoring-and-merge-main
Aug 7, 2026
Merged

rbuergi merged 8 commits into
mainfrom
docs/version-authoring-and-merge-main

Conversation

@rbuergi

@rbuergi rbuergi commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Two rules, both learned the expensive way today.

1. MeshNodeVersioning.md — never author Version

A version committed into a source file forks the install on any fresh mesh. MeshNode.Version is the OWNER's persistence clock — [Editable(false)], minted as current + 1 — so a checked-in counter is a snapshot of some other mesh's clock:

[MonotonicWriteGuard] REFUSED a backward write to Store: incoming Version=1 is BELOW the
    stored Version=249 … forked lineage
Catalog: Install of Store failed.
→ 799 × "lacks Read permission on 'Store'" → NodeTypes never compile
→ "Store/Plugin never reached compilationStatus Ok"

The symptom names the wrong thing — a compile error, five minutes and four causal steps from the real failure. It reads as a flaky compile for as long as you let it.

Found in every node repo: 13 modules, counters as high as 4489. The authored version is SemVer and only SemVer.

Also records the warning not to "fix" a fork by relaxing the guard — which the guard's own message already says: "Find the writer that adopted a stale own-node snapshot; do not relax this guard." The writer was a checked-in file.

Verified by reproduction: bootstrap failed twice, counters stripped, bootstrap passed — locally and on CI, where Store/Plugin compiled now lands at +123s instead of timing out at 300s.

2. AGENTS.md — merge main before every push and PR

Now enforced by the ruleset (strict_required_status_checks_policy), so GitHub refuses a branch that is behind main.

The rule exists because the cost is invisible and large: a stale branch re-samples flakes that main has already fixed, and every one looks like a defect in your change. #794 burned five CI runs and most of a day that way — three different red tests, two already fixed on main, none caused by the branch.

The actionable form: if CI fails on something your diff does not touch, merge main before investigating anything.

DocumentationLinkIntegrityTest green.

🤖 Generated with Claude Code

Two rules from one day of chasing symptoms.

MeshNodeVersioning.md: a `version` committed into a source file forks the install on any fresh mesh.
MeshNode.Version is the OWNER's persistence clock — [Editable(false)], minted as current+1 — so a
checked-in counter is a snapshot of some other mesh's clock. The store correctly refuses the
backward write, the install fails, the partition has no readable root, every subscribe is denied
(799 in one observed run), its NodeTypes never compile, and CI reports "Store/Plugin never reached
compilationStatus Ok" — a compile error five minutes and four causal steps from the actual failure.
Found in every node repo: 13 modules, counters as high as 4489. The authored version is SemVer and
only SemVer. Includes the explicit warning not to "fix" a fork by relaxing the guard, which the
guard's own message already says.

AGENTS.md: sync with main before every push and PR, and again before merging if main has moved. Now
enforced by the ruleset (strict_required_status_checks_policy), because the cost was invisible and
large — a stale branch re-samples flakes main has ALREADY fixed, and every one looks like a defect
in your change. #794 burned five CI runs and most of a day that way: three different red tests, two
already fixed on main, none caused by the branch. The actionable form: if CI fails on something your
diff does not touch, merge main BEFORE investigating anything.

DocumentationLinkIntegrityTest green.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HXtvWpB51YDAT5a3u1A81m
Copilot AI lite review requested due to automatic review settings August 6, 2026 15:36

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Documentation-only update capturing two operational rules that prevent expensive, hard-to-diagnose failures during module install/bootstrapping and CI validation.

Changes:

  • Added a new “Never author Version in a source file” section to clarify that MeshNode.Version is an owner-minted persistence counter (not an authored SemVer) and why committing it forks fresh installs.
  • Strengthened AGENTS.md guidance to explicitly require syncing with main before every push/PR, noting this is now enforced by GitHub ruleset policy.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/MeshWeaver.Documentation/Data/Architecture/MeshNodeVersioning.md Documents the “don’t commit Version” rule with rationale, failure signature, and SemVer guidance.
AGENTS.md Makes “merge main before push/PR” explicit and adds context on ruleset enforcement and why it matters.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

   64 files  ±0     64 suites  ±0   33m 16s ⏱️ -11s
8 053 tests ±0  7 748 ✅ ±0  305 💤 ±0  0 ❌ ±0 
8 139 runs  ±0  7 834 ✅ ±0  305 💤 ±0  0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@rbuergi
rbuergi enabled auto-merge August 6, 2026 19:29
@rbuergi rbuergi closed this Aug 6, 2026
auto-merge was automatically disabled August 6, 2026 19:37

Pull request was closed

@rbuergi rbuergi reopened this Aug 6, 2026
@rbuergi
rbuergi enabled auto-merge August 6, 2026 19:39
@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 4)

1 110 tests  ±0   1 103 ✅ ±0   5m 34s ⏱️ +17s
   11 suites ±0       7 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 2)

2 023 tests  ±0   2 022 ✅ ±0   5m 28s ⏱️ -13s
   11 suites ±0       1 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 3)

   10 files  ±0     10 suites  ±0   5m 10s ⏱️ +2s
1 486 tests ±0  1 486 ✅ ±0  0 💤 ±0  0 ❌ ±0 
1 572 runs  ±0  1 572 ✅ ±0  0 💤 ±0  0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 0)

367 tests  ±0   363 ✅ ±0   5m 17s ⏱️ -8s
 10 suites ±0     4 💤 ±0 
 10 files   ±0     0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 5)

1 538 tests  ±0   1 434 ✅ ±0   4m 29s ⏱️ +4s
   11 suites ±0     104 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Test Results (shard 1)

1 529 tests  ±0   1 340 ✅ ±0   7m 15s ⏱️ -14s
   11 suites ±0     189 💤 ±0 
   11 files   ±0       0 ❌ ±0 

Results for commit bdf2608. ± Comparison against base commit 87f4392.

♻️ This comment has been updated with latest results.

@rbuergi
rbuergi merged commit 05b80bf into main Aug 7, 2026
16 checks passed
@rbuergi
rbuergi deleted the docs/version-authoring-and-merge-main branch August 7, 2026 07:18
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