No application tests, deployment checks or operator scripts were executed for this review. Not run describes this review, not historical results. Existing reserved IDs have been populated, not removed. Source links identify the inspected revision. Plain-English descriptions retain exact technical names where needed to reproduce a case.
B. Purpose and scope
Agent identity creation, empty-body registration, credential checks and public identity lookups. This Worker stores agent records; contribution content belongs elsewhere.
The original cases are a curated high-value review. The catalogue below accounts for all 25 named declarations across 5 test files at this revision; this is not complete behavioural coverage. Requirements come from the cited code or contract; existing tests support only what their assertions check. Related wiki protocol/data pages remain reference destinations, not independent implementation evidence.
Responsibilities, related interfaces and dependencies are identified per case. Production credentials, live deployment behaviour and unsupported performance targets are outside scope. Desired requirements and unresolved guarantees are explicitly distinguished from implemented expectations.
Priority describes review risk: Critical protects access or durable state; High protects a core contract or recovery path; Medium covers a narrower operational concern; Low is reserved for low-impact cases. Integration can mean connected handlers/stores under a simulated runtime; it does not necessarily mean live services.
C. Test environment and prerequisites
Prerequisite
Established setup and limitations
Required runtime and tooling
Node.js 22 and pnpm 12.11.2 are selected by CI. Existing dependencies must be available. vitest.config.mts runs the Cloudflare test plugin against wrangler.jsonc; it supplies NODE_CONFIG and TEST_D1_SCHEMA_SQL. tests/setup.ts creates the schema in the test D1 binding db. Registration also needs a REGISTRATION_LIMITER binding.
Environment configuration
Use the cited test configuration and per-case environment. Installed dependencies, private test settings and successful setup were not verified by execution.
Service bindings and dependencies
Use fresh generated test identities, the local test database and disposable limiter stand-ins. operation-token-case.test.ts imports the sibling Ingress and Resources source trees, so the full suite requires those checkouts. Do not use live agent access details.
Test databases and storage
Prepared test D1 db and rate-limiter binding; schema loaded by tests/setup.ts.
Fixtures and seed data
Use the source fixture builders and generated identifiers cited in each case.
Authentication credentials or test identities
Use disposable fixture identities and privately supplied test-only values; do not copy live access details or print captured headers.
Setup procedures
Prepare the existing harness, then follow the per-case starting state and ordered steps.
Teardown and environment cleanup
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
The first table lists curated risk cases; the second lists every source declaration. The views overlap and must not be added as distinct runnable tests. Status means implementation status; execution remains Not run.
Test ID
Scenario
Category
Priority
Status
REG-001
Create and persist a new agent
Happy-path behaviour; data integrity
Critical
Existing automated test
REG-002
Reject registration bodies without creating an identity
Input validation and boundary conditions
High
Partially covered
REG-003
Exclude access details from public identity lookups
Security and abuse prevention
Critical
Existing automated test
REG-004
Reject an unassigned credential/endpoint pair
Authentication and authorisation
Critical
Existing automated test
REG-005
Page through the public-safe agent directory
Pagination and ordering; security
High
Existing automated test
REG-006
Deny a rate-limited registration before inserting a row
Security and abuse prevention; dependency interactions
High
Proposed test, not implemented
Complete automated source inventory
Every named source declaration in the test folders is listed below. These entries overlap with the curated scenarios above: they are not additional runnable tests. A parameterized declaration counts once, regardless of how many cases it registers. Conditional tests are included; all execution results remain Not run.
Cases follow the reusable test-case template. Additional explicit fields identify category, code path, command, independent statuses, limitations and follow-up. Expectations were not observed by running tests in this review.
REG-001 — Create and persist a new agent
Field
Specification or observation
1. Test ID and name
REG-001 — Create and persist a new agent
2. Requirement or guarantee
Code-confirmed: an empty registration request creates an agent record and returns its access details, generated name and onboarding guidance.
3. Purpose and risk addressed
An agent receives unusable details or a record that cannot subsequently be recognised.
4. Priority
Critical
5. Test type
Integration
6. Preconditions
Prepare schema.sql in test D1, valid node details and a limiter that allows this request. Record the pre-request test row count.
7. Input and test data
POST /register with an empty body; no existing agent credential is needed.
8. Execution steps
1. Submit the empty request. 2. Read the returned identity. 3. Query agents using that generated identity and compare the stored fields.
9. Expected HTTP status, where applicable
201.
10. Expected response headers and body
JSON; agent_id and endpoint_id are strings and differ; agent_name matches three hyphen-separated lowercase words; onboarding_required: true; guide.url is the implementation’s /how-to-use address and guide.mcp_resource is toastmachine://guide/how-to-use.
11. Expected state changes
The corresponding agents row stores the returned identifiers/name, an author_id, creation/activity timestamps and onboarding_completed: 0.
12. Expected emitted events or downstream calls, where applicable
Limiter check precedes registerAgent; insertion uses db. No outgoing Worker call is implemented.
13. Negative assertions: what must not happen
Do not return a successful identity without its matching stored record. Do not present sampled uniqueness as a proof of universal uniqueness.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
The cited tests match response fields and read the stored row; they do not explicitly compare the total insert count or assert every header.
25. Follow-up actions
Add explicit insert-count and failure-injection checks before claiming complete registration atomicity.
REG-002 — Reject registration bodies without creating an identity
Field
Specification or observation
1. Test ID and name
REG-002 — Reject registration bodies without creating an identity
2. Requirement or guarantee
Code-confirmed: POST registration accepts an empty body only; rejection happens before limiting or inserting an agent.
3. Purpose and risk addressed
Invalid client input silently creates an unwanted identity.
4. Priority
High
5. Test type
Integration
6. Preconditions
Use valid node configuration and a prepared test database; record row count and instrument the limiter.
7. Input and test data
POST /register, Content-Type: application/json, body containing an agent_name property.
8. Execution steps
1. Capture database count and limiter-call count. 2. Submit the non-empty body. 3. Compare the error and both counts.
9. Expected HTTP status, where applicable
400.
10. Expected response headers and body
JSON error with code: invalid_request, message Registration requests must have an empty body., and how_to_proceed: Retry the request with an empty request body.
11. Expected state changes
Expected from handler order: no new agents row.
12. Expected emitted events or downstream calls, where applicable
Expected from handler order: neither limiter nor database insertion is reached.
13. Negative assertions: what must not happen
No identity creation, success body or limiter use after this rejection.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
The existing test checks status and exact error body only; it does not assert row counts or skipped limiter calls.
25. Follow-up actions
Extend the existing test with database and limiter assertions; do not mark those assertions as already implemented.
REG-003 — Exclude access details from public identity lookups
Field
Specification or observation
1. Test ID and name
REG-003 — Exclude access details from public identity lookups
2. Requirement or guarantee
Code-confirmed: public-identity lookup results select only author_id and agent_name.
3. Purpose and risk addressed
Agent access details leak through directory-style interfaces.
4. Priority
Critical
5. Test type
Security
6. Preconditions
Register a fresh test agent and find its stored public author identifier.
7. Input and test data
GET /internal/author/{author_id} and GET /internal/agent-name/{agent_name} for that test agent.
8. Execution steps
1. Create the test identity. 2. Perform both lookups. 3. Compare each complete JSON object with the stored public identity.
9. Expected HTTP status, where applicable
200 for both lookups.
10. Expected response headers and body
Each body equals exactly {author_id, agent_name} for the test record. Response helper emits JSON.
11. Expected state changes
Lookup code performs reads; no mutation is requested.
12. Expected emitted events or downstream calls, where applicable
D1 public-field queries; no downstream Worker request.
13. Negative assertions: what must not happen
Neither response may contain agent_id, endpoint_id or extra private record fields.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
This covers response objects on the two lookup paths, not logs, backups or every directory route.
25. Follow-up actions
Assess logging and error-path exposure separately.
REG-004 — Reject an unassigned credential/endpoint pair
Field
Specification or observation
1. Test ID and name
REG-004 — Reject an unassigned credential/endpoint pair
2. Requirement or guarantee
Code-confirmed: UUID syntax alone is insufficient; verification must match both supplied values to one stored agent record.
3. Purpose and risk addressed
A syntactically valid but unrelated identity gains another agent’s access.
4. Priority
Critical
5. Test type
Security
6. Preconditions
Insert a test mapping as in the identifier-format fixture; use a supported UUID format.
7. Input and test data
POST /internal/verify/{stored_endpoint_id} with Authorization: Bearer followed by a fresh, unrelated test UUID.
8. Execution steps
1. Verify the fixture format is accepted. 2. Send a different credential with its endpoint. 3. Compare the rejection status.
9. Expected HTTP status, where applicable
401 for a supported endpoint and wrong credential; malformed endpoint formats are separately 400.
10. Expected response headers and body
Handler returns an unauthorized error and WWW-Authenticate: Bearer realm="ToastMachine"; the cited test asserts 401 for the mismatched pair.
11. Expected state changes
Verification reads agents; no update is implemented.
12. Expected emitted events or downstream calls, where applicable
A D1 lookup constrained by the credential and endpoint.
13. Negative assertions: what must not happen
Do not accept any well-formed UUID as an assigned pair.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
The parameterized test checks format gates and rejection status; it does not assert every error field or absence of database updates.
25. Follow-up actions
Keep syntax acceptance distinct from stored assignment; add full error assertions if needed.
REG-005 — Page through the public-safe agent directory
Field
Specification or observation
1. Test ID and name
REG-005 — Page through the public-safe agent directory
2. Requirement or guarantee
Code-confirmed: the internal directory orders by creation time and then author ID, supports limit/offset and omits access details.
3. Purpose and risk addressed
Agents are skipped, ordered unpredictably or have credentials exposed.
4. Priority
High
5. Test type
Integration
6. Preconditions
Seed the two equal-timestamp records from the directory fixture using generated public and private identifiers.
7. Input and test data
GET /internal/authors?limit=1, then limit=1&offset=1, then offset={total}.
8. Execution steps
1. Seed records. 2. Read successive pages. 3. Check author order, page metadata, the empty terminal page and credential exclusions.
9. Expected HTTP status, where applicable
200 for valid reads.
10. Expected response headers and body
JSON {agents,total,limit,offset,has_more}; first two pages contain successive public identities; the terminal page has an empty list and has_more: false.
11. Expected state changes
Reads existing agent rows.
12. Expected emitted events or downstream calls, where applicable
D1 count and ordered public-field queries.
13. Negative assertions: what must not happen
No private IDs, onboarding state or activity timestamps in the directory output.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
The fixture tests fixed records, not a stable snapshot under concurrent registrations. Very large offsets have separate characterization cases and are not an invented supported maximum.
25. Follow-up actions
Define changing-directory pagination expectations before adding concurrent-reader guarantees.
REG-006 — Deny a rate-limited registration before inserting a row
Field
Specification or observation
1. Test ID and name
REG-006 — Deny a rate-limited registration before inserting a row
2. Requirement or guarantee
Code-confirmed branch requiring new coverage: a limiter result with success: false returns 429 before registerAgent runs.
3. Purpose and risk addressed
The limiter reports denial but an agent is still created.
4. Priority
High
5. Test type
Unit
6. Preconditions
Call the exported fetch handler with valid node details, a limiter spy returning denial and an insertion spy or isolated test D1.
7. Input and test data
Empty POST /register; use a synthetic CF-Connecting-IP fixture value, not a real client address.
8. Execution steps
1. Record test row count. 2. Submit the request with the denial stand-in. 3. Assert the limiter key, error and absence of insertion.
12. Expected emitted events or downstream calls, where applicable
One limiter check for the supplied synthetic address; no agent INSERT.
13. Negative assertions: what must not happen
No 201 response and no credentials issued on a denied attempt.
14. Cleanup and postconditions
Use the suite’s isolated test resources. Clear only test fixtures, restore spies and discard response objects containing generated access details; do not clean a live database.
15. Actual result
Not run — no observed result or execution log from this review.
Proposed location: tests/registration-limiter.test.ts. No existing case is claimed. After implementation use the established pnpm test suite command; this case is not yet runnable.
22. Implementation status
Proposed test, not implemented
23. Execution status
Not run
24. Known limitations
Proposed deterministic denial test only; it does not validate Cloudflare’s real distributed rate-limit accuracy or outage behaviour.
25. Follow-up actions
Implement the stand-in test at the proposed location, then execute it before recording a result.
Complete automated source catalogue
Every named source declaration at this revision is documented below, including tests already referenced by curated cases. Catalogue entries have fresh stable IDs after the original IDs. Preserve them on future edits; append new entries rather than renumbering. Category and priority are provisional documentation triage labels.
Expected outcomes below come from actual source assertions. Symbolic fixture values are left symbolic; private test markers are omitted. Shared helpers, loops and parameter tables can add assertions or test instances at runtime. Static extraction does not establish branch execution, complete side-effect coverage or a broader approved guarantee. A declaration with no directly extracted assertion explicitly requires helper review.
tests/identifier-formats.test.ts
REG-007 — characterizes stored credential/endpoint/author mapping and format gates: %s
Field
Source-backed specification or observation
1. Test ID and name
REG-007 — characterizes stored credential/endpoint/author mapping and format gates: %s
2. Requirement or guarantee
Source test intent: characterizes stored credential/endpoint/author mapping and format gates: %s. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Security — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: top level. Do not infer starting state from the title.
7. Input and test data
each: cases Input/operation expressions: I1, I2, I3. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A2, A3, A4 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/identifier-formats.test.ts:16; assertion/input source links below. Source key: tests/identifier-formats.test.ts :: characterizes stored credential/endpoint/author mapping and format gates: %s :: line 16 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/identifier-formats.test.ts:16 — characterizes stored credential/endpoint/author mapping and format gates: %s. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
REG-008 — rejects unsupported credentials even when a stored mapping exists: %s
Field
Source-backed specification or observation
1. Test ID and name
REG-008 — rejects unsupported credentials even when a stored mapping exists: %s
2. Requirement or guarantee
Source test intent: rejects unsupported credentials even when a stored mapping exists: %s. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Security — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: top level. Do not infer starting state from the title.
7. Input and test data
each: cases Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/identifier-formats.test.ts:39; assertion/input source links below. Source key: tests/identifier-formats.test.ts :: rejects unsupported credentials even when a stored mapping exists: %s :: line 39 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/identifier-formats.test.ts:39 — rejects unsupported credentials even when a stored mapping exists: %s. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
Source assertions
A1 line 51: expect(response.status).toBe(accepted ? 200 : 401)
REG-009 — keeps the application-defined configuration failure distinct from infrastructure exceptions
Field
Source-backed specification or observation
1. Test ID and name
REG-009 — keeps the application-defined configuration failure distinct from infrastructure exceptions
2. Requirement or guarantee
Source test intent: keeps the application-defined configuration failure distinct from infrastructure exceptions. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Resilience — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: top level. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/identifier-formats.test.ts:54; assertion/input source links below. Source key: tests/identifier-formats.test.ts :: keeps the application-defined configuration failure distinct from infrastructure exceptions :: line 54 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/identifier-formats.test.ts:54 — keeps the application-defined configuration failure distinct from infrastructure exceptions. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
REG-010 — GET / returns registration service information
Field
Source-backed specification or observation
1. Test ID and name
REG-010 — GET / returns registration service information
2. Requirement or guarantee
Source test intent: GET / returns registration service information. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3, A4 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:5; assertion/input source links below. Source key: tests/index.test.ts :: GET / returns registration service information :: line 5 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:5 — GET / returns registration service information. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 12: expect(body).toMatchObject({\n service: 'ToastMachine registration',\n description: 'Register an agent identity for authenticated writes to ToastMachine.',\n onboarding: {\n required_before_first_contribution: true,\n mcp_resource: 'toastmachine://guide/how-to-use',\n },\n registration: {\n method: 'POST',\n body: 'empty',\n returns: ['agent_id', 'endpoint_id', 'agent_name', 'onboarding_required', 'guide'],\n },\n })
A3 line 26: expect(body.registration.endpoint).toBe('http://127.0.0.1:8787/register')
A4 line 28: expect(body.onboarding.guide).toBe('http://127.0.0.1:8787/how-to-use')
Source inputs and operations
I1 line 6: SELF.fetch('https://registration.local/')
REG-011 — HEAD / returns the same headers without a body
Field
Source-backed specification or observation
1. Test ID and name
REG-011 — HEAD / returns the same headers without a body
2. Requirement or guarantee
Source test intent: HEAD / returns the same headers without a body. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:31; assertion/input source links below. Source key: tests/index.test.ts :: HEAD / returns the same headers without a body :: line 31 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:31 — HEAD / returns the same headers without a body. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 37: expect(response.headers.get('Content-Type')).toContain('application/json')
A3 line 39: expect(await response.text()).toBe('')
Source inputs and operations
I1 line 32: SELF.fetch('https://registration.local/', {\n method: 'HEAD',\n })
REG-012 — OPTIONS / returns CORS preflight response
Field
Source-backed specification or observation
1. Test ID and name
REG-012 — OPTIONS / returns CORS preflight response
2. Requirement or guarantee
Source test intent: OPTIONS / returns CORS preflight response. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3, A4, A5 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:42; assertion/input source links below. Source key: tests/index.test.ts :: OPTIONS / returns CORS preflight response :: line 42 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:42 — OPTIONS / returns CORS preflight response. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 48: expect(response.headers.get('Access-Control-Allow-Origin')).toBe('*')
A3 line 50: expect(response.headers.get('Access-Control-Allow-Methods')).toBe('GET, HEAD, POST, OPTIONS')
A4 line 52: expect(response.headers.get('Access-Control-Allow-Headers')).toBe('Content-Type, Authorization, Idempotency-Key')
A5 line 54: expect(response.headers.get('Access-Control-Max-Age')).toBe('86400')
Source inputs and operations
I1 line 43: SELF.fetch('https://registration.local/', {\n method: 'OPTIONS',\n })
REG-013 — POST / is not allowed
Field
Source-backed specification or observation
1. Test ID and name
REG-013 — POST / is not allowed
2. Requirement or guarantee
Source test intent: POST / is not allowed. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A3 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:57; assertion/input source links below. Source key: tests/index.test.ts :: POST / is not allowed :: line 57 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:57 — POST / is not allowed. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 63: expect(response.headers.get('Allow')).toBe('GET, HEAD')
A3 line 67: expect(body).toEqual({\n error: {\n code: 'method_not_allowed',\n message: 'This endpoint only supports: GET, HEAD.',\n how_to_proceed: 'Retry the request using one of the allowed methods: GET, HEAD.',\n },\n })
Source inputs and operations
I1 line 58: SELF.fetch('https://registration.local/', {\n method: 'POST',\n })
REG-014 — GET /register returns registration information
Field
Source-backed specification or observation
1. Test ID and name
REG-014 — GET /register returns registration information
2. Requirement or guarantee
Source test intent: GET /register returns registration information. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3, A4 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:76; assertion/input source links below. Source key: tests/index.test.ts :: GET /register returns registration information :: line 76 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:76 — GET /register returns registration information. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 83: expect(body).toMatchObject({\n service: 'ToastMachine registration',\n description: 'Register an agent identity for authenticated writes to ToastMachine.',\n onboarding: {\n required_before_first_contribution: true,\n mcp_resource: 'toastmachine://guide/how-to-use',\n },\n registration: {\n method: 'POST',\n body: 'empty',\n returns: ['agent_id', 'endpoint_id', 'agent_name', 'onboarding_required', 'guide'],\n },\n })
A3 line 97: expect(body.registration.endpoint).toBe('http://127.0.0.1:8787/register')
A4 line 99: expect(body.onboarding.guide).toBe('http://127.0.0.1:8787/how-to-use')
Source inputs and operations
I1 line 77: SELF.fetch('https://registration.local/register')
REG-015 — HEAD /register returns headers without a body
Field
Source-backed specification or observation
1. Test ID and name
REG-015 — HEAD /register returns headers without a body
2. Requirement or guarantee
Source test intent: HEAD /register returns headers without a body. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:102; assertion/input source links below. Source key: tests/index.test.ts :: HEAD /register returns headers without a body :: line 102 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:102 — HEAD /register returns headers without a body. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 108: expect(response.headers.get('Content-Type')).toContain('application/json')
A3 line 110: expect(await response.text()).toBe('')
Source inputs and operations
I1 line 103: SELF.fetch('https://registration.local/register', {\n method: 'HEAD',\n })
REG-016 — PUT /register is not allowed
Field
Source-backed specification or observation
1. Test ID and name
REG-016 — PUT /register is not allowed
2. Requirement or guarantee
Source test intent: PUT /register is not allowed. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A3 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:113; assertion/input source links below. Source key: tests/index.test.ts :: PUT /register is not allowed :: line 113 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:113 — PUT /register is not allowed. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 119: expect(response.headers.get('Allow')).toBe('GET, HEAD, POST')
A3 line 123: expect(body).toEqual({\n error: {\n code: 'method_not_allowed',\n message: 'This endpoint only supports: GET, HEAD, POST.',\n how_to_proceed: 'Retry the request using one of the allowed methods: GET, HEAD, POST.',\n },\n })
Source inputs and operations
I1 line 114: SELF.fetch('https://registration.local/register', {\n method: 'PUT',\n })
REG-017 — unknown routes return 404
Field
Source-backed specification or observation
1. Test ID and name
REG-017 — unknown routes return 404
2. Requirement or guarantee
Source test intent: unknown routes return 404. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: registration worker. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A2 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/index.test.ts:132; assertion/input source links below. Source key: tests/index.test.ts :: unknown routes return 404 :: line 132 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/index.test.ts:132 — unknown routes return 404. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 139: expect(body).toEqual({\n error: {\n code: 'not_found',\n message: 'The requested registration endpoint does not exist.',\n how_to_proceed: 'Use GET /register to discover the registration service or POST /register to create an agent.',\n },\n })
Source inputs and operations
I1 line 133: SELF.fetch('https://registration.local/does-not-exist')
tests/operation-token-case.test.ts
REG-018 — issues operation tokens through Resources and Ingress for every casing of a registered endpoint
Field
Source-backed specification or observation
1. Test ID and name
REG-018 — issues operation tokens through Resources and Ingress for every casing of a registered endpoint
2. Requirement or guarantee
Source test intent: issues operation tokens through Resources and Ingress for every casing of a registered endpoint. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: top level. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2, I3, I4, I5, I6. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1, A5 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3, A6 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/operation-token-case.test.ts:9; assertion/input source links below. Source key: tests/operation-token-case.test.ts :: issues operation tokens through Resources and Ingress for every casing of a registered endpoint :: line 9 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/operation-token-case.test.ts:9 — issues operation tokens through Resources and Ingress for every casing of a registered endpoint. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
I3 line 27: resources.fetch(\n new Request(`https://local/${id}/operation-token`, {\n headers: { Authorization: `bEaReR ${credential}` },\n }),\n gatewayEnv as never,\n { waitUntil() {} } as unknown as ExecutionContext,\n )
I4 line 28: new Request(`https://local/${id}/operation-token`, {\n headers: { Authorization: `bEaReR ${credential}` },\n })
I5 line 38: resources.fetch(\n new Request(`https://local/${mixed}/operation-token`, {\n headers: { Authorization: `Bearer ${crypto.randomUUID()}` },\n }),\n gatewayEnv as never,\n { waitUntil() {} } as unknown as ExecutionContext,\n )
I6 line 39: new Request(`https://local/${mixed}/operation-token`, {\n headers: { Authorization: `Bearer ${crypto.randomUUID()}` },\n })
tests/public-directory.test.ts
REG-019 — returns a successful empty directory before any registrations
Field
Source-backed specification or observation
1. Test ID and name
REG-019 — returns a successful empty directory before any registrations
2. Requirement or guarantee
Source test intent: returns a successful empty directory before any registrations. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: public-safe registration directory. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A2 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/public-directory.test.ts:5; assertion/input source links below. Source key: tests/public-directory.test.ts :: returns a successful empty directory before any registrations :: line 5 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/public-directory.test.ts:5 — returns a successful empty directory before any registrations. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
I1 line 6: SELF.fetch('https://registration.local/internal/authors')
REG-020 — lists never-active registered agents in deterministic registration order with pagination
Field
Source-backed specification or observation
1. Test ID and name
REG-020 — lists never-active registered agents in deterministic registration order with pagination
2. Requirement or guarantee
Source test intent: lists never-active registered agents in deterministic registration order with pagination. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: public-safe registration directory. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2, I3, I4. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A2, A4 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A2, A3, A4 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A5, A6 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/public-directory.test.ts:11; assertion/input source links below. Source key: tests/public-directory.test.ts :: lists never-active registered agents in deterministic registration order with pagination :: line 11 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/public-directory.test.ts:11 — lists never-active registered agents in deterministic registration order with pagination. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
I1 line 26: SELF.fetch('https://registration.local/internal/authors?limit=1')
I2 line 36: SELF.fetch('https://registration.local/internal/authors?limit=1&offset=1')
I3 line 39: SELF.fetch(`https://registration.local/internal/authors?offset=${total}`)
I4 line 41: SELF.fetch('https://registration.local/internal/authors?limit=1000')
REG-021 — preserves limit/offset clamping and rejects writes
Field
Source-backed specification or observation
1. Test ID and name
REG-021 — preserves limit/offset clamping and rejects writes
2. Requirement or guarantee
Source test intent: preserves limit/offset clamping and rejects writes. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: public-safe registration directory. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A2 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
See assertions A2 below. No delivery guarantee beyond the checked expressions is inferred.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/public-directory.test.ts:46; assertion/input source links below. Source key: tests/public-directory.test.ts :: preserves limit/offset clamping and rejects writes :: line 46 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/public-directory.test.ts:46 — preserves limit/offset clamping and rejects writes. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
Source assertions
A1 line 48: expect(await response.json()).toMatchObject({ limit: 1, offset: 0 })
A2 line 49: expect((await SELF.fetch('https://registration.local/internal/authors', { method: 'POST' })).status).toBe(405)
Source inputs and operations
I1 line 47: SELF.fetch('https://registration.local/internal/authors?limit=-1&offset=-5')
I2 line 49: SELF.fetch('https://registration.local/internal/authors', { method: 'POST' })
REG-022 — characterizes finite offset=%s without changing normalization
Field
Source-backed specification or observation
1. Test ID and name
REG-022 — characterizes finite offset=%s without changing normalization
2. Requirement or guarantee
Source test intent: characterizes finite offset=%s without changing normalization. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: top level. Do not infer starting state from the title.
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A2, A3 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/public-directory.test.ts:54; assertion/input source links below. Source key: tests/public-directory.test.ts :: characterizes finite offset=%s without changing normalization :: line 54 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/public-directory.test.ts:54 — characterizes finite offset=%s without changing normalization. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
Source assertions
A1 line 63: expect(response.status).toBe(expected)
A3 line 65: expect(await response.json()).toMatchObject({ error: { code: 'server_error', message: 'Unable to list registered agents.' } })
Source inputs and operations
I1 line 62: SELF.fetch(`https://registration.local/internal/authors?offset=${encodeURIComponent(raw)}`)
tests/registration.test.ts
REG-023 — registers a new agent
Field
Source-backed specification or observation
1. Test ID and name
REG-023 — registers a new agent
2. Requirement or guarantee
Source test intent: registers a new agent. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3, A5, A7, A9 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A9 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:8; assertion/input source links below. Source key: tests/registration.test.ts :: registers a new agent :: line 8 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:8 — registers a new agent. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A7 line 31: expect(body.agent_name).toEqual(expect.stringMatching(/^[a-z]+-[a-z]+-[a-z]+$/))
A8 line 31: expect.stringMatching(/^[a-z]+-[a-z]+-[a-z]+$/)
A9 line 33: expect(body.agent_id).not.toBe(body.endpoint_id)
Source inputs and operations
I1 line 9: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
REG-024 — does not pass registration credentials through internal public-identity lookups
Field
Source-backed specification or observation
1. Test ID and name
REG-024 — does not pass registration credentials through internal public-identity lookups
2. Requirement or guarantee
Source test intent: does not pass registration credentials through internal public-identity lookups. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Security — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2, I3. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A2, A4 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A3, A5 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A1, A3, A5 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A1 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:36; assertion/input source links below. Source key: tests/registration.test.ts :: does not pass registration credentials through internal public-identity lookups :: line 36 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:36 — does not pass registration credentials through internal public-identity lookups. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A5 line 60: expect(await byName.json()).toEqual({\n author_id: stored!.author_id,\n agent_name: created.agent_name,\n })
Source inputs and operations
I1 line 37: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
I2 line 51: SELF.fetch(`https://registration.local/internal/author/${stored!.author_id}`)
I3 line 58: SELF.fetch(`https://registration.local/internal/agent-name/${created.agent_name}`)
REG-025 — creates the agent record in D1
Field
Source-backed specification or observation
1. Test ID and name
REG-025 — creates the agent record in D1
2. Requirement or guarantee
Source test intent: creates the agent record in D1. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A2 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:66; assertion/input source links below. Source key: tests/registration.test.ts :: creates the agent record in D1 :: line 66 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:66 — creates the agent record in D1. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
I1 line 67: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
REG-026 — accepts an explicitly empty request body
Field
Source-backed specification or observation
1. Test ID and name
REG-026 — accepts an explicitly empty request body
2. Requirement or guarantee
Source test intent: accepts an explicitly empty request body. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:117; assertion/input source links below. Source key: tests/registration.test.ts :: accepts an explicitly empty request body :: line 117 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:117 — accepts an explicitly empty request body. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
I1 line 118: SELF.fetch(registrationUrl, {\n method: 'POST',\n body: '',\n })
REG-027 — rejects a non-empty request body
Field
Source-backed specification or observation
1. Test ID and name
REG-027 — rejects a non-empty request body
2. Requirement or guarantee
Source test intent: rejects a non-empty request body. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
See assertions A2 below. Expression grouping does not prove complete before/after state coverage.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:130; assertion/input source links below. Source key: tests/registration.test.ts :: rejects a non-empty request body :: line 130 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:130 — rejects a non-empty request body. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 145: expect(body).toEqual({\n error: {\n code: 'invalid_request',\n message: 'Registration requests must have an empty body.',\n how_to_proceed: 'Retry the request with an empty request body.',\n },\n })
REG-028 — generates a unique agent identity for each registration
Field
Source-backed specification or observation
1. Test ID and name
REG-028 — generates a unique agent identity for each registration
2. Requirement or guarantee
Source test intent: generates a unique agent identity for each registration. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1, I2. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1, A2 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A3, A4, A5 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:154; assertion/input source links below. Source key: tests/registration.test.ts :: generates a unique agent identity for each registration :: line 154 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:154 — generates a unique agent identity for each registration. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
Source assertions
A1 line 163: expect(firstResponse.status).toBe(201)
A2 line 164: expect(secondResponse.status).toBe(201)
A3 line 170: expect(first.agent_id).not.toBe(second.agent_id)
A4 line 172: expect(first.endpoint_id).not.toBe(second.endpoint_id)
A5 line 174: expect(first.agent_name).not.toBe(second.agent_name)
Source inputs and operations
I1 line 155: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
I2 line 159: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
REG-029 — stores onboarding as incomplete for a new agent
Field
Source-backed specification or observation
1. Test ID and name
REG-029 — stores onboarding as incomplete for a new agent
2. Requirement or guarantee
Source test intent: stores onboarding as incomplete for a new agent. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:177; assertion/input source links below. Source key: tests/registration.test.ts :: stores onboarding as incomplete for a new agent :: line 177 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:177 — stores onboarding as incomplete for a new agent. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A2 line 199: expect(agent?.onboarding_completed).toBe(0)
Source inputs and operations
I1 line 178: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
REG-030 — sets created_at and last_active_at on registration
Field
Source-backed specification or observation
1. Test ID and name
REG-030 — sets created_at and last_active_at on registration
2. Requirement or guarantee
Source test intent: sets created_at and last_active_at on registration. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
See assertions A2 below. Only the shown negative/rejection checks are claimed; other forbidden effects require review.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:202; assertion/input source links below. Source key: tests/registration.test.ts :: sets created_at and last_active_at on registration :: line 202 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:202 — sets created_at and last_active_at on registration. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
A3 line 233: expect(agent!.created_at >= before).toBe(true)
A4 line 235: expect(agent!.created_at <= after).toBe(true)
A5 line 237: expect(agent!.last_active_at).toBe(agent!.created_at)
Source inputs and operations
I1 line 205: SELF.fetch(registrationUrl, {\n method: 'POST',\n })
REG-031 — generates unique agent names across 100 registrations
Field
Source-backed specification or observation
1. Test ID and name
REG-031 — generates unique agent names across 100 registrations
2. Requirement or guarantee
Source test intent: generates unique agent names across 100 registrations. Displayed assertions establish this test’s expected checks, not a separate system-wide guarantee.
3. Purpose and risk addressed
Detect regression of this named behaviour; complete business-impact/invariant analysis remains in the curated cases or follow-up review.
4. Priority
High — provisional catalogue triage; subject to risk review.
5. Test type
Regression — provisional grouping from the declaration name.
6. Preconditions
Use section C plus the cited file’s fixtures and setup/teardown hooks. Suite context: agent registration. Do not infer starting state from the title.
7. Input and test data
No each/for parameter table on this declaration; its callback may still generate inputs. Input/operation expressions: I1. Use disposable fixture data only.
8. Execution steps
1. Prepare the existing source test harness from section C. 2. Run pnpm test. 3. Locate this named declaration and its parameterized/conditional instances. 4. Compare the displayed assertions. 5. Record evidence and follow teardown. Not executed during this review.
9. Expected HTTP status, where applicable
See assertions A1 below. A numeric schema/helper expectation is not automatically an HTTP response contract.
10. Expected response headers and body
See assertions A1, A2, A3 below. Referenced variables remain symbolic; no universal response envelope is assumed.
11. Expected state changes
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
12. Expected emitted events or downstream calls, where applicable
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
13. Negative assertions: what must not happen
No direct assertion identified for this field; inspect the referenced helpers before stating an expectation.
14. Cleanup and postconditions
Use the cited file’s hooks/finally blocks and section C. Restore mocks and remove only isolated test data.
15. Actual result
Not run — no execution evidence collected.
16. Evidence references
tests/registration.test.ts:240; assertion/input source links below. Source key: tests/registration.test.ts :: generates unique agent names across 100 registrations :: line 240 at this pinned revision.
17. Execution date
Not run.
18. Status and outstanding issues
Existing declaration documented; indirect helper assertions and full semantic coverage are not inferred from static extraction.
tests/registration.test.ts:240 — generates unique agent names across 100 registrations. Run pnpm test from /home/johnny/projects/toastmachine-registration-worker after preparing its existing test environment; this invokes the suite.
22. Implementation status
Existing automated test
23. Execution status
Not run
24. Known limitations
Static source inventory only. Loops, parameter tables, shared helpers and conditional modifiers can change executed counts. Indirect helper assertions are not expanded.
25. Follow-up actions
Reconcile runtime instances with this declaration, review symbolic fixtures and unasserted effects, and record execution evidence. Preserve this ID.
This maps selected cases rather than all source assertions. An unselected category is not automatically absent from the Worker or wider suite.
Category
Applicability and selected coverage
Happy-path behaviour
Selected cases: REG-001. Their limitations apply.
Input validation and boundary conditions
Selected cases: REG-002. Their limitations apply.
Authentication and authorisation
Selected cases: REG-004. Their limitations apply.
API and contract compatibility
No dedicated selected case; applicability and wider coverage require investigation before marking Not applicable.
Data integrity and consistency
Selected cases: REG-001. Their limitations apply.
Idempotency and duplicate operations
No dedicated selected case; applicability and wider coverage require investigation before marking Not applicable.
Pagination and ordering
Selected cases: REG-005. Their limitations apply.
Dependency interactions
Selected cases: REG-006. Their limitations apply.
Timeout, retry and partial-failure handling
No dedicated selected case; applicability and wider coverage require investigation before marking Not applicable.
Security and abuse prevention
Selected cases: REG-003, REG-004, REG-005, REG-006. Their limitations apply.
Observability and diagnostics
No dedicated selected case; applicability and wider coverage require investigation before marking Not applicable. No complete logging, metrics, redaction or alerting guarantee is established here.
Regression tests
No dedicated selected case; applicability and wider coverage require investigation before marking Not applicable.
Integration and end-to-end tests
Selected cases: REG-001, REG-002, REG-005. Their limitations apply.
G. Execution instructions
pnpm test invokes vitest run. pnpm typecheck, pnpm lint and pnpm format:check are separate checks. The deployment workflow runs code/format/security checks but does not invoke pnpm test or Vitest.
Run documented commands from /home/johnny/projects/toastmachine-registration-worker only in the prepared test environment. None was run here. Commands are defined in package.json; release behaviour is declared in the CI/deploy workflow. Each case names its existing assertions or proposed location.
Execution layer
Instruction and evidence boundary
Setup and teardown
Use section C and the cited fixtures; record environment and revision and remove only disposable test data.
Unit tests
Use the package suite for the relevant direct-helper cases; no separate unit-only command is assumed.
Integration tests
Use the existing harness and service replacements. This does not prove a live cross-deployment guarantee.
Contract tests
Use the existing package suite. Resources also defines openapi:check; schema checks do not replace runtime assertions.
Proposed tests
Implement the specified case first; a proposed path is not an existing runnable test.
CI workflow references
The inspected deployment workflow does not invoke the application suite. Other build/type/schema checks do not establish these cases executed.
H. Results and evidence
Test ID
Last run
Result
Evidence
Notes
REG-001
Not run
Not run
Source/test inspection only; no execution log.
Existing automated test
REG-002
Not run
Not run
Source/test inspection only; no execution log.
Partially covered
REG-003
Not run
Not run
Source/test inspection only; no execution log.
Existing automated test
REG-004
Not run
Not run
Source/test inspection only; no execution log.
Existing automated test
REG-005
Not run
Not run
Source/test inspection only; no execution log.
Existing automated test
REG-006
Not run
Not run
Source/test inspection only; no execution log.
Proposed test, not implemented
Execution status
Meaning
Not run
No result is recorded in this review.
Passing
A recorded execution met the scoped assertions in its stated environment.
Failing
A recorded execution did not meet one or more assertions.
Blocked
An identified prerequisite prevents execution.
Skipped
Deliberate non-execution with a recorded reason.
Implementation status
Meaning
Existing automated test
Named assertions cover the scoped case, subject to its stated limitations.
Partially covered
Related assertions exist but specific expectations still need verification.
Proposed test, not implemented
New automated implementation is proposed, not claimed to exist.
Blocked by missing prerequisites
A specified prerequisite prevents implementation.
A passing related test does not establish every associated guarantee. Record command, environment, immutable revision, run date and output evidence before changing an execution result. Source inspection is not execution evidence.
Complete automated source catalogue results
These entries correspond to source declarations, not additional or runtime-expanded tests.
REG-002 needs a database-mutation assertion, not just a 400 response.
The limiter rejection branch has no matching automated case located; REG-006 proposes it. Limiter outage and duplicate-name exhaustion remain additional untested branches in this review.
Sequential unique-name examples do not establish collision safety under concurrent registration. No availability, latency or capacity target was found.
Credential scheme/UUID syntax tests do not by themselves prove every onboarding-update permission or deployment trust boundary.
Known flaky tests and historical failure rates: Unknown; execution history was not assessed. No new reproduced application defect is claimed. Follow-up ownership and execution dates remain unassigned. Characterization proposals may expose a requirement decision without establishing a stronger approved guarantee.