feat: migrate template runtime support to AgentSeek API - #172
Conversation
webup
left a comment
There was a problem hiding this comment.
Requesting changes at 55d5bda284170430e618e407e2698bf9de1fc21d.
The hosted checks are green, but the migration contract still has user-visible regressions:
- Use consistent dotenv semantics for child processes. The new
_read_env_file()only strips outer quotes. Values containing inline comments or quoted escapes can therefore passdoctorwith one value and reach the child with a different literal value. Please reuse the same standards-compliant dotenv parser used by settings/readiness, and cover comments, quotes, escapes, andexport. - Preserve v1 service
techin normalized/JSON output.ServiceV1.techis now accepted and shown by human output, but_v1_services_and_checks()still constructsNormalizedService(tech=None). As a result,agentseek infoandagentseek info --jsondisagree. - Reconcile all lifecycle documentation. The updated reference says
.envis injected intoagentseek devchildren, while other maintained documentation still says it is never injected. - Verify shell precedence through the target runtime. AgentSeek applies the shell last, but
agentseek-apisubsequently reloads thelanggraph.jsonenv file and overwrites inherited values. The composed path therefore does not satisfy this PR's shell-wins promise. Please coordinate the runtime fix and add a cross-repository regression test.
Because the companion template migration does not yet start successfully from a fresh generated project, Closes #170 is also premature.
|
Thanks for the detailed review. Addressed in 0840315:
Also removed the premature Closes #170; the PR now links it as Related until the runtime follow-up and template companion PR have landed. Validation: 264 lifecycle tests passed, ruff passed for changed lifecycle code/tests, and git diff --check passed. |
webup
left a comment
There was a problem hiding this comment.
Requesting changes at 08403159b203f76263fd7e272799f03ef7b4f1a6.
Thanks for fixing the dotenv syntax cases, v1 tech projection, real-child coverage, and the conflicting lifecycle docs. The hosted suite is green, but the migration still has these blockers:
- [P1] Keep every declared-supported installation importable.
core.pyimportspydantic_settings.sources.providers.dotenv, an internal path that is absent from the declared minimumpydantic-settings==2.0.0. A clean Python 3.13 floor install currently fails beforeagentseek --helpcan start withModuleNotFoundError. Please use a public API and declare its package directly, or raise the minimum to the first compatible version and test that exact floor in CI. The same import should also be corrected before the coordinated API runtime is released. - [P1] Deliver shell-over-
.envprecedence through the actual runtime. AgentSeek now produces a child environment with the shell value, but publishedagentseek-api==0.2.1reloadslanggraph.json's env file afterward. The exact composed result remainschild=from-shell,runtime=from-dotenv. API PR #69 produces the desired result, but it is still open, has no completed checks, and no fixed release exists. Please land and release the runtime fix, require that release from the migrated templates, and add one composedagentseek devregression with conflicting values. - [P2] Keep the guide aligned with the immutable catalog. The English and Chinese template guides say locked
langchain/markdown-messagesusesagentseek-api dev, while this repository still pins catalog commit494863bc..., whose lifecycle runslanggraph dev. Revert the claim until the companion template commit is merged and this repository's lock/snapshot is updated to it. - [P2] Make empty-value precedence consistent. Readiness uses
env_ignore_empty=True, so exportedFOO=""falls back to.env;_process_environment()then passes the empty shell value to the child.doctorcan therefore pass on one value while the backend receives another. Choose and document one rule, then assert the same resolved value in readiness and the spawned child. - [P2] Do not close #170 before the cross-repository migration is complete. Editing the body to say "Related" did not remove GitHub's closing association: live
closingIssuesReferencesstill contains #170. Please remove that association until the runtime release, template migration, catalog update, and composed smoke are complete.
Suggested pre-commit gate:
set -euo pipefail
export UV_CACHE_DIR="$(mktemp -d)/uv-cache"
# Test the exact dependency floor declared in pyproject.toml.
uv run --python 3.13 --isolated --no-project \
--with-editable . \
--with pydantic-settings==2.0.0 \
agentseek --help
# Exercise all lifecycle behavior and documentation touched by this PR.
uv run --locked python -m pytest -q \
tests/cli_commands/test_lifecycle.py \
tests/cli_commands/test_lifecycle_authored.py \
tests/cli_commands/test_lifecycle_json.py \
tests/cli_commands/test_lifecycle_normalization.py \
tests/cli_commands/test_lifecycle_safety.py \
tests/test_docs_lifecycle.py \
tests/cli_commands/test_locked_catalog.py
uv run --locked ruff check src/agentseek/cli/lifecycle tests/cli_commands tests/test_docs_lifecycle.py
uv run --locked ruff format --check src/agentseek/cli/lifecycle tests/cli_commands tests/test_docs_lifecycle.py
git diff --check
# This must be zero before merge.
gh pr view 172 --repo ob-labs/agentseek \
--json closingIssuesReferences \
--jq '.closingIssuesReferences | length'Expected results: CLI floor import exits 0; tests/lint/format/diff checks have zero failures; the closing count is 0. Also add these behavioral assertions to CI rather than relying only on local output:
.env: FOO=from-dotenvplus shellFOO=""yields the same documented value in readiness and the child.- A freshly rendered migrated template launched through
agentseek devseesSENTINEL=from-shellwhen.envcontainsSENTINEL=from-dotenv. - The composed smoke prints a fixed
agentseek-apirelease version, reaches/health, and completes assistant -> thread -> run -> wait withstatus=success. - The catalog commit actually used by the wheel has the lifecycle command described by both guides.
|
Thanks for the detailed review. Commit
The remaining runtime blocker is intentionally not claimed as fixed here. Published The requested lifecycle/docs tests, lint, formatting, diff check, lock check, and minimum-floor CLI check pass for this commit. |
Summary
This PR provides the AgentSeek lifecycle support required by the LangGraph CLI to AgentSeek API template migration tracked in #170.
Related PRs and merge order
Validation
Tracking
Related: #170. Issue #170 remains open while the runtime follow-up is merged and released and the template companion PR is merged.