fix(task-board): TASK_ADD_REPO returned success on an empty checkout - #6697
Merged
Conversation
The clone probe asked the wrong question. Readiness was "`ls -A` has an entry that isn't .git", on the reasoning that a HEAD ref can land before the checkout does — but the checkout directory is never empty to begin with. The pod stages `.deco` (the MCP tool stubs) and mounts `org` (the org filesystem) into it before any clone starts. Both survive the .git filter, both are present on the very first probe, and neither ever changes, so the "stabilized across two probes" guard agreed with them. TASK_ADD_REPO therefore returned `cloned: true, files: ".deco\norg"` about a second and a half in, having waited for nothing, and told the model 'is checked out at your working directory. Start working.' An autonomous run then did exactly what it was told: listed the directory, found no repository in it, and finished. It opened no PR, so its card took the repo-less path to In Review and sat there waiting for a person — a task 'completed' in twenty seconds without a line of code read. The marker is built from `git ls-files` now and is the sole readiness signal: a non-empty index can only come from a checkout, which no amount of pre-staged scaffolding can fake. The listing is still returned — it is what the model reads — it just no longer gets a vote on whether the clone happened. The two tests that encoded the old rule are inverted rather than appended, and the first one now asserts on the exact probe output that shipped the twenty-second task.
pedrofrxncx
enabled auto-merge (squash)
August 28, 2026 15:47
decocms Bot
pushed a commit
that referenced
this pull request
Aug 28, 2026
PR: #6697 fix(task-board): TASK_ADD_REPO returned success on an empty checkout Bump type: patch - decocms (apps/api/package.json): 4.294.3 -> 4.294.4 - @decocms/native (apps/native/package.json): 4.294.3 -> 4.294.4 Deploy-Scope: server
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
A Super Agent run "completed" in twenty seconds without reading a line of code.
Its transcript:
The tool said the repository was there. It was not. The run did exactly what it
was told, found nothing to work on, and stopped.
The probe asked the wrong question
Readiness was "
ls -Ahas an entry that isn't.git", on the reasoningthat a HEAD ref can land before the checkout does — so entries, not the marker,
were trusted.
But the checkout directory is never empty to begin with. The pod stages
.deco(the MCP tool stubs) and mounts
org(the org filesystem) into it before anyclone starts. Both survive the
.gitfilter, both are present on the veryfirst probe, and neither ever changes — so the "stabilized across two probes"
guard agreed with them too.
TASK_ADD_REPOreturnedcloned: trueabout asecond and a half in, having waited for nothing.
The 45s
CLONE_TIMEOUT_MSand the stabilize guard were never reached, becausethe condition they gate on was already true before the work began.
The fix
The marker is built from
git ls-filesand is now the sole readinesssignal. A non-empty index can only come from a checkout that actually wrote the
tree — no amount of pre-staged scaffolding can fake one, and unlike HEAD it
cannot be written ahead of the files.
The listing is still returned — it is what the model reads to orient itself. It
just no longer gets a vote on whether the clone happened.
The stabilize guard keeps its meaning and gets a better one: it now measures
the listing settling after the checkout has begun, which is what it was
always trying to do.
Downstream
This is also why the card reached In Review with no reviewer. No PR was
opened, so the card took the repo-less path (
advanceLinkedTasksToReviewOnThreadFinish),which parks a task whose answer is its deliverable for a human. That path
behaved correctly — it was handed a run that had genuinely produced nothing.
Testing
first now asserts on the exact probe output that shipped the twenty-second
task (
.deco\norg→ not cloned).bun test apps/api/src/tools/task-board apps/api/src/tools/sandbox→ 8pre-existing failures on
origin/main, 8 on this branch, zero regressions.bun run --cwd=apps/api check,bun run lint(0 errors),bun run fmt— clean.Found on a live cluster, not in review.
Summary by cubic
Fixes
TASK_ADD_REPOreporting a successful clone when the working directory was empty, which let Super Agent runs "complete" in seconds without reading any code. The probe now uses agit ls-filesindex marker as the sole readiness signal instead of trusting directory entries, since the pod pre-stages.decoand mountsorgbefore any clone starts.Bug Fixes
cloneddecision.Written for commit f9fcc7e. Summary will update on new commits.