Add sep-835 limit retry scenario, add suite options to server command and update pending scenarios (#49)

* lefthook: move deps installs to optional local change

* add test scenario for infinite retry
and negative test

* Add broken client for retry limit negative test and fix lefthook formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix www-authenticate in scope scenario

* add suites and shift pending to reflect current pending

* lint

---------

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Paul Carleton 2025-11-21 16:49:38 +00:00 • committed by GitHub
commit b64e054918
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -14,6 +14,7 @@ import {
listScenarios,
listClientScenarios,
listActiveClientScenarios,
listPendingClientScenarios,
listAuthScenarios,
listMetadataScenarios
} from './scenarios';
@ -53,7 +54,9 @@ program
const suites: Record<string, () => string[]> = {
auth: listAuthScenarios,
metadata: listMetadataScenarios
metadata: listMetadataScenarios,
'sep-835': () =>
listAuthScenarios().filter((name) => name.startsWith('auth/scope-'))
};
const suiteName = options.suite.toLowerCase();
@ -123,8 +126,9 @@ program
totalWarnings += warnings;
const status = failed === 0 ? '✓' : '✗';
const warningStr = warnings > 0 ? `, ${warnings} warnings` : '';
console.log(
`${status} ${result.scenario}: ${passed} passed, ${failed} failed`
`${status} ${result.scenario}: ${passed} passed, ${failed} failed${warningStr}`
);
if (verbose && failed > 0) {
@ -149,7 +153,7 @@ program
console.error('Either --scenario or --suite is required');
console.error('\nAvailable client scenarios:');
listScenarios().forEach((s) => console.error(` - ${s}`));
console.error('\nAvailable suites: auth, metadata');
console.error('\nAvailable suites: auth, metadata, sep-835');
process.exit(1);
}
@ -193,7 +197,12 @@ program
.requiredOption('--url <url>', 'URL of the server to test')
.option(
'--scenario <scenario>',
'Scenario to test (defaults to all scenarios if not specified)'
'Scenario to test (defaults to active suite if not specified)'
)
.option(
'--suite <suite>',
'Suite to run: "active" (default, excludes pending), "all", or "pending"',
'active'
)
.action(async (options) => {
try {
@ -213,10 +222,24 @@ program
);
process.exit(failed > 0 ? 1 : 0);
} else {
// Run all active scenarios
const scenarios = listActiveClientScenarios();
// Run scenarios based on suite
const suite = options.suite?.toLowerCase() || 'active';
let scenarios: string[];
if (suite === 'all') {
scenarios = listClientScenarios();
} else if (suite === 'active') {
scenarios = listActiveClientScenarios();
} else if (suite === 'pending') {
scenarios = listPendingClientScenarios();
} else {
console.error(`Unknown suite: ${suite}`);
console.error('Available suites: active, all, pending');
process.exit(1);
}
console.log(
`Running ${scenarios.length} scenarios against ${validated.url}\n`
`Running ${suite} suite (${scenarios.length} scenarios) against ${validated.url}\n`
);
const allResults: { scenario: string; checks: ConformanceCheck[] }[] =