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
25 changes: 17 additions & 8 deletions SESSION_FOCUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

*Current sprint, SDK status, and active work. Updated by operator and autonomous sessions.*

*Last updated: 2026-04-17 (Sprint 39)*
*Last updated: 2026-04-17 (Sprint 41)*

---

## Current Sprint

**See `docs/SPRINT.md` for full sprint plan and task details.** Do not duplicate sprint content here — SPRINT.md is the source of truth for task scope, status, and dependencies.

### Sprint 41 Summary: Remove Dead web4_sdk.py + Fix v0.26.0 Documentation Gaps (COMPLETE)

| Task | Status | Notes |
|------|--------|-------|
| T1: Remove dead `web4_sdk.py` + fix docs | DONE | Deleted `web4_sdk.py` (dead async HTTP client for nonexistent services, not in wheel) + `test_sdk_integration.py` (14 tests). README: version 0.25.0→0.26.0, removed misleading "Client SDK" section. Quickstart docstring: v0.25.0→v0.26.0. 2613 tests, 0 new files, 2 deleted. |

### Sprint 39 Summary: SDK v0.26.0 Release Housekeeping (COMPLETE)

| Task | Status | Notes |
Expand Down Expand Up @@ -136,7 +142,7 @@ See `docs/SPRINT.md` for full history. Highlights: JSON-LD serialization for all

- **Version**: 0.26.0
- **Modules**: 22 library modules + MCP server entry point (trust, lct, atp, federation, r6, mrh, acp, dictionary, entity, capability, errors, metabolic, binding, society, reputation, security, protocol, mcp, attestation, validation, deserialize, generate, mcp_server)
- **Tests**: 2627 passing (97.8% coverage)
- **Tests**: 2613 passing (97.8% coverage)
- **CLI**: `web4 info/validate/list-schemas/roundtrip/generate/selftest/trust` (7 subcommands)
- **Exports**: 364 symbols via `web4/__init__.py`
- **from_dict()**: 58 classmethods across 10 modules — all classes with to_dict()/as_dict() have matching from_dict()
Expand Down Expand Up @@ -185,28 +191,30 @@ Web4 SDK development aligns with ARIA grant requirements:
## Recent Commits

```
91ed230 Sprint 36 T1: Replace stale examples with v0.25.0 quickstart (#160)
64add4c Sprint 39 T1: SDK v0.26.0 release housekeeping (#163)
759eaef Sprint 38 T1: ruff format codebase-wide + CI enforcement (#162)
e355a19 Sprint 37 T1: ruff check lint cleanup + CI enforcement (#161)
3e6ca32 [Publisher] Fix PDF date (February→April 2026), rebuild artifacts
4a97ff7 Sprint 35 T1: CI workflow hardening — strict mypy + wheel verification (#158)
2b5292f Sprint 34 T1: SDK v0.25.0 release housekeeping (#156)
```

---

## Open PRs

- PR #160: Sprint 36 T1 — Replace stale examples with v0.25.0 quickstart (pending review)
- PR #164: Sprint 40 T1 — Wire examples/quickstart.py into CI wheel smoke job (pending review)

### Closed PRs (recent)

- PR #159 CLOSED (superseded) — attempted `ruff format` sweep but shipped with failing lint and stray session-report artifacts; its lint debt was fixed separately in PR #161 (Sprint 37 T1, merged), and its `ruff format` intent is addressed in Sprint 38 T1 on a clean branch.
- PR #163 MERGED — Sprint 39 T1: SDK v0.26.0 release housekeeping
- PR #160 MERGED — Sprint 36 T1: Replace stale examples with v0.25.0 quickstart
- PR #159 CLOSED (superseded) — attempted `ruff format` sweep; intent addressed in Sprint 38

---

## Completeness Summary

