Skip to content

fix: send the rendered functionality when recreating conformance tests - #337

Draft
NejcS wants to merge 1 commit into
mainfrom
fix/eng-337-credit-key-on-conformance-test-regeneration
Draft

NejcS wants to merge 1 commit into
mainfrom
fix/eng-337-credit-key-on-conformance-test-regeneration

Conversation

@NejcS

@NejcS NejcS commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

The problem

A render stops in the middle. The user sees this and nothing more:

Error rendering plain code: 404 Client Error: Not Found for url: https://api.codeplain.ai/generate_folder_name_from_functional_requirement

The message helps nobody. 404 means "not found". So it reads like the server is down, or like an address is wrong. Both are false. The address is correct and the server is healthy.

The user waits about 45 seconds while the client tries the same call four more times. Then the render stops. Tests that were already built are deleted, so the user starts again.

Why this change fixes it

This is the part that looks unrelated, so here it is step by step.

The 404 does not mean "address not found". The server also answers 404 when it cannot find reserved credits for a call.

The server reserves credits for the one functionality the user is rendering. Every call must name that functionality, or the server finds no credits and refuses.

Near the end of a render, the renderer tests the functionalities that came before. If one of those older tests keeps failing, the renderer builds the tests of that older functionality again. That one call named the older functionality. The server looked for credits under the older functionality. There were none, because the credits belong to the functionality being rendered. So it answered 404.

This change makes that call name the functionality being rendered, which is what every other call already does. The server finds the credits. The render continues.

Closes ENG-337. Sentry: CODEPLAIN-23.

The API reserves credits for the functionality being rendered and keys the
reservation on the frid and module name the client sends. When regression
recreates the conformance tests of an earlier functionality, the call named
that earlier functionality instead. The API found no reservation and answered
404, and the render stopped.

Every other call in the conformance test loop already names the rendered
functionality. This one now does too. The functionality under test still
drives the folder name, through functional_requirement and
existing_folder_names.

ENG-337
@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch was successfully deployed

1 active deployment
pypi — 7475e998 Deployed Oct 20, 2026 by NejcS via Publish dev build to PyPI #28
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