test(e2e): TDD behavioral test proving ACMS indexing pipeline is not wired into CLI (bug #1028) #1124
Merged
hurui200320
merged 3 commits from 2026-03-25 11:13:37 +00:00
tdd/m5-acms-cli-indexing-pipeline-wiring into master
Labels
Clear labels
auto/needs-reevaluation
controller-managed
overdue
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Needs Feedback
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
Controller deferred this PR; awaiting Phase 6+ scope-evaluator or operator re-enablement.
Auto-agents controller manages this PR/issue (see tools/controller/deploy/RUNBOOK.md). Remove this label to abandon controller management.
PR blocked by an open issue dependency. Operator must close the dep (or remove the dependency link) before the merge driver can act. Auto-cleared by merge_drive when no open deps remain.
Most recent merge cycle hit CI timeout. Driver excludes this PR while last merge_cycle row is < 30 min old; label persists thereafter as visible history.
Currently being processed by an implementer worker.
Currently being processed by the merge driver.
Currently being processed by a reviewer worker.
Merge driver heartbeat stale; pipeline halted. Closed automatically on next clean tick.
Detected master commit violating the strict merge invariant. Tracked as an issue (not a PR label); kept here for label completeness.
In-cycle escalation: most recent attempt ran at the Tier 0 slot (`tier-0`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 1 slot (`tier-1`). Slot's model defined in .opencode/models/tiers.yaml.
In-cycle escalation: most recent attempt ran at the Tier 2 slot (`tier-2`). Slot's model defined in .opencode/models/tiers.yaml. Gated behind IMPLEMENTER_ESCALATION_TIER2_ENABLED.
In-cycle escalation: most recent attempt ran at the Tier -1 slot (`tier-min`). Slot's model defined in .opencode/models/tiers.yaml. Suffix is ``-min`` (not ``--1``) so the Forgejo UI reads naturally.
Tracking issues used by the AI Automation system for agents to communicate and report.
Rebase conflict needs LLM conflict-resolver.
Failing CI needs implementer attention.
Documenting a driver incident or rollback.
Reviewer has APPROVED this PR and no later REQUEST_CHANGES is outstanding. The merge driver requires this label to even consider a PR for merging. Set by the reviewer worker on APPROVE; cleared on REQUEST_CHANGES.
Train repeatedly lost master-tempo races. Driver excludes via merge_cycle until cooldown elapses; label persists as visible history.
Revert PR backing out an invariant violation. Fast-tracked through the merge driver.
Sentinel PR duplicated from upstream into a personal fork by tools/duplicate_prs_to_fork.py for pipeline testing. Lives only in the fork; the canonical pipeline never sees it.
No implementer activity for N days. Flagged for human review. Auto-cleared on next push to head branch.
Repeatedly fails on current master (>= 3 ci-fail-on-rebased-sha releases in 12 h). Excluded from driver until human triage.
A ticket in a blocked state and unable to complete until some other task is completed first.
Bounty
$100
A bounty of $100 for any open-source contributor who provides a MR that solves this issue
Bounty
$1000
A bounty of $1000 for any open-source contributor who provides a MR that solves this issue
Bounty
$10000
A bounty of $10000 for any open-source contributor who provides a MR that solves this issue
Bounty
$20
A bounty of $20 for any open-source contributor who provides a MR that solves this issue
Bounty
$2000
A bounty of $2000 for any open-source contributor who provides a MR that solves this issue
Bounty
$250
A bounty of $250 for any open-source contributor who provides a MR that solves this issue
Bounty
$50
A bounty of $50 for any open-source contributor who provides a MR that solves this issue
Bounty
$500
A bounty of $500 for any open-source contributor who provides a MR that solves this issue
Bounty
$5000
A bounty of $5000 for any open-source contributor who provides a MR that solves this issue
Bounty
$750
A bounty of $750 for any open-source contributor who provides a MR that solves this issue
MoSCoW
Could have
Could have feature in order to satisfy the epic/legendary.
MoSCoW
Must have
Must have feature in order to satisfy the epic/legendary.
MoSCoW
Should have
Should have feature in order to satisfy the epic/legendary.
There are questions in the ticket that can not be completed until the project owner provides clarity.
Points
1
1 man-hours worth of work for an expert with no learning curve.
Points
13
13 man-hours worth of work for an expert with no learning curve.
Points
2
2 man-hours worth of work for an expert with no learning curve.
Points
21
21 man-hours worth of work for an expert with no learning curve.
Points
3
3 man-hours worth of work for an expert with no learning curve.
Points
34
34 man-hours worth of work for an expert with no learning curve.
Points
5
5 man-hours worth of work for an expert with no learning curve.
Points
55
55 man-hours worth of work for an expert with no learning curve.
Points
8
8 man-hours worth of work for an expert with no learning curve.
Points
88
88 man-hours worth of work for an expert with no learning curve.
Priority
Backlog
This ticket has backlogged priority and is not to be worked on yet
Priority
CI Blocker
Critical priority issue that blocks CI/CD pipeline and prevents PR merges
Priority
Critical
The priority is critical
Priority
High
The priority is high
Priority
Low
The priority is low
Priority
Medium
The priority is medium
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
When an epic or legendary is in review it must be signed off by owner, tech lead, and scrum master before being marked as completed.
A ticket for learning a tool or technology that is needed to be able to do future planning and design.
State
Completed
The ticket has been fully implemented, completed, and merged with the source code. This label should only be applied once a ticket is closed.
State
Duplicate
A ticket that represents the same content as an existing ticket.
State
In Progress
A ticket that is actively being developed.
State
In Review
A ticket that has had some code completed to implement but is waiting to pass peer review and is not yet merged in.
State
Paused
This ticket's work started but wasn't finished. It's on hold (likely in a feature branch) and will be resumed later, either due to a blocker or a delay.
State
Unverified
All new tickets start in this state. A developer may set it to show the ticket is unverified. This means we haven't agreed to work on it. It will either move to a verified state or be closed as wontdo.
State
Verified
The issue has been verified by a developer as legitimate. It will be worked on and verified tickets are now considered part of the backlog.
State
Wont Do
This ticket has been decided it wont be done. This may mean the bug has been determined to not be real (cant verify) or the feature is one we have decided we dont want to adopt.
Type
Automation
Any edits or discussion about the AI automated coding system.
Type
Bug
Something that doesnt work as intended.
Type
Discussion
Anytime a ticket represents a discussion about a subject and doesnt fall into one of the other categories.
Type
Documentation
An error or improvement needed in the documentation.
Type
Epic
Any first tier epic. That is, an epic which contains only issues as children and will not have sub-epics.
Type
Feature
Some new functionality not present.
Type
Legendary
A type of Epic which will contain other Epics.
Type
Refactor
A code change that restructures existing code without changing its external behavior.
Type
Support
Someone needs help using the project.
Type
Task
A generic task that doesnt fit into the other type categories.
Type
Testing
Work exclusively focusing on fixing or expanding testing.
No Label
Type
Testing
Projects
Clear projects
No project
Assignees
aditya (Aditya Chhabra)
aleenaumair (Aleena Umair)
brent.edwards (Brent Edwards)
CoreRasurae (Luis Mendes)
drew (Drew Morris)
eugen.thaci (Eugen Thaci)
freemo (Jeffrey Phillips Freeman)
HAL9000 (HAL 9000)
HAL9001 (HAL9001)
hamza.khyari (Hamza Khyari)
hurui200320 (Rui Hu)
justin.morris
khird (Kyle Hird)
org.cleveragents
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Blocks
#1029 TDD: ACMS indexing pipeline not wired into CLI — ContextTierService starts empty (bug #1028)
cleveragents/cleveragents-core
Reference: cleveragents/cleveragents-core#1124
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Delete Branch "tdd/m5-acms-cli-indexing-pipeline-wiring"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
This PR adds a Robot Framework E2E test suite (
robot/e2e/tdd_acms_behavioral_validation.robot) that proves bug #1028 exists — the ACMS indexing pipeline is not wired into the CLI, soContextTierServicestarts empty on every invocation.Changes
robot/e2e/tdd_acms_behavioral_validation.robot— 4 E2E test cases taggedtdd_expected_fail,tdd_bug,tdd_bug_1028,E2Erobot/e2e/common_e2e.resource— Extracted shared keywords (Run CLI,Extract JSON From Stdout,Link Resource To Project,Create Synthetic Codebase) from bothm5_acceptance.robotandtdd_acms_behavioral_validation.robotto eliminate ~97 lines of duplication.Create Synthetic Codebaseis parameterized withproject_label.robot/e2e/m5_acceptance.robot— Removed duplicated keywords now provided bycommon_e2e.resource.## Unreleaseddocumenting the TDD tests for #1029.Test Cases
fragment_count > 0(fails, proving bug)fragment_count > 0withmax_file_sizepolicy (fails, proving bug). Includes TODO comment for post-fix exclusion assertion.fragment_count > 0(fails, proving bug). Includes explicit developer responsibility note about git-tracking of generated files.All tests pass CI through result inversion by the
tdd_expected_fail_listener.py— failing assertions (bug confirmed) are inverted to PASS.Documentation & Robustness Improvements
tdd_expected_failresult inversion scope.(rc=${var.rc}). Check DEBUG logs above.for debugging consistency withm5_acceptance.robot.Run CLIcalls removed (Run CLI already validates rc internally).Run CLIkeyword documentation includes API key security notes.TODO(bugfix/...)comment for the bug-fix developer.Review Fix Round
Addressed all findings from Luis's review (review #2691):
CorrectionServicechangelog entry (50 lines) accidentally deleted during merge conflict resolution.common_e2e.resource(parameterizedCreate Synthetic Codebase, sharedRun CLI,Extract JSON From Stdout,Link Resource To Project).(rc=...). Check DEBUG logs above.Run CLIcalls.tdd_expected_failmasking is documented and mitigated.Motivation
Per the Bug Fix Workflow in CONTRIBUTING.md, this TDD issue (#1029) is the prerequisite for bug fix #1028. The tests capture the buggy behavior so that when the fix is implemented, removing the
tdd_expected_failtag will cause the tests to pass normally.Quality Gates
Closes #1029
39bfe4c3a1toa2f91cdb27a2f91cdb27to640e90a2a5Code Review Report — PR #1124 (TDD Bug #1028 / Issue #1029)
Branch:
tdd/m5-acms-cli-indexing-pipeline-wiringCommit:
640e90aby Rui HuReview scope: Branch diff vs
origin/master(2 files changed:CHANGELOG.md,robot/e2e/tdd_acms_behavioral_validation.robot)Methodology: 3 iterative full-spectrum review cycles covering bug detection, test flaws, test coverage, performance, security, spec compliance, and code quality. Findings stabilised after cycle 2.
Positive Observations
tdd_expected_fail,tdd_bug,tdd_bug_1028,E2E) followsCONTRIBUTING.md > TDD Bug Test Tagsrules and will pass the listener's_validate_tdd_tags()checks.tdd_expected_fail_listener.pyIS registered in thee2e_testsnox session (line 723 ofnoxfile.py), so result inversion will work correctly.project context simulate,project context inspect,project context setwith--include-path,--max-file-size,--max-total-size) all match the specification command synopsis (lines 237–271 ofdocs/specification.md).tdd_expected_failmasking setup failures is explicitly documented in the suite header and mitigated bym5_acceptance.robot.NO_COLOR=1is set, stdout/stderr are not embedded in assertion messages, and API key logging risk is mitigated by DEBUG-level logging.ISSUES CLOSED: #1029is correct per the TDD workflow.Findings by Severity
CRITICAL — Bug Detection
C1. CHANGELOG regression: #845 CorrectionService entry accidentally deleted
CHANGELOG.md, lines 72–121 of merge-base content## Unreleasedsection — the entire#845CorrectionServicesubtree isolation entry. This entry documents numerous fixes (BFS cycle detection, dry-run enforcement, terminal-state guards, mode validation, status restoration, etc.) from PR #845 merged on 2026-03-19.git diff origin/master...HEAD -- CHANGELOG.mdshows the merge-base CHANGELOG has 946 lines; the branch HEAD has 900 lines (946 − 50 deleted + 4 added = 900).#1029entry at the top of the Unreleased section. The#845entry, which was adjacent to the conflict region, was dropped during resolution.#845changelog documentation will be permanently lost from release notes.#845entry fromorigin/master'sCHANGELOG.mdbefore merging.MEDIUM — Test Flaws
M1. Large Project test: 10K generated files are not committed to the git repo
robot/e2e/tdd_acms_behavioral_validation.robot, lines 317–338.pyfiles on the filesystem but does notgit add+git committhem. The workspace resource is registered asgit-checkouttype (line 83). If the bug #1028 fix routes indexing through the git sandbox (which only exposes git-tracked content), these files will not be visible and the test will fail for the wrong reason (files not tracked vs. pipeline not wired).walk_and_indexinrepo_indexing_utils.pyusesos.walk()(filesystem), notgit ls-files, so this may not manifest.git add/commitcommands ready to uncomment.m5_acceptance.robothas the same pattern (neither suite commits generated files).git add/commitlines now (or adding a comment making it clear this is a deliberate risk acceptance for the TDD phase, and the bug-fix developer must evaluate it). Current phrasing ("If the ACMS indexing pipeline reads only git-tracked content...") is ambiguous about responsibility.M2. Budget enforcement test is a partial assertion
tdd_acms_behavioral_validation.robot, lines 260–301fragment_count > 0. It does not verify thatlarge_file.py(>1 KiB) is excluded from the fragment list while smaller files are included. The test title claims it tests exclusion, but the assertion only tests inclusion.large_file.pyexclusion check.LOW — Code Quality
L1. ~97 lines of keyword/setup code duplicated from
m5_acceptance.robottdd_acms_behavioral_validation.robot, keyword section (lines 46–167)m5_acceptance.robot:Run CLI(18 lines),Extract JSON From Stdout(15 lines),Link Resource To Project(6 lines),Suite Teardown(3 lines).Create Synthetic CodebaseandSuite Setupdiffer only in trivial string literals (~55 lines). Total: ~97 duplicated lines out of ~105 keyword-definition lines.common_e2e.resource(which already exists and is imported by both files). The keywords can be parameterized with suite-specific names (resource name, workspace label) passed as arguments. This would reduce maintenance burden when CLI interfaces change.L2. Redundant exit code assertions
tdd_acms_behavioral_validation.robot, lines 201, 238, 275, 341Should Be Equal As Integers ${result.rc} 0is called immediately afterRun CLIwhich already validates the exit code internally viaShould Be Equal As Integers ${result.rc} ${expected_rc}(default 0). These assertions are always true ifRun CLIdidn't fail.L3. Suite setup error messages less verbose than
m5_acceptance.robottdd_acms_behavioral_validation.robot, lines 66, 71, 73msg=git init failedvs.m5_acceptance.robot'smsg=git init failed (rc=${git_init.rc}). Check DEBUG logs above.The less-verbose messages omit the actual return code, making debugging harder if git commands fail in CI.(rc=${variable.rc})and "Check DEBUG logs" to match them5_acceptance.robotpattern for consistency.INFORMATIONAL — Known Limitations (documented, no action required)
I1.
tdd_expected_faillistener masks unrelated failuresm5_acceptance.robotrunning the same CLI plumbing withouttdd_expected_failinversion.Verdict
Request changes — the CHANGELOG regression (C1) must be fixed before merge. The #845 entry needs to be restored from
origin/master. All other findings are medium/low severity and can be addressed at the reviewer's discretion.Review performed using 3 iterative full-spectrum cycles (bug detection, test flaws, test coverage, performance, security, spec compliance, code quality). Findings stabilised after cycle 2 with no new issues found in cycle 3.
@@ -3,2 +3,4 @@## Unreleased- Added TDD bug-capture E2E tests for bug #1028 — ACMS indexing pipeline notwired into CLI. Four Robot Framework E2E tests prove ContextTierService startsCRITICAL (C1): This diff removes the entire #845 CorrectionService changelog entry (50 lines). The merge-base (
9e316b1) contains this entry at lines 72-121, but it is absent from the branch HEAD. This is likely a merge conflict resolution error — when adding the 4-line #1029 entry, the adjacent #845 block was accidentally dropped.Action required: Restore the #845 entry from
origin/masterbefore merging. You can extract it with:and re-insert the block between the
(#331)entry and the deferred physical resource types entry.@@ -0,0 +63,4 @@Create Synthetic Codebase ${ws}# Initialize a git repository${git_init}= Run Process git init cwd=${ws} timeout=60s on_timeout=killShould Be Equal As Integers ${git_init.rc} 0 msg=git init failedLOW (L3): Error message is
msg=git init failed— less verbose thanm5_acceptance.robot's equivalentmsg=git init failed (rc=${git_init.rc}). Check DEBUG logs above.Consider adding the return code and log hint for debugging consistency.@@ -0,0 +116,4 @@${large_content}= Evaluate "# auto-generated large file\\n" + ("x = 1\\n" * 250)Create File ${base_dir}${/}large_file.py ${large_content}Run CLILOW (L1): This
Run CLIkeyword is character-for-character identical to the one inm5_acceptance.robot(lines 109-126). Along withExtract JSON From Stdout,Link Resource To Project,Create Synthetic Codebase, and the Suite Setup/Teardown, approximately 97 lines of keyword code are duplicated between the two files. Consider extracting the common keywords intocommon_e2e.resource(already imported by both files) with parameterized suite-specific names.@@ -0,0 +257,4 @@Should Be True ${total_indexed} > 0... msg=Bug #1028: total indexed fragments is ${total_indexed} (expected > 0). tier_metrics: hot=${hot_count}, warm=${warm_count}, cold=${cold_count}. ACMS indexing pipeline is not wired into CLI.Budget Enforcement Excludes Oversized FilesMEDIUM (M2): This test title says "Excludes Oversized Files" but the assertion only checks
fragment_count > 0(that some files are indexed). It does not verify thatlarge_file.pyis actually excluded. The TODO on lines 295-298 documents this gap — ensure the bug-fix developer adds the exclusion assertion when wiring the pipeline.@@ -0,0 +328,4 @@${gen}= Run Process ${PYTHON} ${gen_script} ${scale_dir}... timeout=120s on_timeout=killShould Be Equal As Integers ${gen.rc} 0 msg=10K file generation failed# NOTE: The 10K generated files are written to the filesystem but NOTMEDIUM (M1): The 10K generated files are written to the filesystem but NOT committed to the workspace git repo. The resource is registered as
git-checkouttype (line 83). If the bug-fix routes indexing through the git sandbox, these untracked files won't be visible and the test will fail for the wrong reason.The NOTE comment here is good and documents the risk, but consider making the responsibility assignment more explicit — e.g.: "The bug-fix developer MUST evaluate whether the fix uses filesystem or git-tracked content and uncomment these lines if needed."
640e90a2a5to5602c9a87cResponse to Review #2691 (Luis)
Thanks for the thorough review! All findings addressed in commit
5602c9a8. Summary:C1 (CRITICAL) — CHANGELOG #845 entry deleted ✅ Fixed
Reset
CHANGELOG.mdtoorigin/masterand re-added the#1029entry. The #845CorrectionServiceentry (50 lines) is now fully restored.M1 (MEDIUM) — 10K files not committed to git ✅ Fixed
Replaced the ambiguous NOTE with an explicit responsibility assignment: "The bug-fix developer MUST evaluate whether the fix routes indexing through the git sandbox (which only exposes git-tracked content) or the filesystem."
M2 (MEDIUM) — Budget enforcement partial assertion ℹ️ Acknowledged
Agreed — the TODO comment already documents the gap, and the assertion is appropriate for the TDD capture phase. The bug-fix developer will add the
large_file.pyexclusion assertion when wiring the pipeline.L1 (LOW) — ~97 lines duplicated from m5_acceptance.robot ✅ Fixed
Extracted
Run CLI,Extract JSON From Stdout,Link Resource To Project, andCreate Synthetic Codebaseintocommon_e2e.resource.Create Synthetic Codebaseis parameterized with${project_label}for suite-specific literals. Bothm5_acceptance.robotandtdd_acms_behavioral_validation.robotnow use the shared keywords.L2 (LOW) — Redundant exit code assertions ✅ Fixed
Removed all 12 instances of redundant
Should Be Equal As Integers ${result.rc} 0that followedRun CLIcalls.L3 (LOW) — Suite setup error messages less verbose ✅ Fixed
All git command error messages now include
(rc=${var.rc}). Check DEBUG logs above.matching them5_acceptance.robotpattern.I1 (INFO) —
tdd_expected_faillistener masks ℹ️ AcknowledgedAlready documented. No action needed.
Review: APPROVED
TDD E2E behavioral test proving ACMS indexing pipeline is not wired into CLI (bug #1028). Clean test structure with proper tags and clear documentation of what the test proves.
5602c9a87cto90d18f06d1New commits pushed, approval review dismissed automatically according to repository settings