Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/product-qualification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Install qualification dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]" build twine
pip install -e ".[dev,langchain]" build twine

- name: Run credential-free product qualification
run: |
Expand Down
23 changes: 18 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
- name: Install qualification dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]" build twine
pip install -e ".[dev,langchain]" build twine

- name: Verify tag matches package version
env:
Expand Down Expand Up @@ -135,11 +135,18 @@ jobs:
needs: publish

permissions:
actions: read
contents: write

steps:
- uses: actions/checkout@v4

- name: Download qualification evidence
uses: actions/download-artifact@v4
with:
name: release-qualification
path: release-evidence

- name: Create release notes from CHANGELOG
run: |
VERSION="${GITHUB_REF_NAME#v}"
Expand All @@ -156,10 +163,17 @@ jobs:
pip install build twine
python -m build --wheel --sdist
twine check ./dist/*
VERSION="${GITHUB_REF_NAME#v}"
mkdir -p release-assets
cp dist/* release-assets/
cp release-evidence/product-qualification.json \
"release-assets/scm-v${VERSION}-qualification.json"
tar -czf "release-assets/scm-v${VERSION}-attribution-evidence.tar.gz" \
-C quality/evidence .
(
cd dist
cd release-assets
sha256sum ./*
) | sed 's# \./# #' > SHA256SUMS
) | sed 's# \./# #' > release-assets/SHA256SUMS
Comment on lines 173 to +176

- name: Create GitHub release
uses: softprops/action-gh-release@v2
Expand All @@ -168,5 +182,4 @@ jobs:
draft: false
prerelease: false
files: |
dist/*
SHA256SUMS
release-assets/*
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@ Format: each release lists what shipped, why it shipped, what tests verified it,

---

## v1.1.0 - 2026-07-14

**Theme: deterministic contradiction lineage and permanent attribution safety gates.**

- Restricted contradiction updates to the canonical current lineage leaf and
added an internal lineage lock around candidate selection and supersession.
- Defined the canonical current concept as the newest terminal node ordered by
`valid_from`, `created_at`, and ID, and made retrieval resolve stale
candidates to that concept.
- Added load/import normalization for branched snapshots. Local state keeps the
original snapshot as the known-good backup; PostgreSQL keeps the pre-repair
envelope in revision history. Suppressed canonical memories remain
suppressed.
- Added the additive `lineages_repaired` import/load diagnostic without
changing snapshot format v2, public SDK signatures, or the five tools.
- Added credential-free multi-agent attribution qualification across awake,
micro/NREM-like, and deep-sleep states, including metadata preservation,
user isolation, runtime-owned tool identity, and untrusted-memory delimiting.
- Published a sanitized aggregate of the 2,400-response external validation
while excluding raw paid responses and credentials.

### Verification

- The release-only contradiction gate runs 120 updates in 25 fresh processes
and requires zero failures plus retrieval/current-ID agreement in every run.
- Deterministic tests cover equal-similarity candidates, randomized import
order, historical-candidate rejection, concurrent same-user updates,
suppression preservation, idempotent repair, restart recovery, and rollback.
- PostgreSQL qualification verifies revision-locked repair, pre-repair history,
restart idempotence, and failed-repair rollback.
- Installed-wheel and LangChain qualification remain URL-free; REST, MCP, and
JavaScript contracts remain backward compatible.

## v1.0.0 - 2026-07-13

**Theme: embedded lifecycle memory for Python and LangChain agents.**
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ memory.delete_user() # hard deletion
## Advanced Surfaces

REST, MCP, and the HTTP client remain supported for remote or non-Python
deployments. The JavaScript package is a remote REST client; SCM 1.0 does not
deployments. The JavaScript package is a remote REST client; SCM 1.1 does not
claim an embedded JavaScript runtime. See
[Integrations](docs/INTEGRATIONS.md) and [Deployment](docs/DEPLOYMENT.md).

Expand All @@ -132,7 +132,9 @@ python scripts/run_product_qualification.py
The release gate builds and installs the wheel outside the repository, runs
plain Python and LangChain without an SCM server, checks lifecycle recovery,
exercises the optional REST and JavaScript surfaces, and audits dependencies.
See [Quality Gates](docs/QUALITY_GATES.md).
It also runs deterministic lineage stress and credential-free multi-agent
attribution gates. See [Quality Gates](docs/QUALITY_GATES.md) and
[Safety Validation](docs/SAFETY_VALIDATION.md).

## Documentation

Expand All @@ -141,6 +143,7 @@ See [Quality Gates](docs/QUALITY_GATES.md).
- [Product Thesis](docs/PRODUCT.md)
- [Architecture](docs/ARCHITECTURE.md)
- [Deployment](docs/DEPLOYMENT.md)
- [Safety Validation](docs/SAFETY_VALIDATION.md)
- [Research Artifacts](docs/ARTIFACTS.md)

## Research
Expand Down
13 changes: 12 additions & 1 deletion docs/ARTIFACTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ The product repo tracks the paper PDF and this concise artifact manifest. Full
raw benchmark directories should be attached to the corresponding GitHub
Release so the Git history stays clean.

Release target: `v0.9.0-product-runtime`
Paper artifact release: `v0.9.0-product-runtime`
Product validation release: `v1.1.0`
Paper DOI: [`10.5281/zenodo.21323877`](https://doi.org/10.5281/zenodo.21323877)

## Tracked Paper
Expand Down Expand Up @@ -44,3 +45,13 @@ Paper DOI: [`10.5281/zenodo.21323877`](https://doi.org/10.5281/zenodo.21323877)
These artifacts support the paper's lifecycle-memory claim: SCM is useful when
memory must transform during idle time. They do not claim universal superiority
over all retrieval systems on all memory workloads.

## V1.1 Product Validation

The `v1.1.0` release adds
`scm-v1.1.0-attribution-evidence.tar.gz`, a credential-free aggregate archive
containing the tracked machine-readable attribution summary. It records 2,400
audited paid-model responses, zero crashes, 100% cross-user isolation, and no
shared-memory increase in false self-attribution under the tested protocol.
Raw paid responses are intentionally excluded. See
[Safety Validation](SAFETY_VALIDATION.md) for the scope and limitations.
2 changes: 1 addition & 1 deletion docs/GETTING_STARTED.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Getting Started

SCM 1.0 runs inside the Python process that owns the agent. The default path
SCM 1.1 runs inside the Python process that owns the agent. The default path
does not start an SCM service and does not require an SCM endpoint.

## Plain Python
Expand Down
42 changes: 15 additions & 27 deletions docs/PUBLISH.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ included in screenshots.

| Registry | Package | Version |
|---|---|---|
| PyPI | `scm-memory` | `1.0.0` |
| npm | `scm-memory` | `1.0.0` (publish only after registry access is fixed) |
| PyPI | `scm-memory` | `1.1.0` |
| npm | `scm-memory` | `1.1.0` metadata only; registry publishing excluded |

The following values must match before a tag is created:

- `pyproject.toml`
- `sdk/js/package.json`
- `src/version.py`
- `CHANGELOG.md`
- Git tag `v1.0.0`
- Git tag `v1.1.0`

## Qualification Gate

```bash
venv/bin/python scripts/run_product_qualification.py \
--output /tmp/scm-v1.0.0-qualification.json
--output /tmp/scm-v1.1.0-qualification.json
```

Do not publish if this exits nonzero, reports blockers, or skips a required
Expand All @@ -45,13 +45,14 @@ The release workflow uses PyPI trusted publishing. Configure PyPI to trust:
After the merged release commit passes qualification and CI:

```bash
git tag v1.0.0
git push public v1.0.0
git tag -a v1.1.0 -m "SCM v1.1.0 reliability release"
git push public v1.1.0
```

The tag workflow reruns qualification, validates tag/version parity, builds
fresh artifacts, runs `twine check`, and publishes only after those gates pass.
The GitHub Release receives the wheel, source distribution, and `SHA256SUMS`.
The GitHub Release receives the wheel, source distribution, portable
`SHA256SUMS`, qualification JSON, and aggregate attribution-evidence archive.
Release reruns first check whether the exact package version already exists on
PyPI. An existing version skips only the immutable upload; new versions still
require the configured trusted publisher.
Expand All @@ -60,40 +61,27 @@ Verify the registry package from a new environment:

```bash
python3 -m venv /tmp/scm-pypi-check
/tmp/scm-pypi-check/bin/pip install "scm-memory[langchain]==1.0.0"
/tmp/scm-pypi-check/bin/pip install "scm-memory[langchain]==1.1.0"
SCM_DATA_DIR=/tmp/scm-pypi-data /tmp/scm-pypi-check/bin/scm doctor
/tmp/scm-pypi-check/bin/python -c \
"from scm import SCM; m=SCM(user_id='release-check'); m.add_memory('SCM is embedded.'); print(m.search_memory('embedded')['ok']); m.close()"
```

## npm

The npm package is not part of the Phase 1 installation promise. Do not add
`npm install scm-memory` to public quickstarts until the independent registry
verification below succeeds.

Before publishing the JavaScript SDK from the same release commit:
The npm package is excluded from V1.1 because `scm-memory` is not currently
available through the npm registry. Version metadata remains aligned so the
remote JavaScript source client can be tested against the local REST contract:

```bash
cd sdk/js
npm test
npm pack --dry-run --json
npm publish --access=public
```

Verify it independently:

```bash
mkdir -p /tmp/scm-npm-check
cd /tmp/scm-npm-check
npm init -y
npm install [email protected]
node --input-type=module -e \
"import { SCM } from 'scm-memory'; console.log(typeof SCM)"
```

The JavaScript package remains a remote REST client in 1.0.0. Do not describe
it as an embedded lifecycle runtime.
Do not run `npm publish` or add an npm install command to public quickstarts.
The JavaScript source remains a remote REST client, not an embedded lifecycle
runtime.

## Incident Rule

Expand Down
7 changes: 6 additions & 1 deletion docs/QUALITY_GATES.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ GitHub Actions uploads the same report as a build artifact.
canonical OpenAPI routes, and a real JavaScript client lifecycle.
8. Regression: the complete local pytest suite must exit zero. Skips remain
visible and are not counted as passes.
9. Lineage reliability: 25 fresh processes each run 120 contradiction updates;
every run must retain one current node and return that same ID in retrieval.
10. Attribution safety: credential-free single/shared-agent tests cover awake,
micro/NREM-like, and deep sleep, source metadata, identity isolation,
runtime-bound tool identity, and untrusted-memory delimiters.

## Current budgets

Expand All @@ -53,7 +58,7 @@ GitHub Actions uploads the same report as a build artifact.
- Warm offline embedded add/search and middleware overhead p95: less than
300 ms, excluding the agent model's own latency.

These tests qualify SCM 1.0's embedded local runtime and PostgreSQL coordination
These tests qualify SCM 1.1's embedded local runtime and PostgreSQL coordination
contract. They do not claim multi-region availability or hosted-service SLOs;
those require deployment infrastructure, traffic replay, network fault
injection, and long-running soak evidence beyond this repository.
60 changes: 60 additions & 0 deletions docs/SAFETY_VALIDATION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Multi-Agent Attribution Validation

SCM 1.1 converts a post-publication attribution study into permanent product
qualification gates. The bounded result is:

> SCM showed no shared-memory increase in false self-attribution under the
> tested protocol.

This is evidence about a defined test matrix, not a universal safety claim.

## External Validation

Two independently audited OpenAI runs evaluated the unchanged SCM lifecycle
architecture from the July paper. Each run contained 1,200 responses across
single-agent and shared-agent conditions in awake, NREM-only, and full
deep-sleep states, plus two provenance interventions.

| Model snapshot | Responses | Crashes | Single deep | Shared deep | Difference |
|---|---:|---:|---:|---:|---:|
| `gpt-5.4-mini-2026-03-17` | 1,200 | 0 | 0/300 | 0/300 | 0.0 pp |
| `gpt-5.4-2026-03-05` | 1,200 | 0 | 0/296 | 0/299 | 0.0 pp |

The denominators in the final two columns are factually correct answers. Both
runs completed the exact matrix, passed artifact audits and secret scans, and
maintained 100% cross-user isolation. Neither run met the preregistered gate
for a shared-memory attribution effect.

The two models interpreted explicit provenance differently. That model effect
does not establish a provenance repair benefit because shared SCM produced no
baseline increase to repair.

## Product Gates

Routine CI does not replay paid responses. Credential-free production tests
instead protect the relevant runtime invariants:

- factual retrieval parity for single-agent and shared-agent use across awake,
micro/NREM-like, and deep-sleep lifecycle states;
- preservation of source, thread, and message metadata through lifecycle
transformations;
- strict user isolation and runtime-owned identity binding;
- exactly five model-callable tools, none accepting a model-selected
`user_id`;
- delimiting recalled memory as untrusted user-provided data.

The release-only lineage gate also runs 120 contradiction updates in 25 fresh
processes and requires one deterministic current node plus retrieval/current-ID
agreement in every process.

## Evidence Boundary

The sanitized aggregate is tracked at
[`quality/evidence/multi_agent_attribution_2026_07_14.json`](../quality/evidence/multi_agent_attribution_2026_07_14.json).
The `v1.1.0` GitHub Release includes that file in a small evidence archive.
Raw paid-response payloads and credentials are excluded.

The validation is limited to neutral fact packs, one shared user-owned memory
scope, the frozen July implementation, two OpenAI snapshots, and the specified
lifecycle conditions. It does not prove that all multi-agent systems are free
from attribution errors, and it does not change the July paper.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "scm-memory"
version = "1.0.0"
version = "1.1.0"
description = "SCM Memory: embedded lifecycle memory for Python and LangChain agents."
readme = "README.md"
requires-python = ">=3.10"
Expand Down
Loading
Loading