githolon 0.28.0 → 0.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.mjs +17 -5
- package/package.json +3 -3
package/dist/cli.mjs
CHANGED
|
@@ -1648,25 +1648,37 @@ function runRelationBootstrapLeg(eng, ws, lawHash, rb) {
|
|
|
1648
1648
|
const ACTOR = "user:proof-conformance";
|
|
1649
1649
|
const actorOpts = { actor: ACTOR };
|
|
1650
1650
|
const stamp = (/* @__PURE__ */ new Date()).toISOString();
|
|
1651
|
+
const grantedRelation = rb.grantedRelation ?? rb.relation;
|
|
1652
|
+
const computed = grantedRelation !== rb.relation;
|
|
1653
|
+
const speculative = rb.seedSpeculative === true;
|
|
1651
1654
|
const grantPayload = { ...rb.grantPayload };
|
|
1652
1655
|
const overwrite = /* @__PURE__ */ new Set([...rb.grantSubjectFields, ...rb.grantGrantedByFields]);
|
|
1653
1656
|
for (const k of Object.keys(grantPayload)) {
|
|
1654
|
-
if (overwrite.has(k) || /^(subject|principal|grantedBy|grantee|member|user)$/i.test(k)) grantPayload[k] = ACTOR;
|
|
1657
|
+
if (overwrite.has(k) || /^(subject|principal|grantedBy|grantee|member|user|owner)$/i.test(k)) grantPayload[k] = ACTOR;
|
|
1655
1658
|
}
|
|
1656
1659
|
for (const f of rb.grantAutoStamped) grantPayload[f] = stamp;
|
|
1657
1660
|
const grantRes = author(eng, ws, rb.domain, rb.grantDirectiveId, grantPayload, lawHash, actorOpts);
|
|
1658
1661
|
if (grantRes.ok === false) {
|
|
1659
|
-
|
|
1662
|
+
if (speculative) {
|
|
1663
|
+
lines.push(`\u2013 relation-bootstrap leg SKIPPED (layer-3 seed-path) \u2014 the declared seed ${rb.domain}/${rb.grantDirectiveId} could not be replayed (${grantRes.error ?? "refused"}); the gate ${rb.gatedDirectiveId} .requires("${rb.relation}") stays proven negatively by the conformance leg`);
|
|
1664
|
+
return done(true);
|
|
1665
|
+
}
|
|
1666
|
+
return done(false, `relation bootstrap grant ${rb.domain}/${rb.grantDirectiveId} refused: ${grantRes.error ?? "unknown"} \u2014 the grant that should seat "${grantedRelation}" on the proof actor was rejected (is ${rb.grantDirectiveId} itself gated? add .grants("${grantedRelation}") + an ungated bootstrap, or prove by hand)`);
|
|
1660
1667
|
}
|
|
1661
|
-
|
|
1668
|
+
const seatDesc = speculative ? `replayed the declared seed ${rb.domain}/${rb.grantDirectiveId} (seats [${(rb.seedWritesRelations ?? [grantedRelation]).join(", ")}]) on ${ACTOR} \u2014 deferring to the real gate to authorize "${rb.relation}"` : `${rb.domain}/${rb.grantDirectiveId} granted "${grantedRelation}" to ${ACTOR} (${rb.via})${computed ? ` \u21D2 satisfies "${rb.relation}" via the rewrite` : ``}`;
|
|
1669
|
+
lines.push(`\u2713 relation bootstrap (${speculative ? "seed" : "grant"}) \u2014 ${seatDesc}`);
|
|
1662
1670
|
const gatedPayload = { ...rb.gatedPayload };
|
|
1663
1671
|
for (const f of rb.gatedAutoStamped) gatedPayload[f] = stamp;
|
|
1664
1672
|
if (rb.gatedMintField !== void 0 && rb.gatedAggregateId !== void 0) gatedPayload[rb.gatedMintField] = mintId(eng, rb.gatedAggregateId);
|
|
1665
1673
|
const gatedRes = author(eng, ws, rb.domain, rb.gatedDirectiveId, gatedPayload, lawHash, actorOpts);
|
|
1666
1674
|
if (gatedRes.ok === false) {
|
|
1667
|
-
|
|
1675
|
+
if (speculative) {
|
|
1676
|
+
lines.push(`\u2013 relation-bootstrap leg SKIPPED (layer-3 seed-path) \u2014 replaying the declared seed ${rb.domain}/${rb.grantDirectiveId} did NOT authorize ${rb.gatedDirectiveId} .requires("${rb.relation}") on the real gate (${gatedRes.error ?? "refused"}); no seed-path is provable, so no positive leg is emitted (the conformance leg still proves the gate refuses an actorless offer)`);
|
|
1677
|
+
return done(true);
|
|
1678
|
+
}
|
|
1679
|
+
return done(false, `relation bootstrap prove ${rb.domain}/${rb.gatedDirectiveId} refused: ${gatedRes.error ?? "unknown"} \u2014 the gated write did NOT succeed even after granting "${grantedRelation}" to the actor${computed ? ` (which should satisfy "${rb.relation}" via the rewrite)` : ``} (the gate is not honoring the seeded relation, OR the grant did not seat it on ${ACTOR})`);
|
|
1668
1680
|
}
|
|
1669
|
-
lines.push(`\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored under the seeded holder of "${rb.relation}" (gated write SUCCEEDS once granted)`);
|
|
1681
|
+
lines.push(speculative ? `\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored under the replayed seed (gated write SUCCEEDS \u2014 the REAL kernel gate confirmed the replayed seed establishes authority for "${rb.relation}")` : `\u2713 relation bootstrap (prove) \u2014 ${rb.domain}/${rb.gatedDirectiveId} authored under the seeded holder of "${rb.relation}" (gated write SUCCEEDS once granted)`);
|
|
1670
1682
|
return done(true);
|
|
1671
1683
|
}
|
|
1672
1684
|
function actorFromPayload(payload, field) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "githolon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.29.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "githolon — the Nomos developer CLI: Rails-style generators for @githolon/dsl domains + the package compiler. Kernel-independent.",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@bjorn3/browser_wasi_shim": "0.4.2",
|
|
32
|
-
"@githolon/client": "^0.
|
|
33
|
-
"@githolon/dsl": "^0.
|
|
32
|
+
"@githolon/client": "^0.29.0",
|
|
33
|
+
"@githolon/dsl": "^0.29.0",
|
|
34
34
|
"isomorphic-git": "^1.38.4"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|