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
291 changes: 66 additions & 225 deletions SESSION_FOCUS.md

Large diffs are not rendered by default.

53 changes: 52 additions & 1 deletion docs/SPRINT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,63 @@
# Web4 Sprint Plan

**Created**: 2026-03-14
**Updated**: 2026-05-15 (Sprint 53)
**Updated**: 2026-05-19 (Sprint 55)
**Phase**: Development
**Track**: web4 (Legion)

---

## Sprint 55: SDK v0.28.0 Release Housekeeping (2026-05-19)

Version bump and documentation update consolidating post-Sprint-53 work:
cross-society MCP types (PR #195/#199), conformance xfail resolution (PR #210),
and the informal C-series audit/remediation thread (PRs #197, #200-#211).

### T1: v0.28.0 release housekeeping
**Status**: DONE
**Completed**: 2026-05-19
**Authorized by**: Established release housekeeping pattern (Sprints 21, 23,
26, 31, 33, 34, 39, 53). Policy-reviewed and approved.
**Scope**:
1. Version bump 0.27.0 -> 0.28.0 in `pyproject.toml`.
2. CHANGELOG entry for v0.28.0 covering PRs #195, #199, #210.
3. `__init__.py` docstring: corrected stale counters (exports 369->376,
tests 2709->2749), updated version note.
4. README: version, export count (369->376), test count (2709->2749),
error categories (6->7 with Cross-Society), project structure counts.
5. `examples/quickstart.py`: docstring version.
6. Test assertions: version strings in `test_cli.py` and `test_package_api.py`.
7. `docs/SPRINT.md` and `SESSION_FOCUS.md` updated.

**Result**: 0 new files. All version references consistent. 376 exports,
2749 tests (2744 passed, 5 xfailed conformance gaps).

---

## Sprint 54: Spec Audit & Remediation Series (2026-05-15 – 2026-05-18)

Informal C-series: internal-consistency audits of `mcp-protocol.md` (C1/C2)
and `presence-protocol.md` (C5), §7.7 promotion tracking (C3), vector-freshness
process (C4), and remediation PRs resolving audit findings. Also includes
cross-society SDK types and conformance xfail resolution.

**Note**: This sprint was not formally defined in advance. Work was proposed
and policy-reviewed per session under v2 protocol. Recorded here retroactively
as the formal Sprint 54 entry for continuity.

### Work completed (PRs #195–#211)
**Status**: DONE
**Key deliverables**:
- **C1**: MCP Protocol ↔ SDK alignment audit (`docs/audits/mcp-protocol-sdk-alignment-2026-05-15.md`)
- **C2**: mcp-protocol.md internal-consistency audit (13 findings: 4 HIGH, 5 MEDIUM, 4 LOW) → PRs #200, #201, #203
- **C3**: §7.7 promotion tracking stub (`docs/audits/s7.7-promotion-tracking-2026-05-16.md`) → PR #202
- **C4**: Vector-freshness check process → PR #197
- **C5**: presence-protocol.md internal-consistency audit (2 HIGH, 6 MEDIUM, 5 LOW) → PRs #206, #207, #208, #209
- **SDK**: Cross-society types (PR #195), test coverage (PR #199), 3 conformance xfails resolved (PR #210)
- **Docs**: CHANGELOG staleness resolved (PR #211), whitepaper no-change checks

---

## Sprint 53: SDK v0.27.0 Release Housekeeping (2026-05-15)

Version bump and documentation update consolidating Sprints 41-42 and 50-52
Expand Down
28 changes: 28 additions & 0 deletions web4-standard/implementation/sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,34 @@

All notable changes to the Web4 Python SDK.

## [0.28.0] - 2026-05-19

Cross-society MCP types, conformance xfail resolution, error taxonomy expansion.

### Added
- **Cross-society MCP types** (PR #195) — implements §7.3–7.6 from `mcp-protocol.md`:
`CrossSocietyContext` envelope for cross-society MCP calls (§7.4),
`ReputationEnvelope` for signed R7 action outcomes (§7.3),
`MCPContextResource` for context resource definitions (§6.3),
`OutcomeClass`, `PropagationScope`, `CrossSocietyInteractionType` enums.
7 new exports (369→376).
- **`CrossSocietyError` class** (PR #199) — 7th error category subclass with 6
`ErrorMeta` registry entries for §7.6 cross-society error codes (24→30 total codes,
6→7 categories).
- **Cross-society test coverage** (PR #199) — 37 new tests covering enum values,
construction, defaults, `to_dict`/`from_dict` round-trips, frozen checks, and
package-level import verification.

### Changed
- **3 conformance xfails resolved** (PR #210) — reconciled test vectors `t3-002`
(weighted aggregate), `t3-006` (talent decay invariant), and `r7-rep-001` (V3
valuation scope) with normative spec. Conformance: 34 passed / 5 xfailed
(was 31/8).

### Summary
376 exports, 2749 tests (2744 passed, 5 xfailed conformance gaps), 23 modules,
mypy --strict clean, ruff clean.

## [0.27.0] - 2026-05-15 (renamed to `web4-sdk` for PyPI release)

### Packaging
Expand Down
12 changes: 6 additions & 6 deletions web4-standard/implementation/sdk/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ specified in the [web4-standard](https://github.com/dp-web4/web4) and works with
network services — no async, no HTTP, no external dependencies beyond the Python
standard library.

**Version**: 0.27.0 | **Python**: 3.10+ | **License**: AGPL-3.0-or-later | **Typed**: PEP 561
**Version**: 0.28.0 | **Python**: 3.10+ | **License**: AGPL-3.0-or-later | **Typed**: PEP 561

> **Install name vs import name.** The distribution is published on PyPI as
> **`web4-sdk`** (the unsuffixed `web4` PyPI name is held by an unrelated
Expand Down Expand Up @@ -98,7 +98,7 @@ The SDK contains 23 modules, all importable from the `web4` namespace:
| `deserialize` | Generic JSON-LD deserialization dispatcher | `from_jsonld`, `from_jsonld_string`, `supported_types` |
| `generate` | Produce minimal valid JSON-LD documents | `generate`, `generate_string`, `available_types` |

369 symbols are exported from `web4.__init__`. All 23 submodules have `__all__` declarations.
376 symbols are exported from `web4.__init__`. All 23 submodules have `__all__` declarations.

## MCP Server

Expand Down Expand Up @@ -186,7 +186,7 @@ except Web4Error as e:
# {"type": "about:blank", "title": "...", "status": 403, "detail": "Binding was revoked"}
```

Six error categories: Binding, Pairing, Witness, Authorization, Crypto, Protocol.
Seven error categories: Binding, Pairing, Witness, Authorization, Crypto, Protocol, Cross-Society.

## Testing

Expand All @@ -201,13 +201,13 @@ python -m pytest tests/ --cov=web4
mypy --strict web4/
```

2709 tests, 97.8% coverage, mypy strict zero-error, CI across Python 3.10-3.13.
2749 tests, 97.8% coverage, mypy strict zero-error, CI across Python 3.10-3.13.

## Project Structure

```
web4/ # Python package (23 modules + MCP server)
__init__.py # 369 re-exports
__init__.py # 376 re-exports
__main__.py # CLI entry point (web4 info/validate/list-schemas/roundtrip/generate/selftest/trust)
mcp_server.py # MCP server entry point (web4-mcp)
py.typed # PEP 561 marker
Expand All @@ -217,7 +217,7 @@ web4/ # Python package (23 modules + MCP server)
generate.py # Minimal valid JSON-LD document generation
validation.py # Schema validation
... # (18 more modules)
tests/ # 2709 tests
tests/ # 2749 tests
schemas/ # JSON Schemas + JSON-LD contexts
pyproject.toml # Package metadata (single version source)
```
Expand Down
2 changes: 1 addition & 1 deletion web4-standard/implementation/sdk/examples/quickstart.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"""Quickstart for the web4 Python SDK v0.27.0.
"""Quickstart for the web4 Python SDK v0.28.0.

Demonstrates the three behavioral composition points of the current SDK:

Expand Down
2 changes: 1 addition & 1 deletion web4-standard/implementation/sdk/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 = "web4-sdk"
version = "0.27.0"
version = "0.28.0"
description = "Web4 SDK — trust tensors, LCTs, ATP/ADP, federation (SAL), R7 actions, MRH, ACP, security, protocol types"
readme = "README.md"
requires-python = ">=3.10"
Expand Down
4 changes: 2 additions & 2 deletions web4-standard/implementation/sdk/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_info_shows_version(self, capsys: pytest.CaptureFixture[str]) -> None:
out = capsys.readouterr().out
assert rc == 0
assert "web4" in out
assert "0.27.0" in out
assert "0.28.0" in out

def test_info_shows_module_count(self, capsys: pytest.CaptureFixture[str]) -> None:
rc = main(["info"])
Expand Down Expand Up @@ -617,7 +617,7 @@ def test_no_args(self) -> None:
def test_info(self) -> None:
r = _run_cli(["info"])
assert r.returncode == 0
assert "0.27.0" in r.stdout
assert "0.28.0" in r.stdout

def test_validate_valid_doc(self) -> None:
from web4.trust import T3
Expand Down
4 changes: 2 additions & 2 deletions web4-standard/implementation/sdk/tests/test_package_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@

class TestPackageVersion:
def test_version_string(self):
assert web4.__version__ == "0.27.0"
assert web4.__version__ == "0.28.0"

def test_version_accessible(self):
from web4 import __version__

assert __version__ == "0.27.0"
assert __version__ == "0.28.0"


class TestAllExports:
Expand Down
6 changes: 3 additions & 3 deletions web4-standard/implementation/sdk/web4/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
- Deserialization — generic JSON-LD dispatcher for all Web4 types
- Generation — produce minimal valid JSON-LD documents for any Web4 type

23 modules + MCP server, 369 exports, 2709 tests, 3 behavioral functions, 8 MCP tools, 7 CLI subcommands.
v0.27.0: Society roles, Constraint alignment, conformance test runner, validate_minimum_viable.
23 modules + MCP server, 376 exports, 2749 tests, 3 behavioral functions, 8 MCP tools, 7 CLI subcommands.
v0.28.0: Cross-society MCP types, conformance xfail resolution, error taxonomy expansion.
These modules define the canonical data types and algorithms specified in the web4-standard.
They work offline (no network services required) and are designed to be
imported by applications, services, and other SDKs that build on web4.
Expand All @@ -50,7 +50,7 @@
try:
from importlib.metadata import version as _pkg_version

__version__ = _pkg_version("web4")
__version__ = _pkg_version("web4-sdk")
except Exception:
__version__ = "0.0.0" # fallback when not installed

Expand Down
Loading