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
18 changes: 17 additions & 1 deletion examples/minimal_routine_deposit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,21 @@ The example demonstrates:
- JSON packet record creation.
- JSON visit record creation.
- Signoff creation from the current `templates/visit_signoff.md` shape.
- No CSV registry edit.
- Regenerated compatibility views, with no manual CSV registry edit.
- No task branch for ordinary live-workspace runtime work.

The fictional operator wrote the report; the visitor deposits it. These provenance
values describe this example, not the authorship of every future deposit.

In a disposable copy, place the packet at the JSON record's `path`, the signoff
at `signoff_path`, and the JSON files under `registry/packets/2026/` and
`registry/visits/2026/`, named after their respective IDs. Then run:

```sh
python scripts/generate_registry_views.py
python scripts/validate_repo.py --registry
python scripts/generate_registry_views.py --check
```

The validator smoke suite tests this exact copy-and-validate sequence in a
temporary workspace. Do not put test deposits in the public source repository.
13 changes: 9 additions & 4 deletions examples/minimal_routine_deposit/datadrop_packet.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@
packet_id: 20260603-example-visitor-routine-test
source_session: example-visitor
target_session: Shared
created_by: example-visitor
created_at: 2026-06-03
created_by: example-operator
deposited_by: example-visitor
created_at: 2026-06-03T12:00:00Z
content_origin: operator_authored
source_refs: []
derivative_of: []
provenance_coverage: record_level
status: new
topic: routine-test
purpose: Demonstrate the routine deposit quickstart.
Expand All @@ -16,7 +21,7 @@ related_packets:

## Context

This is a fictional example for ordinary visitor deposits in a controlled live workspace.
This is a fictional example for ordinary visitor deposits in a controlled live workspace. The operator wrote the report; the visitor deposits it with the operator's approval.

## Task

Expand All @@ -36,4 +41,4 @@ Optional review note.

## Notes

This example does not require a branch or CSV registry update.
This example does not require a task branch. Regenerate the compatibility views after adding the JSON records; do not edit CSV files manually.
15 changes: 12 additions & 3 deletions examples/minimal_routine_deposit/packet_record.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
{
"record_type": "packet",
"schema_version": 1,
"packet_id": "20260603-example-visitor-routine-test",
"date": "2026-06-03",
"source_ai": "ExampleAI",
"target_ai": "Shared",
"created_at": "2026-06-03T12:00:00Z",
"created_by": "example-operator",
"deposited_by": "example-visitor",
"content_origin": "operator_authored",
"source_refs": [],
"source_note": "Fictional scenario: the operator wrote the report and the visitor deposited it.",
"derivative_of": [],
"provenance_coverage": "record_level",
"source_session": "example-visitor",
"target_session": "Shared",
"topic": "routine-test",
"status": "new",
"path": "datadrops/shared/inbox/20260603-example-visitor-routine-test.md",
Expand Down
6 changes: 3 additions & 3 deletions examples/minimal_routine_deposit/signoff.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# Visit Signoff

visit_id: 20260603-example-visitor-routine-test-visit
date: 2026-06-03
created_at: 2026-06-03T12:00:00Z
visitor_id: example-visitor
session_family: example-ai
checked_messages: true
answered_messages: false
created_messages: false
human_relay_needed: false
relay_needed: false
signoff_path: responses/signoffs/20260603-example-visitor-routine-test-signoff.md

## Work Completed

- Created a fictional routine deposit packet using the current Markdown template shape.
- Created the canonical JSON packet record.
- Created the canonical JSON visit record.
- Did not edit CSV registries.
- Regenerated compatibility views without manually editing CSV registries.
- Did not create a task branch for ordinary live-workspace runtime work.

## Open Items
Expand Down
6 changes: 4 additions & 2 deletions examples/minimal_routine_deposit/visit_record.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{
"record_type": "visit",
"schema_version": 1,
"visit_id": "20260603-example-visitor-routine-test-visit",
"date": "2026-06-03",
"created_at": "2026-06-03T12:00:00Z",
"visitor_id": "example-visitor",
"visitor_family": "example-ai",
"session_family": "example-ai",
"checked_messages": true,
"answered_messages": false,
"created_messages": false,
Expand Down
35 changes: 35 additions & 0 deletions tests/test_validator_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
from __future__ import annotations

import subprocess
import json
import shutil
import sys
import tempfile
from pathlib import Path
Expand Down Expand Up @@ -167,7 +169,40 @@ def assert_direct_validator_invariants() -> None:
)


def assert_minimal_routine_deposit() -> None:
"""Validate the shipped specimen at its real destination paths, without repair."""
example = ROOT / "examples" / "minimal_routine_deposit"
with tempfile.TemporaryDirectory() as temporary:
workspace = Path(temporary) / "workspace"
shutil.copytree(ROOT, workspace, ignore=shutil.ignore_patterns(".git", "__pycache__"))
for filename, kind, id_key, artifact, path_key in (
("packet_record.json", "packets", "packet_id", "datadrop_packet.md", "path"),
("visit_record.json", "visits", "visit_id", "signoff.md", "signoff_path"),
):
record = json.loads((example / filename).read_text(encoding="utf-8"))
destination = workspace / "registry" / kind / record[id_key][:4]
destination.mkdir(parents=True, exist_ok=True)
shutil.copy2(example / filename, destination / (record[id_key] + ".json"))
artifact_path = workspace / record[path_key]
artifact_path.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(example / artifact, artifact_path)
for args in (
("scripts/generate_registry_views.py",),
("scripts/validate_repo.py", "--registry"),
("scripts/generate_registry_views.py", "--check"),
):
result = subprocess.run(
[sys.executable, *args], cwd=workspace, text=True,
capture_output=True, check=False,
)
if result.returncode:
raise AssertionError(
f"minimal routine deposit failed: {args}\n{result.stdout}\n{result.stderr}"
)


def main() -> int:
assert_minimal_routine_deposit()
assert_direct_validator_invariants()
assert_valid(
"valid schema fixtures", "--fixtures", "--check-references", "--check-tags"
Expand Down
Loading