fix: add scenario example to protocol-lab, sync EnvironmentPolicy types

This commit is contained in:
John Dvorak
2026-05-22 13:33:48 -07:00
parent 60e710370a
commit 04359613b5
3 changed files with 16 additions and 1 deletions
+8
View File
@@ -330,6 +330,13 @@ export function protocolLabScaffold(): ScaffoldResult {
// hooks: { onResponse: { ensures: ['status != 429'] } },
// },
// },
// scenarios: [{
// name: 'create-and-read',
// steps: [
// { request: { method: 'POST', url: '/users', body: { name: 'test' } }, expect: ['status:201'], capture: { userId: 'response_body(this).id' } },
// { request: { method: 'GET', url: '/users/{userId}' }, expect: ['status:200', 'response_body(this).name == "test"'] },
// ],
// }],
};
const readmeContent = `
@@ -374,6 +381,7 @@ Qualify can produce large output. In CI, use machine-readable formats and filter
## Next Steps
- Define scenario sequences in your config.
- Example scenario is commented out in apophis.config.js — uncomment and adapt.
- Add route allowlists for chaos if needed.
- Run \`apophis replay --artifact <path>\` to debug failures.
`;