Skip to content

Commit 86fc7a2

Browse files
Address copilot pass 7 on #2
- README: "green/red checklist" → "pass/warn/fail/skip checklist". The actual UI has four states; binary phrasing was misleading. - lib/lws-cid.js: skip the self-control comparison when @id is missing rather than emitting "@id=null" in a delegated-control warning. The earlier "Profile has @id" check has already failed, and "controller === @id" isn't meaningful without an @id to compare against.
1 parent c87eca6 commit 86fc7a2

2 files changed

Lines changed: 19 additions & 8 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A diagnostic tool for [Solid](https://solidproject.org/) pods and the surroundin
88

99
## What it does today
1010

11-
**1. LWS / CID v1 profile shape check** — drop in a WebID URL, get a green/red checklist of what's structurally there and what's missing for [LWS 1.0](https://www.w3.org/TR/2026/WD-lws10-authn-ssi-cid-20260423/) auth conformance:
11+
**1. LWS / CID v1 profile shape check** — drop in a WebID URL, get a pass/warn/fail/skip checklist of what's structurally there and what's missing for [LWS 1.0](https://www.w3.org/TR/2026/WD-lws10-authn-ssi-cid-20260423/) auth conformance:
1212

1313
- Profile fetches as `application/ld+json`?
1414
- `@context` declares the CID v1 vocabulary (controller, verificationMethod, authentication, …)?

lib/lws-cid.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -96,21 +96,32 @@ export function runLwsCidChecks(profile, { webIdUrl }) {
9696
// JSON-LD shapes (string, object-with-@id, object-with-id, array)
9797
// are handled consistently.
9898
const ctrlList = normalizeControllers(controller, requestedNoHash);
99-
const idAbsolute = absolutize(id, requestedNoHash);
10099
if (ctrlList.length === 0) {
101100
out.push({
102101
status: 'fail',
103102
label: 'Profile declares a controller',
104103
detail: 'controller is present but does not resolve to a usable IRI.',
105104
});
106-
} else if (ctrlList.includes(idAbsolute)) {
107-
out.push({ status: 'pass', label: 'controller === @id (self-controlled)' });
108-
} else {
105+
} else if (!id) {
106+
// @id was missing — already failed earlier. Self-control compares
107+
// controller against @id, so it's not meaningful here. Just note
108+
// that controller is structurally declared.
109109
out.push({
110-
status: 'warn',
111-
label: 'controller differs from @id',
112-
detail: `controller=${ctrlList.join(', ')}, @id=${idAbsolute}. Delegated control is allowed by CID v1 but most pods are self-controlled.`,
110+
status: 'skip',
111+
label: 'controller === @id (self-controlled)',
112+
detail: 'Skipped because @id is missing.',
113113
});
114+
} else {
115+
const idAbsolute = absolutize(id, requestedNoHash);
116+
if (ctrlList.includes(idAbsolute)) {
117+
out.push({ status: 'pass', label: 'controller === @id (self-controlled)' });
118+
} else {
119+
out.push({
120+
status: 'warn',
121+
label: 'controller differs from @id',
122+
detail: `controller=${ctrlList.join(', ')}, @id=${idAbsolute}. Delegated control is allowed by CID v1 but most pods are self-controlled.`,
123+
});
124+
}
114125
}
115126
}
116127

0 commit comments

Comments
 (0)