Skip to content

Codex-generated pull request#146

Open
rickisba wants to merge 1 commit into
mainfrom
codex/-github-#139
Open

Codex-generated pull request#146
rickisba wants to merge 1 commit into
mainfrom
codex/-github-#139

Conversation

@rickisba

Copy link
Copy Markdown
Collaborator

Codex generated this pull request, but encountered an unexpected error after generation. This is a placeholder PR message.


Codex Task

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 806cf4dca0

ℹ️ 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".

Comment on lines +100 to +103
relative = kv_rel_dir or (kid or "").strip().lower()
if not relative:
raise ValueError("legacy replica location must not be empty")
candidate = (root / relative).resolve()

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Inspect the same directory used by KV injection

When legacy kv_rel_dir is stale, corrupted, . or points to another existing cache directory, this wrapper reports the replica as healthy because it checks <kv_root>/<kv_rel_dir>. The actual injection path explicitly ignores this field and loads <kv_root>/<kid> in kdn_server/kdn_api.py:875-876, so the health view can claim readiness while injection fails with a missing manifest. Base the filesystem check on the runtime kid directory, or report a mismatch rather than treating the unrelated directory as healthy.

AGENTS.md reference: AGENTS.md:L227-L230

Useful? React with 👍 / 👎.

Comment thread core/state_models.py
Comment on lines +221 to +222
class _StateModel(BaseModel):
model_config = ConfigDict(extra="forbid")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make lifecycle models immutable

Because _StateModel uses Pydantic's default mutable model configuration, callers can execute assignments such as artifact.state = ArtifactState.READY or change a terminal DELETED object back to another state without invoking transition_to. Such objects then serialize normally, bypassing _TRANSITIONS, terminal-state checks, and structured transition errors. Freeze these lifecycle models, or otherwise prevent direct state assignment, so the advertised transition contract cannot be bypassed accidentally.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant