Skip to content

test(services): add regression coverage for POST .../create returning real _id - #166

Merged
datvt243 merged 1 commit into
stagingfrom
157-post-create-responses
Sep 27, 2026
Merged

datvt243 merged 1 commit into
stagingfrom
157-post-create-responses

Conversation

@datvt243

Copy link
Copy Markdown
Owner

Summary

Closes #157. The production fix was already live on staging since commit f355e2f (2026-08-21) — baseCreateDocument's hookAfterSave result was already propagated correctly — but no regression test ever covered it and the diagram node was never backfilled.

  • src/__tests__/services/baseCreateDocument.test.ts — direct unit coverage of the hookAfterSave replacement propagation.
  • src/__tests__/candidate_profile/BaseService.test.ts — spot-checks a real CV section create flow through the unmocked createCrudService/BaseService.ts/services/index.ts code path (only the Mongoose model is faked) — confirms the response's _id is the real persisted id, not null.
  • agent-hub/: backfilled evidence (implementer + verifier) and sealed node fix-create-response-null-id.

Commits

  • e599a16 test(services): add regression coverage for POST .../create returning real _id

Test plan

  • npm test — 140 passed, 140 total
  • npm run build — clean

🤖 Generated with Claude Code

… real _id

Closes #157. The production fix was already live on `staging` since
commit f355e2f (2026-08-21) — `baseCreateDocument`'s hookAfterSave
result was already propagated correctly — but no regression test ever
covered it and the diagram node was never backfilled.

- src/__tests__/services/baseCreateDocument.test.ts: direct unit
  coverage of the hookAfterSave replacement propagation.
- src/__tests__/candidate_profile/BaseService.test.ts: spot-checks a
  real CV section create flow through the unmocked
  createCrudService/BaseService.ts/services/index.ts code path (only
  the Mongoose model is faked) — confirms the response's _id is the
  real persisted id, not null.
- agent-hub: backfill evidence (implementer + verifier) and seal node
  fix-create-response-null-id.

npm test: 140 passed, 140 total. npm run build: clean.

Node: fix-create-response-null-id (SEALED)
Evidence: agent-hub/evidence/implementer/2026-09-28/fix-create-response-null-id-plan.md,
agent-hub/evidence/verifier/2026-09-28/fix-create-response-null-id-seal.md

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@datvt243
datvt243 merged commit c28d31c into staging Sep 27, 2026
3 checks passed
@datvt243
datvt243 deleted the 157-post-create-responses branch September 27, 2026 17:46
@datvt243 datvt243 mentioned this pull request Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant