Skip to content

uw-resolve P0.5: freeze reasons, named layers, excluded, aliases - #4213

Open
s243a wants to merge 5 commits into
grok/pkg-resolverfrom
grok/pkg-resolver-p05
Open

s243a wants to merge 5 commits into
grok/pkg-resolverfrom
grok/pkg-resolver-p05

Conversation

@s243a

@s243a s243a commented Sep 2, 2026

Copy link
Copy Markdown
Owner

Holds get reasons; mining-notes adoptions land. Branches from grok/pkg-resolver. Spec from PACKAGE_MANAGER_LOGIC_PROPOSAL.md §2e (graduated freeze) / §2f (named layers) and PKG_MINING_NOTES.md top-10. Design docs are imported unmodified. Edit scope is examples/pkg_resolver/ plus those two reference docs.

Catalog shape (P0 catalog/6 still accepted)

Bare Name-Ver = blanket. Extras via catalog/9:

catalog(Packages, Depends, Conflicts, Base, Installed, Requested,
        Layers, Excluded, Aliases)

Combined example (reasons + a second loaded layer + excluded + alias):

catalog(
  [package(lib,v(1,0,0)), package(lib,v(2,0,0)),
   package(app,v(1,0,0)), package(gcc,v(1,0,0)),
   package(rxvt,v(1,0,0)), package(bad,v(1,0,0))],
  [depends(app,v(1,0,0),lib,any), depends(lib,v(1,0,0),gcc,any)],
  [],
  [base(lib-v(1,0,0), abi_anchor), base(app-v(1,0,0), footprint)],
  [app-v(1,0,0), lib-v(1,0,0)],
  [app],
  [layer(devx, [gcc-v(1,0,0)])],
  [bad],
  [alias(urxvt, rxvt)]).

safe_upgrade verdicts: safe(cost(Reason)) (footprint/blanket/layer_shadow), coordinated(Set) (abi_anchor), unsafe(modified), no_candidate. upgrade_set is the reverse-dep closure over BASE holds whose constraint breaks at NewVer; a tolerant dep stays out; a member with no repair binds blocked/3. Exclusion filters candidate generation only — never removal_orphans. Aliases rewrite at the request edge; catalog names stay canonical.

New scenarios (16; all 22 P0 tests unchanged)

safe_upgrade footprint / blanket / layer_shadow / modified / no_candidate / coordinated; upgrade_set minimality (tool with any stays out) + blocked/3; freeze_audit over_frozen + suggest(abi_anchor); named layer satisfies a dep + layer_closure omits loaded; excluded never selected / excluded does not block removal; dependents + dependents_installed; alias at the request edge.

Gates (measured)

Gate Result
swipl … test_resolver.pl 38/38 (22 P0 + 16 P0.5)
run_corpus_wamjs.sh 39/39 matched SWI
run_differential.sh 2400 cases, 0 divergences, 0 crashes — swi 1.427s, wamjs 5.370s (seed 0xa5b6c7d8, all 10 queries)
tests/test_wam_javascript_lowered.pl 18 tests, exit 0
tests/test_wam_javascript_builtins.pl 13 tests, exit 0
tests/test_wam_javascript_fact_sources.pl 8 tests, exit 0
CONFORMANCE_TARGETS=javascript exit 0 (no javascript adapter registered)
cli_args corpus 17/17
cli_args differential 5067 / 0 / 0 (oracle 0.055s, wamjs 2.190s)

No JS WAM runtime/emitter/target/template edits. No runtime bug exposed; no workaround.

Residuals (still deferred)

P2 GP-LMDB catalog backend, Provides/virtual, epoch/tilde, CLI, write paths, per-file layer modeling.

Open in Web Open in Cursor 

cursoragent and others added 5 commits September 2, 2026 13:37
Reference docs from the coordinator branch (unmodified): proposal §2e/§2f
and PKG_MINING_NOTES.md top-10.

Co-authored-by: johns243a <johns243a@gmail.com>
…nts.

Extend the catalog term with catalog/9 extras while keeping catalog/6
(bare Name-Ver = blanket). New queries: safe_upgrade, upgrade_set,
freeze_audit, dependents, dependents_installed. Exclusion filters
candidate generation only; aliases rewrite at the request edge.

Co-authored-by: johns243a <johns243a@gmail.com>
Sixteen new plunit tests cover each safe_upgrade verdict, upgrade_set
minimality and blocked/3, freeze_audit over_frozen/abi_anchor, a second
loaded layer, excluded-vs-removal, dependents, and request-edge aliases.

Co-authored-by: johns243a <johns243a@gmail.com>
…ial.

Dump and oracle encode reasons/layers/excluded/aliases; the shim still
contains no resolver logic. gen_catalogs seed 0xa5b6c7d8 emits 2400
cases across the old four queries plus the five new ones.

Co-authored-by: johns243a <johns243a@gmail.com>
Co-authored-by: johns243a <johns243a@gmail.com>
@s243a
s243a marked this pull request as ready for review September 2, 2026 13:45
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