c9e20c6b82ba3d19f4e81088b2528fa3b4cbaa8b
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
f808abff86 |
chore(ci): fix pre-commit hook failures
Fix JSON syntax errors in .devcontainer/devcontainer.json (removed
invalid JS-style // comments) and .devcontainer/opencode.json (removed
90+ trailing commas). Apply auto-fixes for end-of-file and trailing
whitespace issues across 100+ files. Fix SIM105 ruff violations in
benchmarks/core_circuit_breaker_bench.py (use contextlib.suppress).
Note: The security fix from issue #7478 (validate_path startswith bypass)
was already delivered to master in commit
|
||
|
|
3b83438e7d |
test(actor): add regression test for issue 4321 nested config extraction
CI / benchmark-regression (push) Failing after 49s
CI / lint (push) Successful in 1m13s
CI / quality (push) Successful in 1m21s
CI / typecheck (push) Successful in 1m31s
CI / security (push) Successful in 1m31s
CI / push-validation (push) Successful in 39s
CI / helm (push) Successful in 40s
CI / build (push) Successful in 48s
CI / integration_tests (push) Successful in 3m12s
CI / e2e_tests (push) Failing after 3m40s
CI / unit_tests (push) Successful in 6m34s
CI / docker (push) Successful in 1m48s
CI / coverage (push) Successful in 10m46s
CI / status-check (push) Successful in 4s
CI / helm (pull_request) Successful in 35s
CI / push-validation (pull_request) Successful in 34s
CI / build (pull_request) Successful in 55s
CI / lint (pull_request) Successful in 1m15s
CI / quality (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 1m29s
CI / security (pull_request) Successful in 1m44s
CI / integration_tests (pull_request) Successful in 3m42s
CI / unit_tests (pull_request) Successful in 4m57s
CI / docker (pull_request) Successful in 1m29s
CI / coverage (pull_request) Successful in 10m34s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-publish (push) Has started running
Add BDD regression test for Forgejo issue 4321: ActorRegistry.add()
fails to extract provider and model from nested actor config.
The test verifies that when type is only at the nested actors map level
(not at top level), provider and model are correctly extracted from the
nested config block.
This scenario is already handled correctly by the _extract_nested_v3_config()
function added in commit
|
||
|
|
78be08870c
|
fix(cli): validate actor provider field at correct config nesting level
CI / lint (push) Successful in 1m10s
CI / quality (push) Successful in 1m16s
CI / build (push) Successful in 1m1s
CI / benchmark-regression (push) Has been skipped
CI / typecheck (push) Successful in 1m46s
CI / security (push) Successful in 1m58s
CI / push-validation (push) Successful in 43s
CI / helm (push) Successful in 47s
CI / e2e_tests (push) Successful in 4m9s
CI / integration_tests (push) Successful in 5m9s
CI / unit_tests (push) Successful in 7m45s
CI / docker (push) Successful in 1m49s
CI / coverage (push) Successful in 14m18s
CI / status-check (push) Successful in 3s
CI / benchmark-publish (push) Successful in 1h31m39s
CI / lint (pull_request) Successful in 1m17s
CI / typecheck (pull_request) Successful in 1m30s
CI / benchmark-publish (pull_request) Has been skipped
CI / security (pull_request) Successful in 1m33s
CI / push-validation (pull_request) Successful in 48s
CI / helm (pull_request) Successful in 49s
CI / build (pull_request) Successful in 1m32s
CI / benchmark-regression (pull_request) Failing after 2m1s
CI / quality (pull_request) Successful in 2m9s
CI / e2e_tests (pull_request) Successful in 4m58s
CI / integration_tests (pull_request) Successful in 5m23s
CI / unit_tests (pull_request) Successful in 6m43s
CI / docker (pull_request) Successful in 1m36s
CI / coverage (pull_request) Successful in 10m58s
CI / status-check (pull_request) Successful in 5s
- Actor configuration in V3 is now obtained from the nested configuration parameter, according to the specification. - Removed the legacy V2 fallback support and the tests affected by that removal. Mocked existing steps to allow remaining V2 features to be covered/tested. - Fix add() to pass unsafe flag to add_v3() for proper unsafe actor handling - Add _extract_nested_v3_config() to extract provider/model from nested actors.<name>.config block before v3 schema validation - Remove v2 extraction test scenarios from consolidated_actor.feature that call removed _extract_v2_actor() and _extract_v2_options() methods - Update test YAML in actor_registry_spec_yaml_steps.py to exercise nested type detection (no top-level type field) - Add @tdd_issue_4300 regression test tag to existing spec-compliant actors map scenario ISSUES CLOSED: #4300 |
||
|
|
f829e68911 |
fix(actor): resolve registry.add() rejection of spec-compliant actor YAML
CI / benchmark-regression (push) Has been skipped
CI / helm (push) Successful in 29s
CI / build (push) Successful in 50s
CI / lint (push) Successful in 1m3s
CI / typecheck (push) Successful in 1m23s
CI / quality (push) Successful in 1m38s
CI / security (push) Successful in 1m43s
CI / push-validation (push) Successful in 27s
CI / integration_tests (push) Successful in 3m36s
CI / e2e_tests (push) Successful in 4m6s
CI / unit_tests (push) Successful in 4m53s
CI / docker (push) Successful in 1m29s
CI / coverage (push) Successful in 11m4s
CI / status-check (push) Successful in 4s
CI / benchmark-publish (push) Successful in 1h23m24s
CI / lint (pull_request) Successful in 1m10s
CI / typecheck (pull_request) Successful in 1m16s
CI / security (pull_request) Successful in 1m15s
CI / benchmark-publish (pull_request) Has been skipped
CI / push-validation (pull_request) Successful in 36s
CI / helm (pull_request) Successful in 39s
CI / build (pull_request) Successful in 51s
CI / quality (pull_request) Successful in 1m37s
CI / integration_tests (pull_request) Successful in 3m57s
CI / e2e_tests (pull_request) Successful in 4m13s
CI / unit_tests (pull_request) Successful in 4m27s
CI / docker (pull_request) Successful in 1m30s
CI / coverage (pull_request) Successful in 10m39s
CI / status-check (pull_request) Successful in 3s
CI / benchmark-regression (pull_request) Successful in 1h4m37s
The ActorRegistry.add() method rejected spec-compliant YAML that uses the
actors: map format with nested config: blocks because it only looked for
provider/model at the top level of the blob. Four changes fix this:
1. _extract_v2_actor() now handles both the spec-canonical actors: key and
the legacy agents: key, with actors: taking precedence. It also supports
the combined actor field format (e.g. "openai/gpt-4") from the spec.
2. _extract_v2_options() mirrors the same actors:/agents: support.
3. registry.add() now unconditionally calls _extract_v2_actor() so that
nested unsafe flags and graph descriptors are always captured — even
when top-level provider/model are present. This eliminates the
behavioural asymmetry with from_blob().
4. The unsafe confirmation gate now runs before the duplicate-actor check,
and the graph_descriptor resolution uses explicit is-not-None checks
to distinguish "not set" from "set to empty dict".
Review fixes (cycle 4):
- Added 9 new Behave scenarios: _extract_v2_options edge cases (empty map,
None, list, missing options key), _extract_v2_actor with unsafe=True,
add() with missing name field, top-level unsafe: true (rejection +
acceptance), and multi-actor unsafe limitation documentation.
- Added graph descriptor assertions to all _extract_v2_actor direct
scenarios that were missing them.
- Fixed unsafe field coercion to use explicit boolean check (is True or
== 1) instead of bool() to prevent truthy non-boolean values like
"no" from being treated as unsafe.
- Added legacy graph key fallback (blob.get("graph")) in add() for
consistency with from_blob().
- Fixed _StubActorService.upsert_actor to handle set_default parameter
and pass non-None config_blob to Actor.compute_hash().
- Updated stale CLI comment about registry.add() capabilities.
- Applied ruff format to step definitions.
Review fixes (cycle 5 — external review):
- T1/T2/T3: Added unsafe coercion edge-case tests for 1.0 (float→True),
2 (int>1→False), and 0 (int zero→False).
- T4/T5/T6: Added _extract_v2_options tests for non-dict first entry,
missing config block, and actors: preference over agents:.
- T7: Added integration test for top-level graph_descriptor key.
- T8: Added integration tests for top-level provider_type/model_id aliases.
- T9: Added integration tests for top-level unsafe string coercion ("yes"/"no").
- S1: effective_unsafe now includes unsafe/allow_unsafe params to match
from_blob() and spec rule.
- S2: CHANGELOG entry expanded with multi-actor rejection, options
preservation, and coercion fix.
- B1: Changed v2_options guard from truthiness to is-not-None check.
- P1: _extract_v2_options() now returns a shallow copy.
- P2: Nested options overwrite non-dict top-level options values.
- Q3: Fixed comment variable name (unsafe_raw → top_unsafe_raw).
- S3: Added spec-extension comment for provider_type/model_id aliases.
- S4/B3: Cached actors_raw in multi-actor guard; added cross-ref comment.
- Q5: Added TODO(#10832) to _StubActorService duplicate.
- Q6: Replaced misleading (M2) label with (unsafe coercion).
Review fixes (cycle 6 — agent review):
- MAJ-1: Removed allow_unsafe from effective_unsafe computation.
allow_unsafe is a permission flag, not an assertion; it should not
mark a non-unsafe actor as unsafe. Updated docstring to clarify
the semantic difference between unsafe and allow_unsafe.
- MIN-1: Changed provider/model alias resolution in _extract_v2_actor()
from or-based to is-not-None checks for consistency with
_resolve_actors_map() and add().
- MIN-2: Added test scenario for allow_unsafe=True on non-unsafe YAML.
- MIN-3: Added test scenarios for top-level unsafe: 1 (integer)
rejection without flag and acceptance with flag.
- MIN-4: Added test scenario for graph descriptor additional keys loop
(routes key propagation).
- MIN-5: Added test scenario for non-dict top-level options with nested
options.
- MIN-9: Applied ruff format to step file (removed unnecessary parens).
- NIT-1: Differentiated redundant scenario to test graph descriptor
agent key value instead of duplicating assertions.
- NIT-2: Added test scenario verifying config_blob source: "yaml" default.
- NIT-5: Changed _resolve_actors_map() return type to use
Literal["actors", "agents"] for stronger type safety.
Includes 78 Behave scenarios covering spec-compliant actors: map,
legacy agents: map, top-level fields, rejection of missing provider/model,
combined actor field edge cases, update=True path, schema_version and
compiled_metadata forwarding, actors-as-list edge case, empty actors dict
blocking agents fallback, malformed actor field parts, reverse precedence
for the combined actor field, _extract_v2_options edge cases, unsafe=True
detection, missing name rejection, top-level unsafe, multi-actor
rejection, unsafe coercion edge cases (1.0, 2, 0, "yes", "no"),
top-level graph_descriptor, provider_type/model_id aliases,
_extract_v2_options structural parity with _extract_v2_actor,
allow_unsafe on non-unsafe YAML, top-level unsafe: 1 (integer),
graph descriptor additional keys, non-dict top-level options,
and config_blob source default.
ISSUES CLOSED: #4466
|