Skip to content

End-to-end coding pipeline: write → test → fix → commit loop never proven #370

Closed

Description

@joelteply

Problem

The complete coding workflow — persona receives task, writes code, runs tests, fixes failures, commits — has never been proven end-to-end with local personas. Each piece exists in isolation but the full loop hasn't been wired and validated.

The Loop

1. Receive task ("add fibonacci to math.ts")
2. Read existing code (code/read)
3. Write solution (code/write or code/edit)
4. Run tests (code/shell/execute → pytest/vitest)
5. Parse test output (pass/fail + error messages)
6. If fail: read error, edit code, goto 4 (max N retries)
7. If pass: commit (workspace/git/commit)
8. Report result with confidence score

What Exists

What's Missing

1. A Coding Sentinel Pipeline Template

A recipe/pipeline YAML/JSON that encodes the write→test→fix→commit loop as a reusable sentinel pipeline. Should be a recipe like coding.json but with the actual pipeline steps defined.

2. Test Output Parsing

The sentinel needs to parse pytest/vitest output and extract:

  • Pass/fail status
  • Error messages and stack traces
  • Which tests failed and why
  • Feed this back into the LLM step for targeted fixes

3. Retry with Context

When code fails tests, the retry needs to include:

  • The original task
  • The code that was written
  • The test output showing what failed
  • Previous attempts (to avoid repeating the same mistake)

4. Validation Before Commit

Don't commit code that doesn't pass tests. The pipeline must gate on test success.

Acceptance Criteria

# This sentinel pipeline should work:
./jtag sentinel/run --pipeline=coding-loop --params='{
  "task": "Add fibonacci(n) to src/utils/math.ts with tests",
  "testCommand": "npx vitest run src/utils/math.test.ts",
  "maxRetries": 3
}'

# Expected: code written, tests pass, committed

Related

Activity

  1. joelteply commented on Mar 25, 2026

    @joelteply
    ContributorAuthor

    Progress: README added (PR #407) — tool schema discovery now works. sentinel/coding-agent tested e2e (file creation, error handling). Groq 400 errors from missing param types should resolve. Remaining: full write→test→fix→commit loop proof via chat (blocked by queue latency #399).

  2. joelteply commented on Mar 25, 2026

    @joelteply
    ContributorAuthor

    sentinel/coding-agent proven working e2e (PR #407 — README for schema discovery). File creation, error handling, training capture all functional. Chat→code autonomous trigger is now #411 scope.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions