Skip to content

Add a software-factory memory handoff example - #935

Merged
zlareb1 merged 3 commits into
mainfrom
example/software-factory-memory
Nov 19, 2026
Merged

zlareb1 merged 3 commits into
mainfrom
example/software-factory-memory

Conversation

@zlareb1

@zlareb1 zlareb1 commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Changelog category

  • Documentation

Why

Coding agents need to hand source evidence and a saved lesson to a reviewer without treating task completion as code acceptance. This example joins the SDK's existing source lookup, memory, run and fenced-task operations in one finite application.

Scope and risk

Add a Python reference script, usage and prerequisite documentation, and eleven offline mocked-transport cases. The caller supplies an indexed public repository, its commit, a review claim, an existing shared namespace and inbox, and two scoped service-account credentials. Application code awaits each lookup and write; no model chooses tools or implements or reviews a patch.

The example checks source watermarks, a complete definition, stored-note provenance and task ownership. It compares returned source bodies, reports an evidence handoff with a neutral run outcome, and deletes only its generated memory key. It checks the observed task fence before cleanup and sends that fence on cancellation, including before a successful claim. Rate-limit pacing and retries are disabled. Cleanup is not an atomic lifecycle reservation; other workers must not claim or defer the example task. Operation receipts omit credentials, source bodies, claims and raw error bodies.

It does not wait for native code-link processing or verify a lesson's truth. The documentation distinguishes tombstoning from erasure, retained task/run history, ambiguous responses, provider use and operator reconciliation. Real deployment execution and model quality remain unmeasured.

Compatibility, rollout and rollback

  • Wire: none. The literal request fields for the thirteen operations were checked against the published Python SDK contracts.
  • Operator steps: none for deployment. Running the example requires the documented public index, namespace, inbox policy and separate service principals.
  • Rollback: revert these example, documentation and test files. Running the script retains task/run history and tombstoned memory history.

Tests

  • Eleven focused tests pass using the real SDK with an HTTP mock transport. They cover unchanged and changed source, bad writer identity, merged-write refusal, commit mismatch, a replaced lease, a lagging compiler tier, rate-limit refusal and cleanup before or during a competing claim. No live request is sent.
  • Ruff format/check, Python syntax and strict mypy on the example pass.
  • Prettier 3.9.9 checks the changed README; prose and whitespace checks pass.
  • Full repository checks run in GitHub CI. No broad local suite, live example, provider call or model evaluation was run.

AI assistance in the code

  • AI-generated: Codex wrote the example, documentation and tests. The SDK contracts, source/provenance boundaries, cleanup and offline behavior were checked.

  • I can explain every line of this diff and how it interacts with the rest of Loom.

Checklist

  • Full format, lint, typecheck and unit checks pass in GitHub CI.
  • No generated API, migration, plugin or frontend change.
  • Documentation names the example's prerequisites and unverified runtime behavior.
  • Public text passes prose checks.
  • Commits are signed off.

@zlareb1
zlareb1 merged commit 2629f6c into main Nov 19, 2026
44 checks passed
@zlareb1 zlareb1 mentioned this pull request Nov 19, 2026
6 tasks done
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