Skip to content

feat(tools): read a fork's own manifest keys and its fork_core additions - #1970

Merged
braboj merged 1 commit into
mainfrom
feat/fork-manifest-keys
Oct 18, 2026
Merged

braboj merged 1 commit into
mainfrom
feat/fork-manifest-keys

Conversation

@braboj

@braboj braboj commented Oct 18, 2026

Copy link
Copy Markdown
Collaborator

Part of #1944 (a prerequisite the split exposed).

The gap. After the fork merges the split with -s ours, about 33 moved templates sit under base: and backend:, and base-readme sits in core:. ADR-049 rule 4 and SYS-20 forbid a fork to edit those keys. Rule 4 already lets a fork append "keys of its own", but resolve.py and smoke read five fixed keys, so a fork's template under its own key resolved as a missing dependency. A fork had no legal place to keep its templates.

Change:

  • resolve.py gains entry_sections(manifest), which returns every top-level list of entries except version, core and fork_core, and core_tier(manifest), which returns core followed by a fork's fork_core. load_manifest uses both.
  • run_smoke.py imports the same two functions for _load_manifest, SYS-03 and SYS-04, so there is one definition of a section.
  • SYS-21: resolves a planted manifest with an acme: key and fork_core: through the resolver's CLI, and asserts the chain carries the upstream core file, the fork's dependency and the fork's core addition. SYS-19's loop is extracted into _resolve_cases and shared.
  • ADR-049 rule 4 is amended in place (pre-release, as before): "…and adds to every chain's core tier under fork_core:". The SPEC core-tier section and the manifest header say the same.

Control: with main's resolve.py, the SYS-21 manifest exits 1 with Missing dependency: stack-fork depends on fork-lib, which has no manifest entry. With this branch it resolves quality.md, docs.md, git.md and the stack.

Test changes: SYS-19's assertions are unchanged; only its loop moved into a helper. SYS-21 is new.

Local (Git Bash): smoke 36/36, conformance 24 / 0 failed, fork sync 3/3 (nested smoke 36/36), sync, resolve and redundancy clean. Upstream's own manifest has no fork key, so every chain is unchanged (resolve.py --check clean).

🤖 Generated with Claude Code

Part of #1944: after the split a fork must move its templates out of the
keys upstream owns, and the resolver read only five fixed keys.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@braboj
braboj merged commit 3d94bbf into main Oct 18, 2026
1 check passed
@braboj
braboj deleted the feat/fork-manifest-keys branch October 18, 2026 06:46
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.

1 participant