5d0e739e43
CI / push-validation (pull_request) Successful in 23s
CI / helm (pull_request) Successful in 35s
CI / quality (pull_request) Successful in 38s
CI / typecheck (pull_request) Successful in 50s
CI / build (pull_request) Successful in 3m18s
CI / lint (pull_request) Successful in 3m20s
CI / integration_tests (pull_request) Successful in 3m57s
CI / security (pull_request) Successful in 4m4s
CI / e2e_tests (pull_request) Successful in 7m18s
CI / unit_tests (pull_request) Successful in 8m42s
CI / docker (pull_request) Successful in 1m19s
CI / coverage (pull_request) Successful in 13m34s
CI / status-check (pull_request) Successful in 1s
CI / benchmark-publish (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Successful in 56m55s
ContextTierService started empty on every CLI invocation, so the LLM received zero file context during plan execution (bug #1028). - Add context_tier_hydrator.py: reads files from linked project resources (via git ls-files or os.walk) and stores them as TieredFragment objects in the tier service. Respects max file size (256 KB), total budget (10 MB), binary exclusion, and .git/node_modules/__pycache__ skipping. - Wire hydration into LLMExecuteActor.execute() via lazy import (avoids M1 E2E regression from top-level import). - Inject tier_service, project_repository, resource_registry into LLMExecuteActor from the DI container in _get_plan_executor(). - Add tier_service property to ExecutePhaseContextAssembler. - Suppress exc_info traceback rendering in context warnings to prevent false-positive crash detection in M1 E2E tests. - Add sandbox file-writing support in plan apply (path traversal guards, protected directory skipping). - Add 6 Behave scenarios for context tier hydration. Closes #1028
40 lines
1.9 KiB
Gherkin
40 lines
1.9 KiB
Gherkin
@context-hydration
|
|
Feature: Context tier hydration from linked resources (#1028)
|
|
Verifies that ContextTierService is populated from project
|
|
resources before LLM context assembly.
|
|
|
|
Scenario: Hydrate tiers from git-checkout resource for ctx_hydrate
|
|
Given a temp git repo with 2 files for ctx_hydrate
|
|
And a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from the resource for ctx_hydrate
|
|
Then the tier service should have 2 fragments for ctx_hydrate
|
|
|
|
Scenario: Hydrate skips binary files for ctx_hydrate
|
|
Given a temp dir with 1 text and 1 binary file for ctx_hydrate
|
|
And a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from the resource for ctx_hydrate
|
|
Then the tier service should have 1 fragment for ctx_hydrate
|
|
|
|
Scenario: Hydrate skips files over size limit for ctx_hydrate
|
|
Given a temp dir with 1 large file for ctx_hydrate
|
|
And a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from the resource for ctx_hydrate
|
|
Then the tier service should have 0 fragments for ctx_hydrate
|
|
|
|
Scenario: Hydrate sets project_name on fragments for ctx_hydrate
|
|
Given a temp dir with 1 text file for ctx_hydrate
|
|
And a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from the resource for ctx_hydrate
|
|
Then each fragment project_name should be "local/test-project" for ctx_hydrate
|
|
|
|
Scenario: Hydrate sets resource_id on fragments for ctx_hydrate
|
|
Given a temp dir with 1 text file for ctx_hydrate
|
|
And a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from the resource for ctx_hydrate
|
|
Then each fragment resource_id should not be empty for ctx_hydrate
|
|
|
|
Scenario: Hydrate returns 0 for missing location for ctx_hydrate
|
|
Given a ContextTierService instance for ctx_hydrate
|
|
When I hydrate tiers from a missing location for ctx_hydrate
|
|
Then the hydration count should be 0 for ctx_hydrate
|