Skip to content

sync: mirror from thyn-ai/codna@5d00f705715460068630300ec33528e079f6949b - #39

Closed
0xamlab wants to merge 1 commit into
mainfrom
sync/5d00f705715460068630300ec33528e079f6949b
Closed

0xamlab wants to merge 1 commit into
mainfrom
sync/5d00f705715460068630300ec33528e079f6949b

Conversation

@0xamlab

@0xamlab 0xamlab commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Automated mirror of cli/ (flattened), the root allowlist (server.json, glama.json, LICENSE, .gitleaks.toml) and the public-root/ community tree from thyn-ai/codna at 5d00f705715460068630300ec33528e079f6949b. Merges itself via auto-merge once the mirror's required checks (codna review, Analyze (python)) pass and the codna-ai review approves; if a later sync lands first, this PR is closed as superseded -- every sync PR is a full snapshot of the exported surface.

@0xamlab
0xamlab enabled auto-merge (squash) November 4, 2026 22:52
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request in the Codna CLI! Please make sure the checks are green and that the change follows CONTRIBUTING.md. A maintainer will review it shortly.

@0xamlab

0xamlab commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #40 (a later thyn-ai/codna commit). Every sync PR is a full snapshot of the exported surface, so this one carries nothing #40 does not. Closing.

@0xamlab 0xamlab closed this Nov 4, 2026
auto-merge was automatically disabled November 4, 2026 22:52

Pull request was closed

@0xamlab
0xamlab deleted the sync/5d00f705715460068630300ec33528e079f6949b branch November 4, 2026 22:52

@codna-ai codna-ai 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.

codna review — 3 finding(s): 3 inline, 0 in summary.

Reply @codna fix on a finding to have Codna open a verified, test-green, risk-gated fix PR.

⏸ Not approved: 3 medium/high finding(s) in this review.

from pathlib import Path
from typing import Any, Callable, Final, Mapping

from temporalio import activity

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔴 HIGH · correctness — Module-level import of temporalio breaks codna without the durable extra

activities.py has from temporalio import activity at module scope (line 34). The package docstring and __init__.py guarantee that importing codna.durable must NOT import temporalio. Any code path that transitively imports codna.durable.activities at module scope — without going through require_durable() first — will raise ModuleNotFoundError when the durable extra is not installed, breaking the base CLI. If durable/cli.py or anything it imports transitively pulls in activities.py at import time, the base codna command fails for all users who haven't installed the extra.

Reply @codna fix and Codna opens a verified, test-green, risk-gated fix PR.

Comment thread codna/durable/__init__.py
Comment on lines +102 to +106
DURABLE_RANGES: Final[dict[str, str]] = {
"temporalio": ">=1.34,<2",
"langgraph": ">=1,<2",
"langchain-core": ">=1,<2",
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM · correctness — DURABLE_RANGES missing langgraph-checkpoint entry

DURABLE_PINS declares four requirements including langgraph-checkpoint (minimum=(4,), maximum=(5,)), but DURABLE_RANGES only contains entries for three distributions — it omits langgraph-checkpoint. When require_durable() rejects an out-of-range langgraph-checkpoint install, the error details include "range": DURABLE_RANGES.get(requirement.distribution, "") which evaluates to "" for this package. The user sees an empty range string and cannot determine what version to install.

Suggested change
DURABLE_RANGES: Final[dict[str, str]] = {
"temporalio": ">=1.34,<2",
"langgraph": ">=1,<2",
"langchain-core": ">=1,<2",
}
DURABLE_RANGES: Final[dict[str, str]] = {
"temporalio": ">=1.34,<2",
"langgraph": ">=1,<2",
"langchain-core": ">=1,<2",
"langgraph-checkpoint": ">=4,<5",
}

Reply @codna fix and Codna opens a verified, test-green, risk-gated fix PR.

Comment thread codna/config_file.py
Comment on lines +136 to +137
netloc = parts.netloc
return f"{parts.scheme}://{netloc}{path}"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 MEDIUM · security — Validated base URL reconstruction uses raw netloc including potential credential

In _validated_base_url, the function checks parts.username or parts.password and raises if present. However the reconstructed URL f"{parts.scheme}://{netloc}{path}" uses parts.netloc, which for urlsplit INCLUDES the userinfo portion (e.g. user:pass@host). If the credential check is ever bypassed or refactored, the returned URL will silently reinclude the embedded credential. A safer construction would be f"{parts.scheme}://{parts.hostname}" + (f":{parts.port}" if parts.port else "") + path to explicitly exclude any userinfo.

Reply @codna fix and Codna opens a verified, test-green, risk-gated fix PR.

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