feat: fuzz route contracts across runtimes - #1797
Conversation
๐ WalkthroughWalkthroughContractGraph ๊ธฐ๋ฐ ๊ณ์ฝ ํผ์ง๊ณผ ๋ฐํ์ ์ฐจ๋ถ ๊ฒ์ฆ API๊ฐ ์ถ๊ฐ๋์์ต๋๋ค. ์คํจ ์ํฐํฉํธ, lifecycle capability, ์์ฑ ์ ํ๋ฆฌ์ผ์ด์ ์ค๋ชจํฌ ํ ์คํธ, ๋ผ์ฐํธ ์ฑ๊ณต ์ํ์ ๊ด๋ จ Problem ๋ฌธ์๋ ๊ฐฑ์ ๋์์ต๋๋ค. Changes๊ณ์ฝ ํ ์คํธ ๊ธฐ๋ฅ
Estimated code review effort: 5 (Critical) | ~120 minutes Possibly related PRs
๐ฅ Pre-merge checks | โ 4 | โ 1โ Failed checks (1 warning)
โ Passed checks (4 passed)
โจ Finishing Touches ๐ก 1๐ Generate docstrings ๐ก
๐งช Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
๐ก Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b04ab6421f
โน๏ธ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with ๐.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
๐ Benchmark Resultsโ All benchmarks passed
Updated: 2026-08-09T22:20:32.566Z ยท Commit: e35a6dd |
b04ab64 to
be5641f
Compare
91f0d70 to
8d83510
Compare
There was a problem hiding this comment.
Actionable comments posted: 20
Caution
Some comments are outside the diff and canโt be posted inline due to platform limitations.
โ ๏ธ Outside diff range comments (1)
packages/testing/src/tests/ConformanceContract.spec.ts (1)
68-85: ๐ Maintainability & Code Quality | ๐ก Minor | โก Quick win์ ๋ ฌ๋ helper ๋ชฉ๋ก์ ์ ์งํ์ญ์์ค.
PUBLIC_CONFORMANCE_HELPER_EXPORTS๋ ์ํ๋ฒณ ์์ด์ด์ผ ํฉ๋๋ค.createContractCaseArbitrary๋createAuthProviderConformanceSuite์๋๋ก,createFileContractFailureSink๋createDrizzleProviderConformanceSuite์๋๋ก ๋ด๋ ค์ผ ํฉ๋๋ค. test order assertion์ด ์๋๋ผ๋ ๋ชฉ๋ก ์์๋ฅผ ์ ์งํด ๊ฐ๋ ์ฑ์ ์ ์งํ์ญ์์ค.๐ค Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/testing/src/tests/ConformanceContract.spec.ts` around lines 68 - 85, ์ ๋ ฌ๋ helper ๋ชฉ๋ก์ ์ ์งํ๋๋ก PUBLIC_CONFORMANCE_HELPER_EXPORTS๋ฅผ ์์ ํ์ญ์์ค. createContractCaseArbitrary๋ฅผ createAuthProviderConformanceSuite ๋ค๋ก ์ด๋ํ๊ณ , createFileContractFailureSink๋ฅผ createDrizzleProviderConformanceSuite ๋ค๋ก ์ด๋ํด ์ ์ฒด ๋ชฉ๋ก์ด ์ํ๋ฒณ ์์๊ฐ ๋๊ฒ ํ์ญ์์ค.
๐ค Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/create-croco-app/src/tests/templates-build.spec.ts`:
- Around line 888-897: ํ
ํ๋ฆฟ์ devDependencies ๊ฒ์ฆ์ ContractFuzz.spec.ts๊ฐ ์ฌ์ฉํ๋
`@croco/protocols-core` ์์กด์ฑ์ ์ถ๊ฐํ์ธ์. templates-build.spec.ts์ ๊ธฐ์กด devDependencies ๊ฒ์ฆ
๋ธ๋ก(๋ผ์ธ 858 ๋ถ๊ทผ)์์ package.json.hbs์ ํด๋น ํญ๋ชฉ์ด ์ ์ง๋๋์ง ํ์ธํ๋๋ก ์
๋ฐ์ดํธํ๊ณ , ๊ธฐ์กด
ContractFuzz.spec.ts ๋ด์ฉ ๊ฒ์ฆ์ ๊ทธ๋๋ก ์ ์งํ์ธ์.
In
`@packages/create-croco-app/templates/ai-saas/apps/api-server/package.json.hbs`:
- Line 51: Remove the unused `@croco/protocols-core` entry from the ai-saas
templateโs devDependencies in package.json.hbs, since the template does not use
buildContractGraph, runContractFuzz, or runContractRuntimeDifferential. Do not
add a replacement dependency unless implementing the contract fuzzing smoke test
as part of this change.
In
`@packages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.ts`:
- Line 77: Update the assertion in ContractFuzz so numRuns is derived from the
pr entry in CONTRACT_TEST_PROFILES instead of using the hardcoded value 32.
Preserve the existing status and runtime expectations.
- Line 41: Replace the runtime-only keys in runtimeEvidence with per-request
correlation keys: assign each request a unique header value, have the middleware
store evidence under that value, and update observe() to retrieve and remove the
matching entry after the response. Ensure concurrent requests cannot read or
overwrite another requestโs evidence while preserving the existing node/lambda
runtime handling.
- Around line 43-44: Reset the global DI Container before each test in the
generated contract verification suite, using a beforeEach hook alongside the
describe block containing the fuzzing/parity test. Ensure each test starts with
a fresh Container so createCrocoAppโs LOGGER_TOKEN and EntitlementManager
registrations do not accumulate across generated app specs.
- Around line 250-257: Replace the generic Error thrown by
runtimeEvidenceMiddleware when runtime context is missing or unsupported with
the appropriate RFC 7807 Problem subclass, preserving the existing validation
behavior. Also update the Error throws at the referenced request-path-adjacent
symbols around the other two failure sites to use Problem subclasses, while
leaving out-of-request assertion handling unchanged unless required by the same
guideline.
- Around line 258-268: Update the middleware around the lifecycle evidence setup
so runtime.shutdown() is performed only for the dedicated lifecycle-observation
request, not every fuzzing request; keep the shared kernel usable across
subsequent requests. Ensure the work registered through runtime.waitUntil() is
fully drained before calling runtime.flush(), using the adapterโs existing
completion behavior rather than relying on microtask ordering, while preserving
the evidence flags.
- Around line 58-65: Update the fuzzCases mapping around
createContractCaseArbitrary so invalid cases retain their generated query input
instead of replacing it with the fixed status value. Only merge required
overrides without discarding generated fields, while preserving the traceparent
header injection for all cases.
In
`@packages/docs/src/content/docs/api/testing/src/classes/ContractRuntimeMismatchProblem.md`:
- Line 8: Update the JSDoc for ContractRuntimeMismatchProblem,
ContractTestingProblem, and UnsupportedContractGenerationProblem to describe
each as a concrete Problem subclass rather than a base abstract error class.
Regenerate and validate the API documentation so all three Markdown TypeDoc
outputs match the corrected source JSDoc:
packages/docs/src/content/docs/api/testing/src/classes/ContractRuntimeMismatchProblem.md:8,
packages/docs/src/content/docs/api/testing/src/classes/ContractTestingProblem.md:8,
and
packages/docs/src/content/docs/api/testing/src/classes/UnsupportedContractGenerationProblem.md:8.
In
`@packages/docs/src/content/docs/api/testing/src/type-aliases/RunContractFuzzOptions.md`:
- Around line 36-38: Update the runContractFuzz implementation to validate
options.numRuns as a positive integer and cap it at the active
profileConfiguration.numRuns maximum before passing it to fc.check. For invalid
or over-limit values, throw the established RFC 7807 Problem subclass, then
regenerate the TypeDoc output with pnpm docs:api:check so
RunContractFuzzOptions.md reflects the source contract.
- Around line 42-44: Update the TypeScript source for RunContractFuzzOptions so
seed and path form a discriminated union, requiring seed whenever path is
provided and preserving the independent seed-only/default case. Do not edit the
generated API markdown directly; update the source definition and regenerate or
adjust the documentation checks accordingly.
In `@packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md`:
- Around line 9842-9854: Separate the recovery guidance by Problem code in
packages/docs/src/content/docs/en/reference/problem-recovery-cookbook.md:9842-9854,
replacing the generic validation cause and action with guidance for unsupported
schema shapes that directs users to supported types or caller-owned arbitrary
values. Apply corresponding distinct guidance at 9860-9876 for counterexample or
shrink reproduction invariant failures, directing investigation of the runner,
route classification, and executor; at 9878-9894, address mismatches among
runtime observations, capability manifests, and trace propagation by directing
comparison of the relevant runtime contracts.
In `@packages/testing/package.json`:
- Around line 69-71: Move zod from dependencies to peerDependencies in the
package configuration for `@croco/testing`, preserving the existing ^3.23.8
version range. Ensure the package no longer installs a separate zod instance
while keeping zod available to contract-testing.ts and generated templates
through the consumerโs dependency.
In `@packages/testing/src/libs/contract-testing.ts`:
- Around line 459-468: Update the lifecycle pair comparison in the containing
contract-testing function to replace the silent continues for missing targets or
observations with the same ContractRuntimeMismatchProblem failure handling used
in the existing lines 471-475 path. Ensure each target is validated before
accessing its runtime, including checking left before left.runtime, and do not
allow missing lifecycle inputs to reach the passed result.
- Around line 836-852: Replace stableSerialize usage in assertCanaryAbsent with
a dedicated containsSecret traversal that detects the secret in strings, symbol
descriptions, and property keys, prevents infinite recursion with a Set, and
continues through class instances or unsupported prototypes without throwing.
Add a regression test in ContractTesting.spec.ts covering a class-instance span
with no canary leak and preserving the existing failure behavior when the secret
is present.
- Around line 704-710: Validate that the union options collected in the
ZodUnion/ZodDiscriminatedUnion branch are non-empty before calling fc.oneof.
When no options are available, throw the established
UnsupportedContractGenerationProblem with a diagnostic message identifying the
schema path, instead of invoking fc.oneof without arguments; preserve the
existing mapping for valid options.
- Line 512: Register the diagnostic code testing/contract-execution-failed in
docs/problem-code-registry.json, matching the format and metadata used by the
existing contract-testing diagnostic codes. Keep the code value consistent with
the fallback in the problemCode assignment.
- Around line 315-325: Extend RouteIR and ContractGraphRoute with a
successStatus field, and propagate it through contract extraction using
route.routeContract?.statusCode or the route metadataโs success status. Update
assertContractObservation to validate the observed 2xx status against this
configured successStatus instead of always requiring 200, preserving the
existing schema validation behavior.
In `@packages/testing/src/tests/ContractRuntimeDifferentialIntegration.spec.ts`:
- Around line 149-153: Move the Container.reset() call from afterEach into a
beforeEach hook so every test starts with a clean DI container before createApp
initializes it. Keep the existing server cleanup and runtimeEvidence clearing in
afterEach, and preserve test-instance initialization behavior.
In `@packages/testing/src/tests/ContractTesting.spec.ts`:
- Around line 388-396: In the targeted replay environment test, replace manual
process.env backup, mutation, and restoration around runContractFuzz with
Vitestโs vi.stubEnv and vi.unstubAllEnvs APIs. Import vi from vitest, stub each
CROCO_CONTRACT_* variable, and use vi.unstubAllEnvs in finally; remove the
previous snapshot and manual cleanup logic.
---
Outside diff comments:
In `@packages/testing/src/tests/ConformanceContract.spec.ts`:
- Around line 68-85: ์ ๋ ฌ๋ helper ๋ชฉ๋ก์ ์ ์งํ๋๋ก PUBLIC_CONFORMANCE_HELPER_EXPORTS๋ฅผ
์์ ํ์ญ์์ค. createContractCaseArbitrary๋ฅผ createAuthProviderConformanceSuite ๋ค๋ก ์ด๋ํ๊ณ ,
createFileContractFailureSink๋ฅผ createDrizzleProviderConformanceSuite ๋ค๋ก ์ด๋ํด ์ ์ฒด
๋ชฉ๋ก์ด ์ํ๋ฒณ ์์๊ฐ ๋๊ฒ ํ์ญ์์ค.
๐ช Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
โน๏ธ Review info
โ๏ธ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 3c7b1300-5123-4cd5-963f-2910796376fe
โ Files ignored due to path filters (2)
packages/problems-core/src/generated/problem-code-registry.tsis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
๐ Files selected for processing (47)
.changeset/bounded-contract-fuzzing.mddocs/problem-code-registry.jsonpackages/create-croco-app/src/tests/templates-build.spec.tspackages/create-croco-app/templates/ai-saas/apps/api-server/package.json.hbspackages/create-croco-app/templates/ai-saas/apps/api-server/src/app.ts.hbspackages/create-croco-app/templates/saas/apps/api-server/package.json.hbspackages/create-croco-app/templates/saas/apps/api-server/src/app.tspackages/create-croco-app/templates/saas/apps/api-server/src/controllers/schemas.tspackages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.tspackages/docs/src/content/docs/api/problems-core/src/classes/Problem.mdpackages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractInvariantProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractRuntimeMismatchProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractTestingProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/UnsupportedContractGenerationProblem.mdpackages/docs/src/content/docs/api/testing/src/functions/assertContractObservation.mdpackages/docs/src/content/docs/api/testing/src/functions/createContractCaseArbitrary.mdpackages/docs/src/content/docs/api/testing/src/functions/createFileContractFailureSink.mdpackages/docs/src/content/docs/api/testing/src/functions/runContractFuzz.mdpackages/docs/src/content/docs/api/testing/src/functions/runContractRuntimeDifferential.mdpackages/docs/src/content/docs/api/testing/src/interfaces/ContractFailureSink.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractExecutionObservation.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractExecutor.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractFailureArtifact.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractFuzzReport.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractGeneratedCase.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractLifecycleObservation.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractLifecycleOutcome.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractRequestInput.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractRuntimeDifferentialOptions.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractRuntimeDifferentialReport.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractRuntimeLifecycleCapability.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractRuntimeTarget.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractTestProfile.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/RunContractFuzzOptions.mdpackages/docs/src/content/docs/api/testing/src/variables/CONTRACT_RUNTIME_LIFECYCLE_CAPABILITIES.mdpackages/docs/src/content/docs/api/testing/src/variables/CONTRACT_TEST_PROFILES.mdpackages/docs/src/content/docs/api/testing/src/variables/CONTRACT_TEST_SUPPORTED_ZOD_TYPES.mdpackages/docs/src/content/docs/en/reference/problem-recovery-cookbook.mdpackages/testing/README.mdpackages/testing/package.jsonpackages/testing/src/index.tspackages/testing/src/libs/contract-testing.tspackages/testing/src/tests/ConformanceContract.spec.tspackages/testing/src/tests/ContractRuntimeDifferentialIntegration.spec.tspackages/testing/src/tests/ContractTesting.spec.tspublic-api-surface.snapshot.json
8d83510 to
52e42c8
Compare
|
@coderabbitai resolve |
There was a problem hiding this comment.
Actionable comments posted: 7
โป๏ธ Duplicate comments (1)
packages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.ts (1)
296-309: ๐ฉบ Stability & Availability | ๐ Major | โก Quick win
waitUntil์์ ์ ์๋ฃ๋ฅผ ๋ช ์์ ์ผ๋ก ๊ธฐ๋ค๋ฆฌ์ญ์์ค.๋ผ์ธ 298์
setTimeout(..., 0)๊ธฐ๋ฐ Promise๋ฅผruntime.waitUntil์ ๋ฑ๋กํฉ๋๋ค. ๋ผ์ธ 306์ ๊ณง๋ฐ๋กawait runtime.flush()๋ฅผ ํธ์ถํฉ๋๋ค.setTimeout์ macrotask์ด๋ฏ๋กflush()์ await๋ง์ผ๋ก๋ ์๋ฃ๊ฐ ๋ณด์ฅ๋์ง ์์ต๋๋ค.๋ผ์ธ 223์ lambda ๊ฒฝ๋ก์์
evidence.waitUntilWorkCompleted๊ฐ false์ด๋ฉดfailed("work-incomplete")๋ฅผ ๊ธฐ๋กํฉ๋๋ค.normalizeLifecycleOutcome์failed์ํ์์ContractRuntimeMismatchProblem์ ๋์ง๋๋ค. ์ด๋ฒคํธ ๋ฃจํ ํ์ด๋ฐ์ ๋ฐ๋ผ ํ ์คํธ๊ฐ ๋น๊ฒฐ์ ์ ์ผ๋ก ์คํจํฉ๋๋ค.๋ฑ๋กํ Promise๋ฅผ ์ง์ญ ๋ณ์๋ก ๋ณด๊ดํ๊ณ ,
flush()ํธ์ถ ์ ์ ๊ทธ Promise๋ฅผ awaitํ์ญ์์ค.๐ค Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.ts` around lines 296 - 309, Update the lifecycle handling around the runtime.waitUntil call to store the registered completion Promise in a local variable, await that Promise before calling runtime.flush(), then preserve the existing evidence updates and shutdown observation.
๐ค Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/problem-code-registry.json`:
- Around line 15515-15544: Problem ์์ฑ ๋ก์ง์์ testing/contract-invariant-failed ๋ฐ
testing/contract-runtime-mismatch๋ฅผ operator-only/error ์ ์ฑ
์ผ๋ก ์ฒ๋ฆฌํ์ธ์. ๋ code์
extensions์๋ route classification, executor/runtime observations, shrink path,
operations, trace evidence๊ฐ ํฌํจ๋ ์ ์์ผ๋ฏ๋ก extensions๋ฅผ ๋น๊ณต๊ฐ ์ฒ๋ฆฌํ๊ณ Detail๋ง ๋
ธ์ถ๋๋๋ก ์์ฑ ์
์ ๋ฌ ๋๋ redaction ์ฒ๋ฆฌ๋ฅผ ์ ์ฉํ์ธ์. Problem Registry์ code๋ณ redaction ์ ์ฑ
๊ณผ ์ผ์นํ๋์ง ํจ๊ป ํ์ธํ์ธ์.
In `@packages/create-croco-app/src/tests/templates-build.spec.ts`:
- Around line 895-939: Update the ContractFuzz.spec.ts assertions in the
relevant template-build test to pass all required patterns through a single
checkFileContains call for that file. Replace the whitespace-sensitive
beforeEach and setTimeout regular expressions with format-independent patterns
that validate the key symbols and behavior without depending on generated line
breaks or indentation, while preserving the existing positive and negative
checks.
In `@packages/protocols-core/src/tests/extractRouteIR.spec.ts`:
- Around line 83-96: Extend the test around extractRouteIR to verify the legacy
default: before assigning first.statusCode = 201, assert that an unset
statusCode produces successStatus 200, while retaining the existing 201
assertion.
- Line 91: Replace the manual TypeError guard in the extractRouteIR test with a
Vitest assertion that verifies metadata[0] is defined before it is used, so
missing route metadata fails through the test assertion mechanism.
In `@packages/testing/src/libs/contract-testing.ts`:
- Around line 647-671: In injectCanaryHeader, simplify the mergedInput flow by
constructing the final returned input once and use that same object for
classification validation and return. Remove the duplicate
assertGeneratedCaseClassification call there, since runContractFuzz already
performs this check; preserve the conditional headers behavior and
transportHeaders in the returned ContractGeneratedCase.
In `@packages/testing/src/tests/ContractRuntimeDifferentialIntegration.spec.ts`:
- Around line 74-77: ๋ชจ๋ ๊ณ์ฝ ํ
์คํธ์ ์ผ๋ฐ Error throw๋ฅผ RFC 7807 Problem ํ์ํด๋์ค๋ก ๊ต์ฒดํ์ญ์์ค.
packages/testing/src/tests/ContractRuntimeDifferentialIntegration.spec.ts์ ๋ฐํ์
์ปจํธ๋กค๋ฌ ๋ฉ์๋(74-77)์ ๋์ผ ํ์ผ์ 194, 328, 439ํ Error๋ ์ ์ ํ Problem ํ์ํด๋์ค๋ก ๋ณ๊ฒฝํ์ญ์์ค.
packages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.ts
419-427ํ์์๋ ์ด๋ฏธ ์ํฌํธ๋ SaasDemoSmokeProblem์ ์ฌ์ฉํ์ญ์์ค.
In `@packages/testing/src/tests/ContractTesting.spec.ts`:
- Around line 529-537: Update the it.each test declaration for the structurally
lossy JSON counterexamples to include a case-name interpolation placeholder, and
provide distinct labels for the non-enumerable property, symbol key, and cyclic
reference inputs so failures identify the specific scenario.
---
Duplicate comments:
In
`@packages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.ts`:
- Around line 296-309: Update the lifecycle handling around the
runtime.waitUntil call to store the registered completion Promise in a local
variable, await that Promise before calling runtime.flush(), then preserve the
existing evidence updates and shutdown observation.
๐ช Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
โน๏ธ Review info
โ๏ธ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a066b673-e8e9-46cd-88a8-cff9a9e2eebc
โ Files ignored due to path filters (1)
packages/problems-core/src/generated/problem-code-registry.tsis excluded by!**/generated/**
๐ Files selected for processing (23)
.changeset/bounded-contract-fuzzing.mddocs/problem-code-registry.jsonpackages/create-croco-app/src/tests/templates-build.spec.tspackages/create-croco-app/templates/saas/apps/api-server/src/tests/ContractFuzz.spec.tspackages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.mdpackages/docs/src/content/docs/api/protocols-core/src/interfaces/RouteIR.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractInvariantProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractRuntimeMismatchProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/ContractTestingProblem.mdpackages/docs/src/content/docs/api/testing/src/classes/UnsupportedContractGenerationProblem.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/ContractReplayOptions.mdpackages/docs/src/content/docs/api/testing/src/type-aliases/RunContractFuzzOptions.mdpackages/docs/src/content/docs/en/reference/problem-recovery-cookbook.mdpackages/protocols-core/src/libs/RouteIR.tspackages/protocols-core/src/libs/extractRouteIR.tspackages/protocols-core/src/tests/extractRouteIR.spec.tspackages/testing/src/index.tspackages/testing/src/libs/contract-testing.tspackages/testing/src/tests/ConformanceContract.spec.tspackages/testing/src/tests/ContractRuntimeDifferentialIntegration.spec.tspackages/testing/src/tests/ContractTesting.spec.tspublic-api-surface.snapshot.jsonscripts/problem-registry.mts
โ Action performedComments resolved and changes approved. |
52e42c8 to
0f305f1
Compare
There was a problem hiding this comment.
Caution
Some comments are outside the diff and canโt be posted inline due to platform limitations.
โ ๏ธ Outside diff range comments (1)
public-api-surface.snapshot.json (1)
8169-8173: ๐ฏ Functional Correctness | ๐ก Minor | โก Quick win๊ณ์ฝ ํ ์คํธ PR scope์์
notifications-react-email๋ณ๊ฒฝ์ ๋ถ๋ฆฌํ์ธ์.
@croco/notifications-react-email,EmailContent,ReactEmailRenderProblem,renderReactEmail์ ๊ณ์ฝ ํผ์ง/๋ฐํ์ ์ฐจ๋ถ ๊ฒ์ฆ๊ณผ ์ง์ ์ฐ๊ด๋์ง ์์ ๋ณด์ ๋๋ค.@croco/engagement-core์EmailContent์์ถ๊ณผ ์ ํจํค์ง ์ถ๊ฐ๋งpublic-api-surface.snapshot.json๋ณ๊ฒฝ์ ์ผ์ผ์ผฐ๋ค๋ฉด ๋ณ๋ PR๋ก ๋ถ๋ฆฌํ๋ ๊ฒ์ด PR scope๋ฅผ ๋ช ํํ๊ฒ ์ ์งํฉ๋๋ค.๐ค Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@public-api-surface.snapshot.json` around lines 8169 - 8173, Remove the notifications-react-email-related API snapshot changes from this PR, including `@croco/notifications-react-email`, EmailContent, ReactEmailRenderProblem, and renderReactEmail; retain only the `@croco/engagement-core` EmailContent export and the new package addition required by the contract-test scope.
๐ค Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@public-api-surface.snapshot.json`:
- Around line 8169-8173: Remove the notifications-react-email-related API
snapshot changes from this PR, including `@croco/notifications-react-email`,
EmailContent, ReactEmailRenderProblem, and renderReactEmail; retain only the
`@croco/engagement-core` EmailContent export and the new package addition required
by the contract-test scope.
โน๏ธ Review info
โ๏ธ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 937c1adc-9f09-4e31-b936-1524aba33b4d
โ Files ignored due to path filters (2)
packages/problems-core/src/generated/problem-code-registry.tsis excluded by!**/generated/**pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
๐ Files selected for processing (7)
.github/workflows/pr-review-companion.ymldocs/problem-code-registry.jsonpackages/docs/src/content/docs/api/problems-core/src/classes/Problem.mdpackages/docs/src/content/docs/api/problems-core/src/variables/CROCO_PROBLEM_CODE_REGISTRY.mdpackages/docs/src/content/docs/en/reference/problem-recovery-cookbook.mdpublic-api-surface.snapshot.jsonscripts/problem-registry.mts
Outcome
ContractGraph/Zod metadata for valid and invalid requests.Reviewer context
croco.contract-test-failure.v1artifact; the existingcroco.test-evidence/v1contract remains unchanged.Verification
pnpm checkโ passed (24/25 applicable repository gates).pnpm docs:api:checkโ generated API docs match.CROCO_GENERATED_SMOKE_CASES=goal-saas-api pnpm create-croco-app:smokeโ contract verification, build, tests, demo flow, and failure drill passed.pnpm --dir packages/testing testโ 201 tests passed.pnpm --dir packages/create-croco-app testโ 143 tests passed.git diff --checkpassed.Review gates
Residual risk
Fixes #1489
Summary by CodeRabbit
์๋ก์ด ๊ธฐ๋ฅ
๋ฌธ์
๋ฒ๊ทธ ์์