- All 39 sprints COMPLETE (Sprints 1-39)
- All 41 sprints COMPLETE (Sprints 1-41)
- All 9 JSON-LD schemas with cross-language validation vectors (278 total, in pytest)
- All `to_jsonld()` functions have `from_jsonld()` inverses (API symmetry complete)
- All `to_dict()`/`as_dict()` methods have `from_dict()` inverses (58 round-trip methods total)
Expand All @@ -227,7 +235,8 @@ e355a19 Sprint 37 T1: ruff check lint cleanup + CI enforcement (#161)
- All 23 generate() types pass roundtrip fidelity (generate → from_jsonld → to_jsonld = identical)
- `ruff check web4/ tests/` passes with 0 errors — CI enforces lint on source + tests
- `ruff format --check web4/ tests/test_*.py` passes with 0 changes — CI enforces formatting on source + tests
- Dead `web4_sdk.py` removed — async HTTP client for nonexistent services, not distributed in wheel

---

*Updated by autonomous session, 2026-04-17 (Sprint 39SDK v0.26.0 release housekeeping)*
*Updated by autonomous session, 2026-04-17 (Sprint 41Remove dead web4_sdk.py + fix v0.26.0 docs)*
28 changes: 27 additions & 1 deletion docs/SPRINT.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,38 @@
# Web4 Sprint Plan

**Created**: 2026-03-14
**Updated**: 2026-04-17 (Sprint 39)
**Updated**: 2026-04-17 (Sprint 41)
**Phase**: Development
**Track**: web4 (Legion)

---

## Sprint 41: Remove Dead web4_sdk.py + Fix v0.26.0 Documentation Gaps (2026-04-17)

Sprint 36 deleted the example scripts that imported from `web4_sdk.py` because they
caused `ImportError` (referencing nonexistent microservices). However, `web4_sdk.py`
itself (~1500 lines) and its test file were left behind. The README still documented
it as a usable Client SDK. Additionally, the README and quickstart docstring still
referenced v0.25.0 despite the v0.26.0 bump in Sprint 39.

### T1: Remove dead `web4_sdk.py` + fix v0.26.0 documentation gaps
**Status**: DONE
**Completed**: 2026-04-17
**Scope**:
(1) Delete `web4_sdk.py` — async HTTP client for nonexistent services, not distributed
in wheel (`packages.find.include = ["web4*"]`), examples deleted in Sprint 36.
(2) Delete `tests/test_sdk_integration.py` — 14 tests for the removed module.
(3) Update `README.md`: version 0.25.0 → 0.26.0, remove "Client SDK" section,
remove `web4_sdk.py` from Project Structure, update test count 2627 → 2613.
(4) Update `examples/quickstart.py` docstring: v0.25.0 → v0.26.0.
(5) Update `docs/SPRINT.md` and `SESSION_FOCUS.md`.
**Result**: No dead code referencing nonexistent services. README accurately reflects
what's distributed in the wheel. All version references consistent at v0.26.0.
2613 tests pass (14 removed with deleted module). mypy --strict clean. ruff clean.
0 new files, 2 files deleted, 4 files modified.

---

## Sprint 39: SDK v0.26.0 Release Housekeeping (2026-04-17)

Three quality-improvement PRs merged since v0.25.0: CI workflow hardening (#158),
Expand Down
27 changes: 3 additions & 24 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.25.0 | **Python**: 3.10+ | **License**: MIT | **Typed**: PEP 561
**Version**: 0.26.0 | **Python**: 3.10+ | **License**: MIT | **Typed**: PEP 561

## Installation

Expand Down Expand Up @@ -185,27 +185,7 @@ python -m pytest tests/ --cov=web4
mypy --strict web4/
```

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

## Client SDK

The `web4_sdk.py` module (separate from the `web4` package) provides an async HTTP
client for connecting to Web4 infrastructure services. It requires `aiohttp` and
`pynacl` and is intended for applications that communicate with running Web4 nodes.

```python
from web4_sdk import Web4Client

client = Web4Client(
identity_url="http://localhost:8001",
auth_url="http://localhost:8003",
lct_id="lct:web4:ai:society:001",
private_key=key_bytes
)
```

The client SDK re-exports canonical types from the `web4` package, so both
`from web4 import T3` and `from web4_sdk import T3` resolve to the same objects.
2613 tests, 97.8% coverage, mypy strict zero-error, CI across Python 3.10-3.13.

## Project Structure

Expand All @@ -221,9 +201,8 @@ web4/ # Python package (22 modules + MCP server)
generate.py # Minimal valid JSON-LD document generation
validation.py # Schema validation
... # (17 more modules)
tests/ # 2627 tests
tests/ # 2613 tests
schemas/ # JSON Schemas + JSON-LD contexts
web4_sdk.py # Async HTTP client (separate)
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.25.0.
"""Quickstart for the web4 Python SDK v0.26.0.

Demonstrates the three behavioral composition points of the current SDK:

Expand Down
217 changes: 0 additions & 217 deletions web4-standard/implementation/sdk/tests/test_sdk_integration.py

This file was deleted.

Loading
Loading