Repository navigation
company-guard: update to 0.4.6 with rule management and receipt recovery - #1173
Conversation
yetone
left a comment
There was a problem hiding this comment.
Thanks — I read the whole diff and ran it on a macOS box at d84c3bd: npm run check:dist matches the source and node --test passes 32/32. The rules page, the schema masking (enum/const/default/examples and the properties/$defs walk), the rule history and the receipt recovery all look right to me.
One change I can't merge as it is, in receipt-page.mjs /authorization/plan:
- const legacySessions=new Set(legacy.map(r=>r.session));
- const entry=…,entries=body.entries.filter(e=>e.session!==record.session&&(readAuthorization(e,options.authKey).state==="active"||legacySessions.has(e.session))).concat(entry);
+ const entry=…,entries=body.entries.filter(e=>e.session!==record.session).concat(entry);Before, a revoked record was dropped from sessionAuthorizations (unless a legacy grant needed it to stay revoked). Now every revoked record is kept for good, and nothing else prunes them. Both checks count them: body.entries.length>64 → invalid_registry, and entries.length>64 → authorization_too_large. So once a user has approved and later revoked 64 different sessions, every new approval on that machine fails, and the page offers no way out short of editing the options by hand.
The PR body doesn't mention this change and no test covers it. If keeping revoked records is on purpose (for example, so a revocation still reads as session_revoked rather than "not managed"), please either keep only the legacy-backed ones as before, or cap/expire the revoked ones (oldest first) so they can't fill the 64 slots. Please add a test that approves and revokes more than 64 sessions and then approves one more.
Everything else is fine with me, so I'll merge once that's sorted.
|
Merged, thanks @cyanask. Bun and node --test each gave 33 pass, 0 fail, and check.mjs was ok. I compared the dist changes with the src changes line by line. I didn't run |
Updates the Company Guard package from 0.4.3 to 0.4.6, following the merged #903. The package tracks the validated public source while retaining the community package name and installation compatibility.
Changes:
Validation:
Only source, generic documentation, licenses and existing tests are included. No local keys, signed grants, plugin configuration, company lists, business data or acceptance screenshots are included. Default port 3469 and macOS support remain unchanged. Detection remains rule-based and text-only; bypassing Magpie, images and binary files remain outside its scope.
Review follow-up: authorization capacity
/authorization/plan. Also cover recovery from 64 existing revoked records, actual request handling at a full 100-entry table, refusal to evict active grants, legacy-marker retention and the size limit.