release: v1.0.0-rc2 Fast Lane MCP runtime and publish pipeline - #6
Conversation
Reviewer's GuideRelease v1.0.0-rc2 introduces a hardened Windows Fast Lane runtime and task-root model, adds a dedicated Fast Lane/MCP tool and contracts into the MCP package, scopes runtime data per project/thread, and extends the tag-driven release workflow to build, verify, and publish the primary MCP ZIP plus AstrBot distributions as prerelease assets. Sequence diagram for the new fastlane_compile MCP toolsequenceDiagram
actor Host
participant MCPServer as server.fastlane_compile
participant DevkitFastlane as devkit_fastlane.compile_fast_lane
participant FastlaneCompiler as team_efficiency.compile_fast_lane
Host->>MCPServer: fastlane_compile(request, reasoning_effort, enable)
MCPServer->>DevkitFastlane: compile_fast_lane(request, reasoning_effort, enable)
DevkitFastlane->>FastlaneCompiler: compile_fast_lane(request, reasoning_effort, enable)
FastlaneCompiler-->>DevkitFastlane: plan: dict[str, Any]
DevkitFastlane-->>MCPServer: plan
MCPServer->>MCPServer: _fastlane_public_value(plan)
MCPServer-->>Host: envelope_success(clean_plan)
Flow diagram for the updated tag-driven release workflowflowchart TD
A[Tag pushed or selected] --> B[metadata job
validate plugin, MCP, AstrBot versions
and changelog]
B --> C[mcp-runtime job
Windows MCP runtime
uv lock/sync, ruff, py_compile, pytest]
B --> D[quality job
Ubuntu AstrBot checks
and Linux primary artifact test]
B --> E[fast-lane job
Windows Fast Lane contracts
ruff, py_compile, pytest]
C --> F[publish job
build primary MCP ZIP
and SHA-256]
D --> F
E --> F
F --> G[Build AstrBot wheel/sdist
compute SHA-256 checksum]
G --> H[Validate AstrBot wheel/sdist
package contents & metadata]
H --> I[Upload primary ZIP
and AstrBot artifacts
as GitHub Actions artifacts]
I --> J[Create GitHub Release
attach ZIP, checksums,
AstrBot dists
mark as prerelease when RC tag]
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've found 2 issues, and left some high level feedback:
Fixed security issues:
-
Command injection from untrusted input passed to OS command execution (link)
-
The Windows-specific path validation and pinning logic in
team_efficiency.py(alias rejection, reparse checks, directory pinning, etc.) has become quite large and intricate; consider extracting it into a dedicated helper module so the core Fast Lane compiler flow stays easier to follow and reason about. -
With the new scoped runtime config (
CODEX_PROJECT_*,CODEX_WORKSPACE_*,CODEX_THREAD_ID), it might be worth centralizing the environment-variable name sets used acrossdevkit_runtime.config, the MCP server, and tests into a single shared definition to avoid drift between the runtime, MCP config, and artifact-contract tests.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The Windows-specific path validation and pinning logic in `team_efficiency.py` (alias rejection, reparse checks, directory pinning, etc.) has become quite large and intricate; consider extracting it into a dedicated helper module so the core Fast Lane compiler flow stays easier to follow and reason about.
- With the new scoped runtime config (`CODEX_PROJECT_*`, `CODEX_WORKSPACE_*`, `CODEX_THREAD_ID`), it might be worth centralizing the environment-variable name sets used across `devkit_runtime.config`, the MCP server, and tests into a single shared definition to avoid drift between the runtime, MCP config, and artifact-contract tests.
## Individual Comments
### Comment 1
<location path="mcp-tools/tests/test_fastlane_runtime.py" line_range="50-59" />
<code_context>
+ assert result["error"]["code"] == "FASTLANE_REQUEST_INVALID"
+
+
+def test_fastlane_tool_never_spawns_or_executes() -> None:
+ """The MCP compiler emits descriptors; the host owns execution and refill."""
+
+ helper, request, _ = _sample_request()
+ try:
+ result = server.fastlane_compile(
+ request=request, reasoning_effort="ultra", enable=True
+ )
+ finally:
+ helper.tearDown()
+ assert result["ok"] is True
+ data = result["data"]
+ assert data["schema"] == "team-efficiency/fast-lane-plan-v1"
+ assert "host_actions" not in data
+ assert data["workflow_policy"]["dispatch_protocol"] == {
+ "schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
+ "tool": "collaboration.spawn_agent",
</code_context>
<issue_to_address>
**suggestion (testing):** Exercise the default `enable=False` and a non-dict request path for fastlane_compile
Currently, `fastlane_compile` is only covered with `enable=True` and a valid request dict, even though it guards against `type(request) is not dict` and `type(enable) is not bool` by returning `FASTLANE_REQUEST_INVALID`. Please add tests that pass a non-dict `request` (e.g., list or string) and a non-bool `enable` to assert this error code and keep the invalid-input contract stable.
</issue_to_address>
### Comment 2
<location path="mcp-tools/tests/test_fastlane_runtime.py" line_range="38-47" />
<code_context>
+def test_fastlane_tool_never_spawns_or_executes() -> None:
+ """The MCP compiler emits descriptors; the host owns execution and refill."""
+
+ helper, request, _ = _sample_request()
+ try:
+ result = server.fastlane_compile(
+ request=request, reasoning_effort="ultra", enable=True
+ )
+ finally:
+ helper.tearDown()
+ assert result["ok"] is True
+ data = result["data"]
+ assert data["schema"] == "team-efficiency/fast-lane-plan-v1"
+ assert "host_actions" not in data
+ assert data["workflow_policy"]["dispatch_protocol"] == {
+ "schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
+ "tool": "collaboration.spawn_agent",
</code_context>
<issue_to_address>
**suggestion (testing):** Add coverage for _fastlane_public_value to ensure nested null sentinels are removed from the MCP payload
The new `fastlane_compile` wraps the compiled plan with `_fastlane_public_value` to strip compiler-only `None` sentinels from nested structures before calling `envelope_success`. The current tests only check the top-level shape and `workflow_policy`, so they don’t confirm that nested `None` values are removed. Please add a test that injects known `None` fields into a synthetic plan and then exercises `_fastlane_public_value` (or `fastlane_compile`) to assert that those keys/items are absent in the returned payload, preserving the MCP “no nulls” contract.
Suggested implementation:
```python
def test_fastlane_tool_rejects_host_private_inputs() -> None:
"""Host attestations stay private; public MCP receives only an inert request."""
helper, request, _ = _sample_request()
try:
request["host_status"] = {"workflow_id": "foreign"}
result = server.fastlane_compile(
request=request, reasoning_effort="ultra", enable=True
)
finally:
helper.tearDown()
assert result["ok"] is False
assert result["error"]["code"] == "FASTLANE_REQUEST_INVALID"
def test_fastlane_tool_never_spawns_or_executes() -> None:
"""The MCP compiler emits descriptors; the host owns execution and refill."""
helper, request, _ = _sample_request()
try:
result = server.fastlane_compile(
request=request, reasoning_effort="ultra", enable=True
)
finally:
helper.tearDown()
assert result["ok"] is True
data = result["data"]
assert data["schema"] == "team-efficiency/fast-lane-plan-v1"
assert "host_actions" not in data
assert data["workflow_policy"]["dispatch_protocol"] == {
"schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
"tool": "collaboration.spawn_agent",
"model_source": "assignment.host_dispatch.model",
"reasoning_effort_source": "assignment.host_dispatch.reasoning_effort",
"inherit_current_session_model": False,
"require_explicit_route": True,
"missing_route_action": "reject",
}
def test_fastlane_public_value_strips_nested_nulls() -> None:
"""_fastlane_public_value removes compiler-only None sentinels from nested structures."""
raw_plan = {
"schema": "team-efficiency/fast-lane-plan-v1",
# Top-level None should be stripped.
"host_actions": None,
"workflow_policy": {
# Nested dict field with None should be stripped.
"null_field": None,
"dispatch_protocol": {
"schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
"tool": "collaboration.spawn_agent",
# Nested None key that should be stripped.
"optional_null": None,
# List containing a None item and an entry with a None-valued field.
"routes": [
{"id": "keep", "target": "foo"},
None,
{"id": "drop_field", "target": None},
],
},
},
# List of steps containing None and a step with a None-valued field.
"steps": [
{
"id": "step-1",
"description": "do something",
"maybe_null": None,
},
None,
],
}
public_plan = server._fastlane_public_value(raw_plan)
# Top-level None key removed.
assert "host_actions" not in public_plan
# Nested dict None keys removed.
assert "null_field" not in public_plan["workflow_policy"]
assert "optional_null" not in public_plan["workflow_policy"]["dispatch_protocol"]
# None list entries removed and None-valued fields dropped from remaining entries.
routes = public_plan["workflow_policy"]["dispatch_protocol"]["routes"]
assert len(routes) == 2
assert all(route is not None for route in routes)
assert routes[0]["id"] == "keep"
assert routes[0]["target"] == "foo"
assert routes[1]["id"] == "drop_field"
assert "target" not in routes[1]
# Steps list has None entries removed and None-valued fields stripped.
steps = public_plan["steps"]
assert len(steps) == 1
assert steps[0]["id"] == "step-1"
assert "maybe_null" not in steps[0]
```
If `server._fastlane_public_value` is not part of the public surface for tests (e.g., it is not imported or exposed on `server`), you may need to:
1. Import or expose `_fastlane_public_value` from the module that defines it so that `mcp-tools/tests/test_fastlane_runtime.py` can access it.
2. Alternatively, if you prefer testing via `fastlane_compile`, adapt the test to construct a request whose compiled plan contains the synthetic nested `None` sentinels, then assert against `result["data"]` after calling `server.fastlane_compile`. The core assertions about removal of `None` keys/items would remain the same.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
| def test_fastlane_tool_never_spawns_or_executes() -> None: | ||
| """The MCP compiler emits descriptors; the host owns execution and refill.""" | ||
|
|
||
| helper, request, _ = _sample_request() | ||
| try: | ||
| result = server.fastlane_compile( | ||
| request=request, reasoning_effort="ultra", enable=True | ||
| ) | ||
| finally: | ||
| helper.tearDown() |
There was a problem hiding this comment.
suggestion (testing): Exercise the default enable=False and a non-dict request path for fastlane_compile
Currently, fastlane_compile is only covered with enable=True and a valid request dict, even though it guards against type(request) is not dict and type(enable) is not bool by returning FASTLANE_REQUEST_INVALID. Please add tests that pass a non-dict request (e.g., list or string) and a non-bool enable to assert this error code and keep the invalid-input contract stable.
| helper, request, _ = _sample_request() | ||
| try: | ||
| request["host_status"] = {"workflow_id": "foreign"} | ||
| result = server.fastlane_compile( | ||
| request=request, reasoning_effort="ultra", enable=True | ||
| ) | ||
| finally: | ||
| helper.tearDown() | ||
| assert result["ok"] is False | ||
| assert result["error"]["code"] == "FASTLANE_REQUEST_INVALID" |
There was a problem hiding this comment.
suggestion (testing): Add coverage for _fastlane_public_value to ensure nested null sentinels are removed from the MCP payload
The new fastlane_compile wraps the compiled plan with _fastlane_public_value to strip compiler-only None sentinels from nested structures before calling envelope_success. The current tests only check the top-level shape and workflow_policy, so they don’t confirm that nested None values are removed. Please add a test that injects known None fields into a synthetic plan and then exercises _fastlane_public_value (or fastlane_compile) to assert that those keys/items are absent in the returned payload, preserving the MCP “no nulls” contract.
Suggested implementation:
def test_fastlane_tool_rejects_host_private_inputs() -> None:
"""Host attestations stay private; public MCP receives only an inert request."""
helper, request, _ = _sample_request()
try:
request["host_status"] = {"workflow_id": "foreign"}
result = server.fastlane_compile(
request=request, reasoning_effort="ultra", enable=True
)
finally:
helper.tearDown()
assert result["ok"] is False
assert result["error"]["code"] == "FASTLANE_REQUEST_INVALID"
def test_fastlane_tool_never_spawns_or_executes() -> None:
"""The MCP compiler emits descriptors; the host owns execution and refill."""
helper, request, _ = _sample_request()
try:
result = server.fastlane_compile(
request=request, reasoning_effort="ultra", enable=True
)
finally:
helper.tearDown()
assert result["ok"] is True
data = result["data"]
assert data["schema"] == "team-efficiency/fast-lane-plan-v1"
assert "host_actions" not in data
assert data["workflow_policy"]["dispatch_protocol"] == {
"schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
"tool": "collaboration.spawn_agent",
"model_source": "assignment.host_dispatch.model",
"reasoning_effort_source": "assignment.host_dispatch.reasoning_effort",
"inherit_current_session_model": False,
"require_explicit_route": True,
"missing_route_action": "reject",
}
def test_fastlane_public_value_strips_nested_nulls() -> None:
"""_fastlane_public_value removes compiler-only None sentinels from nested structures."""
raw_plan = {
"schema": "team-efficiency/fast-lane-plan-v1",
# Top-level None should be stripped.
"host_actions": None,
"workflow_policy": {
# Nested dict field with None should be stripped.
"null_field": None,
"dispatch_protocol": {
"schema": "team-efficiency/fast-lane-dispatch-protocol-v1",
"tool": "collaboration.spawn_agent",
# Nested None key that should be stripped.
"optional_null": None,
# List containing a None item and an entry with a None-valued field.
"routes": [
{"id": "keep", "target": "foo"},
None,
{"id": "drop_field", "target": None},
],
},
},
# List of steps containing None and a step with a None-valued field.
"steps": [
{
"id": "step-1",
"description": "do something",
"maybe_null": None,
},
None,
],
}
public_plan = server._fastlane_public_value(raw_plan)
# Top-level None key removed.
assert "host_actions" not in public_plan
# Nested dict None keys removed.
assert "null_field" not in public_plan["workflow_policy"]
assert "optional_null" not in public_plan["workflow_policy"]["dispatch_protocol"]
# None list entries removed and None-valued fields dropped from remaining entries.
routes = public_plan["workflow_policy"]["dispatch_protocol"]["routes"]
assert len(routes) == 2
assert all(route is not None for route in routes)
assert routes[0]["id"] == "keep"
assert routes[0]["target"] == "foo"
assert routes[1]["id"] == "drop_field"
assert "target" not in routes[1]
# Steps list has None entries removed and None-valued fields stripped.
steps = public_plan["steps"]
assert len(steps) == 1
assert steps[0]["id"] == "step-1"
assert "maybe_null" not in steps[0]If server._fastlane_public_value is not part of the public surface for tests (e.g., it is not imported or exposed on server), you may need to:
- Import or expose
_fastlane_public_valuefrom the module that defines it so thatmcp-tools/tests/test_fastlane_runtime.pycan access it. - Alternatively, if you prefer testing via
fastlane_compile, adapt the test to construct a request whose compiled plan contains the synthetic nestedNonesentinels, then assert againstresult["data"]after callingserver.fastlane_compile. The core assertions about removal ofNonekeys/items would remain the same.
Summary
Verification
110 passed, 199 subtests passed.py_compile, YAML job-graph validation, andgit diff --checkpassed.1.0.0-rc2, and package metadata1.0.0rc2.Release
Summary by Sourcery
Prepare 2718lab DevKit v1.0.0-rc2 by hardening Fast Lane runtime/task-root isolation, exposing Fast Lane as a bounded MCP tool, and extending the release pipeline to validate and publish both the MCP ZIP and AstrBot distributions as prerelease artifacts.
New Features:
Bug Fixes:
Enhancements:
Build:
CI:
Documentation:
Tests: