Computer Science > Software Engineering
Title:Revision-Consistent Code Context for Agents That Edit Their Environment
Abstract:Editing agents query repositories while simultaneously changing them. Source content, symbols, graph relations, and retrieval state may be maintained by different stores and refreshed at different times. During an update, a successful query can therefore combine facts that never belonged to the same repository state. We call this condition mixed-revision code context. This paper proposes an Agent-visible complete-revision publication contract for composite code-intelligence queries. Before a query-visible publication point, a service must wait, report unavailability, or serve a complete old revision; after that point, it serves the complete new revision. The contract requires a shared version identity and publication boundary across every view returned in one response. We instantiate the method in Codetrip, whose brief operation joins source, symbol, and graph facts. In a controlled comparison on frozen Gin v1.12.0, live-source composition produced two unsafe responses in 150 update trials, whereas complete-revision publication produced none under the same five edit scenarios. We further implement journaled, idempotent publication and terminate the real MCP process at five durable boundaries. All 300 evaluable recovery trials on frozen Gin and Cobra returned complete-new context equivalent to a clean full rebuild, with median restart-to-context latency of 77--131 ms. In a separate rename probe, mixed context occurred in 0/30 Codetrip trials and 30/30 trials for both CodeGraph and codebase-memory-mcp before clean-full-equivalent convergence. The contribution is an Agent-facing safety contract, implementation pattern, and measurement protocol for joining live repository bytes with asynchronously derived facts. Every successful composite response consequently has a testable repository-state meaning, including after interruption.
| Comments: | 15 pages, 8 figures. Source code and reproducibility artifacts are available at this https URL |
|---|---|
| Subjects: | Software Engineering (cs.SE) |
| Cite as: | arXiv:2611.21616 [cs.SE] |
| (or arXiv:2611.21616v1 [cs.SE] for this version) | |
| https://doi.org/10.48550/arXiv.2611.21616 arXiv-issued DOI via DataCite |
Submission history
Access Paper:
- HTML (experimental)
Additional Features
- Audio Summary
Current browse context:
References & Citations
- Google Scholar
- Semantic Scholar
BibTeX formatted citation
Bookmark
Bibliographic and Citation Tools
Code, Data and Media Associated with this Article
Demos
Recommenders and Search Tools
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community? Learn more about arXivLabs.