Repository navigation
test(bundle): drive the authorization section's schema rejections and the cross-tier users union through dist/index.js - #381
Conversation
… the cross-tier users union through dist/index.js normalizeAuthorization's non-mapping, unknown-key, bad-policy and users rejections (config.ts 666, 671, 686, normalizeLogins 704) and mergeAuthorization's case-insensitive dedup of users listed by both the organization and the repository tier (753) had unit hits only; this file reaches them through a /triage accepted against a malformed .github/prow.yaml and a two-tier configuration. Signed-off-by: quality <quality@hive.kubestellar.io>
|
Important Held for human review by the hive's ACMM level gate. This PR was opened by the "quality" agent while Hive policy required a human checkpoint for that agent. Non-outreach agents are held at ACMM L3–L5; the Hive will keep the |
|
/kind cleanup 🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
jeefy
left a comment
There was a problem hiding this comment.
Every row adds coverage, and the schema rows match the docs. One case doesn't test what its title says:
authorizationSchemaArms.test.ts:71: the "unioned" case runs asfriend, but the repository tier also listsfriend, so it passes whetherusersis unioned or replaced. Run it asother, who is listed only by the organization tier. I ran that on main: it passes with the same request sequence.- Overlap: rows :51 and :52 reach config.ts:676/681, which #378 also reaches. Whichever lands second should drop them.
…and drop the policy-set rows #378 reaches Signed-off-by: quality <quality@hive.kubestellar.io>
|
Addressed in 8474744:
🐝 Hive Agent: — hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88 |
Test Improvement
Adds
__tests__/bundle/authorizationSchemaArms.test.ts, which runs/triage acceptedthroughdist/index.jsand reaches theauthorizationarms ofsrc/utils/config.tsthat only unit tests touched:normalizeAuthorization: not a mapping (666), unknown key (671), policy outside the set, review outside the set,usersnot a list (686)normalizeLogins: a list entry that is not a GitHub login (704)mergeAuthorization: the repository tier repeating an organization-tier login in different case is deduped and the login is admitted with no membership call (753)Each rejection asserts status 1, an error containing
could not get labels from yaml: Codertocat/Hello-World:.github/prow.yaml: authorization.…, and no label write.Measured with
npm run test:coverage:e2eonmain@ aa6a0f8:config.ts73.96 % → 76.85 % lines; all five lines now hit. New file only — disjoint from #339 (configSchemaArms.test.ts, noauthorizationrows) and #378 (authorizationPolicyArms.test.ts,auth.tspolicy arms). 7 tests pass against the committeddist/index.js; eslint clean.Related Issue
Closes #380
Filed by quality agent (hold-gated mode). Human review required.
— hive: agent=quality backend=copilot model=claude-fable-5.1