feat(engine): page-store kernel skeleton (WP-0014 T1)

engine/ package: EngineKernel (in-process page store with per-page version
history; create/edit-as-version, recoverable delete-tombstone, keys, current_rev)
+ wikilink extraction + in-shard link resolution / red-link detection (EC-1..EC-4).
Reuses model/provenance; git-IS-store backing slots in later. 6 tests green,
pyflakes clean, full suite green. Marks T1 done.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-15 23:57:31 +02:00
parent e62560eb5a
commit 2100e956aa
5 changed files with 190 additions and 1 deletions

View File

@@ -12,6 +12,7 @@ updated: "2026-06-15"
depends_on:
- SHARD-WP-0007
- SHARD-WP-0013
state_hub_workstream_id: "bfce1644-d93d-44c7-af2c-6b0cb50cedd4"
---
# SHARD-WP-0014 — Wiki-engine implementation
@@ -47,8 +48,9 @@ computational extensions; the full feature-control control plane. Build the fram
```task
id: SHARD-WP-0014-T1
status: todo
status: done
priority: high
state_hub_task_id: "e81ba881-7e92-4581-99ff-b12ad2bcabb3"
```
`src/shard_wiki/engine/kernel.py`: the minimal kernel — a page store + lifecycle over existing
@@ -63,6 +65,7 @@ helper). No extensions yet. Tests: page CRUD-as-history; kernel-only shard works
id: SHARD-WP-0014-T2
status: todo
priority: high
state_hub_task_id: "8ae8e58a-f081-432b-b2c5-b6435fbf3843"
```
`src/shard_wiki/engine/extension.py`: the `Extension` contract (id, provides, types, hooks,
@@ -79,6 +82,7 @@ conformance catches a lying extension.
id: SHARD-WP-0014-T3
status: todo
priority: high
state_hub_task_id: "c4fe9df4-e6a8-4b7d-891b-59ceec6aebac"
```
`src/shard_wiki/engine/activation.py` (ADR-0001): resolve a shard's **activation profile**
@@ -94,6 +98,7 @@ subset; absent-provider falls back to defaults; context scoping works.
id: SHARD-WP-0014-T4
status: todo
priority: high
state_hub_task_id: "15fc8db7-cd80-4675-b387-81aa9bc7d308"
```
`src/shard_wiki/engine/profile.py`: fold the active extensions' `on_profile` contributions into a
@@ -107,6 +112,7 @@ profile; the derived profile is valid and conformance-passes.
id: SHARD-WP-0014-T5
status: todo
priority: high
state_hub_task_id: "2fbf498c-efe9-400a-8a13-7f1b521b3534"
```
`src/shard_wiki/engine/adapter.py`: `EngineShardAdapter` implements `adapters.ShardAdapter`,
@@ -120,6 +126,7 @@ integration: engine shard passes `assert_conformant`; attach → resolve → edi
id: SHARD-WP-0014-T6
status: todo
priority: medium
state_hub_task_id: "b88d1640-9afa-4957-aec3-a7264b09494c"
```
Implement one real extension end-to-end — **`ext.views` (BackLinks)** or **`ext.struct`