newsfilter
← Interviews
AI Engineer23 min

Your PR Says the Tests Passed. Prove It. - Stephen Chin & Cassandra Chin

Stephen Chin, Cassandra Chin

Conference Presentation
  • Problem Statement: Developers frequently face PR rejections due to poor documentation, incorrect facts, or lack of context, rather than code quality issues.
    • Standard AI coding agents often fail because they rely on compressed session logs, leading to inaccuracies as the context window churns.
    • Repeatedly iterating on PRs to fix errors creates a "token crisis" and drives up costs without guaranteeing accuracy.
  • Solution Introduction: TraceTune is an open-source framework designed to improve PR quality by aggregating agent context, code history, and audit trails.
    • The system employs an independent writer and reviewer to synthesize evidence into a high-quality PR record.
    • TraceTune optionally generates explanatory comics to illustrate complex changes and maintain developer engagement.
  • Technical Architecture & The "Archie" Graph: The updated workflow integrates "Archie," a new open-source, Rust-based, in-memory embedded graph database (Relate).
    • Archie constructs a pre-computed "evidence graph" of relationships and changes, eliminating the need for agents to re-research facts during drafting.
    • This approach utilizes "neighborhood briefs" to provide connected facts and attributions, allowing cheaper reviewer models to function effectively.
    • The system reverses the traditional model hierarchy: it uses lower-cost, mechanical models for reviewing/cross-checking while reserving high-cost models (Sonnet/Turbo) for the final drafting to ensure human-like quality.
  • Quantitative Results: Benchmarked against PR Bench, the combination of TraceTune and the Relate graph database significantly improved PR quality scores.
    • Quality scores (1–100 scale) increased from ~74–76 to 82–86 across Claude and Codex judges.
    • Token consumption for drafting and reviewing was reduced by approximately 50% compared to previous iterations.
    • The system achieved zero LLM costs for the graph construction phase, relying solely on local compute and storage.
  • Case Study Narrative: A fictionalized workflow involving "Alex" (developer), "Mira" (reviewer), and "Pip" (evidence collector) demonstrated the failure of naive iteration versus the success of the graph-enhanced workflow.
    • Initial attempts failed due to factual errors, such as claiming parallel execution of bun test and bun x tsc when they must be sequential.
    • The final version successfully passed review by explicitly logging cwd states, command attributions, and test dependencies.
  • Future Initiatives:
    • Relate: Launched concurrently at Node.js Conference and AI Engineer San Francisco as a specialized graph database for agent context.
    • Events: "AI Engineer Kids Day" scheduled for the weekend, featuring workshops on AI programming for games and controlling physical soda-can robots.
    • Incentives: Continued use of the "Token Billionaire" program to reward organizations that optimize AI token spend for high-quality engineering outcomes.