Skip to content

feat(build): ground "I'll wire that"/"it's in the queue" in real Gitea issues (#774, Gap 2) - #787

Merged
urbantech merged 1 commit into
mainfrom
feat/ground-promises-in-real-gitea-issues-774
Sep 16, 2026
Merged

urbantech merged 1 commit into
mainfrom
feat/ground-promises-in-real-gitea-issues-774

Conversation

@urbantech

Copy link
Copy Markdown
Contributor

Summary

Closes Gap 2 of #774.

Real incident: a paid, git-provisioned founder said "The stripe integration" (a topic phrase, not an imperative edit — detectEditIntent correctly stayed conservative and never fired). Cody still replied "I'll have this wired in the next run" — gateInstructions unconditionally scripted that phrasing for every change/feature message, with zero task or issue ever actually created. fetchBacklogSummary's own "backlog" was purely synthetic (derived from selectPrimitives), with no connection to lib/git/gitea-client.ts at all — Cody had no real system of record to cite either.

Fixed with two combined detection layers feeding one real action:

  1. Cheap, deterministic heuristic (no LLM call): auto-qualifies any short (≤6 word), non-question message that reaches here without matching detectEditIntent's imperative-verb pattern — the exact "The stripe integration" shape from the real incident.
  2. Secondary, single-purpose classifier call (completeText, bounded to 6s, fails closed to "no"): handles longer/ambiguous phrasing the heuristic doesn't resolve.

Either path files a real Gitea issue in the company's own repo (new listIssues + the already-proven createIssue) before the system prompt is built. gateInstructions' "I'll wire that"/"it's in the queue" framing is now conditioned on real work (an edit dispatch OR a filed issue) having actually happened this turn — never said as scripted filler otherwise.

fetchBacklogSummary also now surfaces the company's real open/recently-closed Gitea issues alongside the synthetic primitive-derived list, so "it's queued"/"already built" claims are grounded in the same system of record the nightly loop and the SMS-to-issue path (#744) already use.

Test plan

  • npx tsc --noEmit — clean
  • npx vitest run — full suite: 396 files, 5615 tests passed, 0 failures
  • New gitea-client-listissues-774.test.ts (9 tests): success/failure/thrown-error paths, state/limit params, unconfigured degradation
  • New ask-real-work-grounding-774.test.ts (13 tests): heuristic path files an issue with no classifier call, plain questions never file, classifier path both ways, timeout/failure degrades safely, no double-filing when an edit was already dispatched, free-tier/unprovisioned never file, system-prompt framing conditioned correctly both ways, real Gitea issues surfaced in the backlog block, graceful degradation when Gitea is unreachable
  • Confirmed zero regression across all existing ask/edit-intent test suites (71 tests)

…a issues (#774, Gap 2)

Real incident: a paid, git-provisioned founder said "The stripe
integration" (a topic phrase, not an imperative edit -- detectEditIntent
correctly stayed conservative and never fired). Cody still replied "I'll
have this wired in the next run" -- gateInstructions unconditionally
scripted that phrasing for every change/feature message, with zero task or
issue ever actually created. fetchBacklogSummary's own "backlog" was purely
synthetic (derived from selectPrimitives), with no connection to
lib/git/gitea-client.ts at all, so Cody had no real system of record to
cite either.

Fixed with two combined detection layers feeding one real action:
  1. A cheap, deterministic heuristic (no LLM call) auto-qualifies any
     short (<=6 word), non-question message that reached here without
     matching detectEditIntent's imperative-verb pattern -- the exact
     "The stripe integration" shape from the real incident.
  2. A secondary, single-purpose classifier call (completeText, bounded to
     6s, fails closed to "no") handles longer/ambiguous phrasing the
     heuristic doesn't resolve.
Either path files a REAL Gitea issue in the company's own repo (new
listIssues + the already-proven createIssue) before the system prompt is
built. gateInstructions' "I'll wire that"/"it's in the queue" framing is
now conditioned on real work (an edit dispatch OR a filed issue) having
actually happened THIS turn -- never said as scripted filler otherwise.

fetchBacklogSummary also now surfaces the company's real open/recently-
closed Gitea issues alongside the synthetic primitive-derived list, so
"it's queued"/"already built" claims are grounded in the same system of
record the nightly loop and the SMS-to-issue path (#744) already use.
@urbantech
urbantech merged commit bc6492c into main Sep 16, 2026
1 check passed
@urbantech
urbantech deleted the feat/ground-promises-in-real-gitea-issues-774 branch September 16, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant