7 Commits

Author SHA1 Message Date
HAL9000 650a3dc8dd fix(acms): format __init__.py, add coverage for budget_enforcement paths
CI / load-versions (pull_request) Successful in 16s
CI / push-validation (pull_request) Successful in 25s
CI / lint (pull_request) Successful in 48s
CI / build (pull_request) Successful in 41s
CI / quality (pull_request) Successful in 59s
CI / typecheck (pull_request) Successful in 1m18s
CI / security (pull_request) Successful in 1m21s
CI / helm (pull_request) Successful in 44s
CI / unit_tests (pull_request) Successful in 5m44s
CI / docker (pull_request) Successful in 1m41s
CI / integration_tests (pull_request) Successful in 10m20s
CI / coverage (pull_request) Successful in 11m54s
CI / status-check (pull_request) Successful in 3s
- Remove unnecessary parentheses from __all__ concatenation in acms/__init__.py
  to satisfy ruff format (lint gate was failing)
- Mark unreachable RuntimeError branch in add_file with # pragma: no cover
- Add 8 Behave scenarios covering previously uncovered lines:
  get_assembled_context(), reset(), BudgetEnforcer.__post_init__ validation
  errors, add_file validation errors, BudgetViolation unknown type
- Add corresponding step definitions; import BudgetViolation in steps module

ISSUES CLOSED: #9583
2026-06-17 19:54:20 -04:00
HAL9000 4d5fa6a9d1 feat(acms): implement budget enforcement for max_file_size and max_total_size constraints
Add ACMS BudgetEnforcer dataclass with per-file (max_file_size) and
aggregate (max_total_size) constraint enforcement. Includes:

- BudgetEnforcer: core enforcer with add_file(), get_assembled_context(),
  get_violations(), reset() methods and defensive-copy returns
- BudgetViolation: structured violation reporting with filename, file_size,
  limit, and clear actionable messages (error for max_file_size, warning
  for max_total_size)
- ContextFile: size tracking with automatic byte-size calculation from UTF-8

Also updates src/cleveragents/acms/__init__.py to export budget enforcement
classes alongside existing UKO vocabulary exports.

Comprehensive BDD test coverage: 11 Behave scenarios covering inclusion,
exclusion, boundary conditions, cumulative budget cutoff, ordering,
metadata reporting, empty files, and multi-byte UTF-8 measurement.
Robot Framework integration tests with helper module.

ISSUES CLOSED: #9583

Signed-off-by: HAL9000 <hal9000@cleverthis.com>
2026-06-17 19:54:20 -04:00
CoreRasurae d47d560a2e test(behave): Fix failing tests after rebase on master 2026-05-07 20:05:33 +00:00
hurui200320 4fe87d9eec fix(tests): resolve pre-existing unit test failures in 5 feature files
Fix five pre-existing BDD test failures that were present on master
before PR #10988 was opened:

1. **architecture.feature** — Converted `IndexEntry` from `@dataclass` to
   Pydantic `BaseModel` and `ACMSIndex` to a plain class so the "all
   dataclasses should use Pydantic models" check passes.

2. **pr_compliance_checklist.feature** — Fixed `PROJECT_ROOT` path
   resolution from `parents[3]` to `parents[2]` so the agent definition
   file at `.opencode/agents/implementation-supervisor.md` is located
   correctly within the `/app` workspace.

3. **acms/index_data_model_and_traversal.feature** — Added missing Gherkin
   table header rows (`| key | value |` and `| filter | value |`) to the
   "Create an index entry" and "Combined query with multiple filters"
   scenarios so behave correctly resolves column references.

4. **cli_init_yes_flag.feature** — Added a `getattr` guard around
   `context.temp_dir` in `_restore_cwd()` so cleanup does not crash with
   a `TypeError` when `temp_dir` was never assigned.

5. **security_audit.feature** — Renamed the ACMS step from "the count
   should be {count:d}" to "the ACMS entry count should be {count:d}" to
   resolve a step ambiguity where ACMS's `step_check_entry_count_value`
   shadowed security_audit's `step_count_is`, causing `AttributeError` on
   `context.entry_count` for audit scenarios.

These failures are pre-existing on master and are independent of the
PassSuppressFormatter feature in the preceding commit. They are fixed in
a separate commit to maintain commit atomicity — the feature commit
remains solely about the output suppression change.

Refs: #10987
2026-05-07 18:09:25 +08:00
HAL9000 b846ab5cd7 fix(acms): rebase ACMS index data model onto master to fix unit test failures
Rebases the ACMS index data model and file traversal engine implementation
onto the current master branch to resolve merge conflicts and fix unit test
failures caused by the PR branch being 321 commits behind master.

All ACMS-specific changes are preserved:
- src/cleveragents/acms/index.py: ACMS index data model with hot/warm/cold/archive tiers
- src/cleveragents/acms/__init__.py: Updated exports
- features/acms/index_data_model_and_traversal.feature: BDD feature file
- features/steps/acms_index_data_model_traversal_steps.py: Step definitions
- features/environment.py: Added temp_dir cleanup hook
- CHANGELOG.md: ACMS entry preserved

ISSUES CLOSED: #9579
2026-05-05 17:48:37 +00:00
hamza.khyari 89eaee008d feat(acms): implement UKO Layer 3 Technology Vocabularies (uko-py, uko-ts, uko-rs, uko-java)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 19s
CI / build (pull_request) Successful in 27s
CI / quality (pull_request) Successful in 29s
CI / security (pull_request) Successful in 41s
CI / typecheck (pull_request) Successful in 45s
CI / e2e_tests (pull_request) Successful in 1m29s
CI / unit_tests (pull_request) Successful in 3m19s
CI / integration_tests (pull_request) Successful in 3m30s
CI / docker (pull_request) Successful in 54s
CI / coverage (pull_request) Successful in 6m8s
CI / benchmark-regression (pull_request) Successful in 38m9s
Implement Layer 3 technology-specific UKO vocabulary extensions for Python,
TypeScript, Rust, and Java with language-specific classes, properties, and
DetailLevelMap insertions.

- 4 OWL/Turtle ontology files with language-specific semantic classes
- DetailLevelMap insertion logic with correct integer reassignment
- Provenance contract (5 required fields per spec)
- Full 4-layer chain resolution (Layer 3 -> Layer 2 -> Layer 1 -> Layer 0)
- Comprehensive Behave test suite (63 scenarios)

ISSUES CLOSED: #576
2026-03-16 12:11:08 +00:00
hamza.khyari 3c014a9565 feat(acms): implement UKO Layer 2 Paradigm Vocabularies (uko-oo, uko-func, uko-proc)
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Successful in 15s
CI / build (pull_request) Successful in 16s
CI / quality (pull_request) Successful in 19s
CI / e2e_tests (pull_request) Successful in 23s
CI / typecheck (pull_request) Successful in 32s
CI / security (pull_request) Successful in 43s
CI / unit_tests (pull_request) Successful in 2m2s
CI / integration_tests (pull_request) Successful in 2m41s
CI / docker (pull_request) Successful in 49s
CI / coverage (pull_request) Successful in 5m32s
CI / benchmark-regression (pull_request) Successful in 36m2s
2026-03-13 18:21:50 +00:00