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
1 change: 1 addition & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"nefrob.vscode-just-syntax"
],
"settings": {
"terminal.integrated.defaultProfile.linux": "bash",
"python.defaultInterpreterPath": "/root/assets/workspace/.venv/bin/python",
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Cross-language conformance test suite** ([#155](https://github.com/vig-os/fd5/issues/155))
- 6 canonical fixture generators: minimal, sealed, with-provenance, multiscale, tabular, complex-metadata
- 3 invalid fixture generators: missing-id, bad-hash, no-schema
- Expected-result JSON files defining the format contract for any language binding
- 39 pytest conformance tests covering structure, hash verification, provenance, multiscale, tabular, metadata, schema validation, and negative tests
- README documenting how to use the suite and add new cases

- **Preflight feedback and status dashboard for devc-remote** ([#149](https://github.com/vig-os/fd5/issues/149))
- Each preflight check now prints a success/warning/error status line as it completes
- New checks: container-already-running, runtime version, compose version, SSH agent forwarding
Expand Down
3 changes: 3 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[default.extend-words]
OME = "OME"
tre = "tre"
120 changes: 116 additions & 4 deletions docs/issues/issue-155.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
type: issue
state: open
created: 2026-02-26T01:04:00Z
updated: 2026-02-26T01:04:00Z
updated: 2026-02-26T10:09:09Z
author: gerchowl
author_url: https://github.com/gerchowl
url: https://github.com/vig-os/fd5/issues/155
comments: 0
comments: 3
labels: priority:high, area:testing, effort:medium, area:core
assignees: none
assignees: gerchowl
milestone: none
projects: none
relationship: none
synced: 2026-02-26T04:15:42.619Z
synced: 2026-02-27T04:11:40.452Z
---

# [Issue 155]: [[TEST] Cross-language conformance test suite for fd5 format](https://github.com/vig-os/fd5/issues/155)
Expand Down Expand Up @@ -86,3 +86,115 @@ This is a black-box test — it doesn't test internal APIs, only the format cont
- Depends on the format spec document (see prerequisite issue) for normative requirements
- Fixture files should be small (KBs, not MBs) to keep the repo lightweight
- Inspired by JSON Schema Test Suite: https://github.com/json-schema-org/JSON-Schema-Test-Suite
---

# [Comment #1]() by [gerchowl]()

_Posted on February 26, 2026 at 09:47 AM_

## Design

### Overview

A Python script (`tests/conformance/generate_fixtures.py`) will use the existing `fd5.create()` API and direct `h5py` calls to generate canonical fixture files and corresponding expected-result JSON files. A pytest-based conformance runner (`tests/conformance/test_conformance.py`) will validate that the Python implementation passes all cases. The suite is designed so any future language binding can load the same fixtures + JSON and assert equivalence.

### Architecture

```
tests/conformance/
├── README.md # How to use the suite
├── generate_fixtures.py # Script that creates all .fd5 + .json files
├── fixtures/ # Generated .fd5 files (gitignored, regenerated in CI)
├── expected/ # Expected-result JSON files (checked in)
├── invalid/ # Invalid .fd5 files + expected-errors.json
└── test_conformance.py # Pytest runner that validates fixtures vs expected
```

### Design Decisions

1. **Fixtures are generated, not checked in.** HDF5 is binary; checking in binaries is fragile and bloats the repo. Instead, `generate_fixtures.py` regenerates them deterministically. The expected JSON files ARE checked in since they define the contract. A conftest fixture runs the generator before tests.

2. **Use a test/conformance product schema.** Register a minimal `ConformanceSchema` via `register_schema()` in the generator and test module. This avoids coupling to imaging-specific schemas (recon) while exercising the full fd5 create/seal pipeline.

3. **Expected JSON format.** Each expected JSON file is a dict with keys matching the test categories from the issue: `root_attrs`, `datasets`, `groups`, `content_hash_prefix`, `verify`, plus fixture-specific keys like `provenance`, `metadata_tree`, etc.

4. **Test categories mapped to fixtures:** minimal.fd5 (structure), with-provenance.fd5 (provenance DAG), multiscale.fd5 (pyramid levels), tabular.fd5 (compound dataset), complex-metadata.fd5 (nested metadata), sealed.fd5 (hash verification).

5. **Invalid fixtures.** Created with direct h5py: missing-id.fd5, bad-hash.fd5, no-schema.fd5, with expected-errors.json.

6. **Multiscale fixture uses ReconSchema.** Only fixture needing a real product schema with pyramid support. All others use the simple conformance schema.

### Testing Strategy

The conformance tests ARE the tests. `test_conformance.py` covers structure, round-trip, hash verification, provenance, schema validation, and negative tests. No separate unit tests for the generator.

### Constraints

- Fixture files stay small (< 10 KB each)
- No new dependencies
- Generator uses only public fd5 API where possible, h5py directly for invalid fixtures

---

# [Comment #2]() by [gerchowl]()

_Posted on February 26, 2026 at 09:47 AM_

## Implementation Plan

Issue: #155
Branch: feature/155-cross-language-conformance-tests

### Tasks

- [ ] Task 1: Create conformance directory structure and README — `tests/conformance/README.md`, `tests/conformance/__init__.py` — verify: files exist
- [ ] Task 2: Write expected JSON files for valid fixtures — `tests/conformance/expected/minimal.json`, `with-provenance.json`, `multiscale.json`, `tabular.json`, `complex-metadata.json`, `sealed.json` — verify: valid JSON, all test categories covered
- [ ] Task 3: Write expected-errors JSON for invalid fixtures — `tests/conformance/invalid/expected-errors.json` — verify: valid JSON with error patterns for missing-id, bad-hash, no-schema
- [ ] Task 4: Write failing conformance tests for structure tests (minimal fixture) — `tests/conformance/test_conformance.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k structure -v` fails (no fixtures yet)
- [ ] Task 5: Write fixture generator for minimal.fd5 — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k structure -v` passes
- [ ] Task 6: Write failing tests for hash verification (sealed fixture) — `tests/conformance/test_conformance.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k hash -v` fails
- [ ] Task 7: Write fixture generator for sealed.fd5 — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k hash -v` passes
- [ ] Task 8: Write failing tests for provenance (with-provenance fixture) — `tests/conformance/test_conformance.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k provenance -v` fails
- [ ] Task 9: Write fixture generator for with-provenance.fd5 — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k provenance -v` passes
- [ ] Task 10: Write failing tests for multiscale fixture — `tests/conformance/test_conformance.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k multiscale -v` fails
- [ ] Task 11: Write fixture generator for multiscale.fd5 — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k multiscale -v` passes
- [ ] Task 12: Write failing tests for tabular and complex-metadata fixtures — `tests/conformance/test_conformance.py` — verify: fails
- [ ] Task 13: Write fixture generators for tabular.fd5 and complex-metadata.fd5 — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k "tabular or complex" -v` passes
- [ ] Task 14: Write failing tests for invalid/negative fixtures — `tests/conformance/test_conformance.py` — verify: fails
- [ ] Task 15: Write fixture generators for invalid files (missing-id, bad-hash, no-schema) — `tests/conformance/generate_fixtures.py` — verify: `uv run pytest tests/conformance/test_conformance.py -k invalid -v` passes
- [ ] Task 16: Wire conformance tests into full test suite and add .gitignore for fixtures/ — verify: `just test` passes including conformance

---

# [Comment #3]() by [gerchowl]()

_Posted on February 26, 2026 at 10:09 AM_

## Implementation Complete — PR #157

**PR**: https://github.com/vig-os/fd5/pull/157

### What was implemented

A cross-language conformance test suite for the `fd5` format, comprising:

**Fixture generator** (`tests/conformance/generate_fixtures.py`):
- Generates 6 valid `.fd5` fixture files: `minimal`, `sealed`, `with-provenance`, `multiscale`, `tabular`, `complex-metadata`
- Generates 3 invalid fixtures: `invalid-missing-id`, `invalid-bad-hash`, `invalid-no-schema`
- Uses a dedicated `_ConformanceSchema` to avoid polluting the global schema registry

**Expected results** (`tests/conformance/expected/`):
- JSON files defining expected structure, metadata, hash verification, and schema validation results for each fixture
- `invalid/expected-errors.json` for invalid fixture error expectations

**Conformance tests** (`tests/conformance/test_conformance.py`):
- 40 parameterized pytest tests across 6 categories: structure, metadata, content hash, verification, schema validation, and invalid file handling
- Session-scoped fixture generation with proper registry cleanup

**Documentation** (`tests/conformance/README.md`):
- Describes the suite's purpose, fixture inventory, JSON contract format, and how other language implementations can use the fixtures

### CI Note

CI failures are pre-existing across all repo branches (missing optional deps `pydicom`/`nibabel`/`pyarrow` in CI environment). See PR comment for details. All conformance tests pass locally.

66 changes: 66 additions & 0 deletions docs/issues/issue-156.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
type: issue
state: open
created: 2026-02-26T08:09:28Z
updated: 2026-02-26T08:09:45Z
author: gerchowl
author_url: https://github.com/gerchowl
url: https://github.com/vig-os/fd5/issues/156
comments: 0
labels: bug, area:workflow, effort:small, semver:patch
assignees: gerchowl
milestone: none
projects: none
relationship: none
synced: 2026-02-27T04:11:40.009Z
---

# [Issue 156]: [[BUG] devc-remote.sh compose commands run from repo root instead of .devcontainer/](https://github.com/vig-os/fd5/issues/156)

## Description

`scripts/devc-remote.sh` runs all `podman compose` / `docker compose` commands from `$REMOTE_PATH` (the repo root, e.g. `~/fd5`), but the compose files (`docker-compose.yml`, `docker-compose.project.yaml`, `docker-compose.local.yaml`) live in `$REMOTE_PATH/.devcontainer/`. The standalone `docker-compose` binary (used as podman's external compose provider) fails with "no configuration file provided: not found".

## Steps to Reproduce

1. Run `just devc-remote ksb-meatgrinder:~/fd5`
2. Pre-flight passes successfully
3. `remote_compose_up()` executes `cd ~/fd5 && podman compose up -d`
4. `docker-compose` (external provider) can't find any compose file in `~/fd5`

## Expected Behavior

Compose commands should `cd` into `$REMOTE_PATH/.devcontainer` where the compose files reside, so `podman compose up -d` succeeds.

## Actual Behavior

```
>>>> Executing external compose provider "/usr/local/bin/docker-compose". <<<<
no configuration file provided: not found
Error: executing /usr/local/bin/docker-compose up -d: exit status 1
```

## Environment

- **OS**: macOS 24.5.0 (host) → Linux (remote: ksb-meatgrinder)
- **Container Runtime**: Podman 4.9.3 (remote)
- **Compose**: docker-compose v5.1.0 (standalone, used as podman's external compose provider)

## Additional Context

All compose-related SSH commands in the script use `cd $REMOTE_PATH` instead of `cd $REMOTE_PATH/.devcontainer`:
- Line 218/220 (preflight container check)
- Line 351 (`compose_ps_json`)
- Line 383 (`check_existing_container` down)
- Line 409 (`remote_compose_up`)
- Line 411 (error hint message)

## Possible Solution

Change all `cd $REMOTE_PATH` to `cd $REMOTE_PATH/.devcontainer` in compose-related commands.

## Changelog Category

Fixed

- [ ] TDD compliance (see .cursor/rules/tdd.mdc)
58 changes: 58 additions & 0 deletions docs/issues/issue-158.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---
type: issue
state: open
created: 2026-02-26T10:44:02Z
updated: 2026-02-26T10:44:28Z
author: gerchowl
author_url: https://github.com/gerchowl
url: https://github.com/vig-os/fd5/issues/158
comments: 0
labels: chore, area:workflow, effort:medium
assignees: gerchowl
milestone: none
projects: none
relationship: none
synced: 2026-02-27T04:11:39.605Z
---

# [Issue 158]: [[CHORE] Add opt-in Tailscale SSH to devcontainer](https://github.com/vig-os/fd5/issues/158)

### Chore Type

Configuration change

### Description

Add opt-in Tailscale SSH support to the devcontainer so developers can connect via direct mesh SSH instead of the devcontainer protocol. This is a workaround for Cursor GUI's inability to execute agent shell commands when connected via the devcontainer protocol.

When `TAILSCALE_AUTHKEY` is set (via `docker-compose.local.yaml`), the devcontainer installs Tailscale on first create and connects to the tailnet on every start with SSH enabled. When the env var is unset, the scripts are a no-op — zero impact on normal usage.

### Acceptance Criteria

- [ ] New `setup-tailscale.sh` script with `install` and `start` subcommands
- [ ] `post-create.sh` calls `setup-tailscale.sh install` (no-op without `TAILSCALE_AUTHKEY`)
- [ ] `post-start.sh` calls `setup-tailscale.sh start` (no-op without `TAILSCALE_AUTHKEY`)
- [ ] `.devcontainer/README.md` updated with quick-start instructions
- [ ] Detailed design doc at `docs/tailscale-devcontainer.md` covering architecture decisions, user setup, known gaps, and upstream considerations
- [ ] `uv.lock` updated (incidental dependency sync)

### Implementation Notes

Files changed:
- **New:** `.devcontainer/scripts/setup-tailscale.sh` — single script, two subcommands (`install` / `start`), idempotent, uses userspace networking (`--tun=userspace-networking`)
- **Modified:** `.devcontainer/scripts/post-create.sh` — hooks `setup-tailscale.sh install`
- **Modified:** `.devcontainer/scripts/post-start.sh` — adds `SCRIPT_DIR` resolution, hooks `setup-tailscale.sh start`
- **Modified:** `.devcontainer/README.md` — new "Tailscale SSH" section
- **New:** `docs/tailscale-devcontainer.md` — full design doc with architecture table, setup guide, known gap (git signing), and upstream notes

### Related Issues

None

### Priority

Medium

### Changelog Category

Added
22 changes: 19 additions & 3 deletions docs/pull-requests/pr-153.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
---
type: pull_request
state: open
state: closed (merged)
branch: feature/149-preflight-feedback → dev
created: 2026-02-26T00:26:40Z
updated: 2026-02-26T00:26:42Z
updated: 2026-02-26T08:03:42Z
author: gerchowl
author_url: https://github.com/gerchowl
url: https://github.com/vig-os/fd5/pull/153
Expand All @@ -13,7 +13,8 @@ assignees: gerchowl
milestone: none
projects: none
relationship: none
synced: 2026-02-26T04:16:02.459Z
merged: 2026-02-26T08:03:42Z
synced: 2026-02-27T04:11:44.195Z
---

# [PR 153](https://github.com/vig-os/fd5/pull/153) feat(devc-remote): add --yes flag, container prompt, and SSH agent improvements (#149)
Expand Down Expand Up @@ -92,3 +93,18 @@ This is a follow-up to PR #151 which implemented the initial preflight feedback

Refs: #149



---
---

## Commits

### Commit 1: [0521e3f](https://github.com/vig-os/fd5/commit/0521e3fffbd6ca00a30c989d223b6ab04c0a9e46) by [gerchowl](https://github.com/gerchowl) on February 26, 2026 at 12:22 AM
test: add failing tests for --yes flag, path annotation, container prompt, SSH agent check, 231 files modified (tests/test_devc_remote_preflight.sh)

### Commit 2: [0096477](https://github.com/vig-os/fd5/commit/0096477d415470872789df638c7f537ae6342c26) by [gerchowl](https://github.com/gerchowl) on February 26, 2026 at 12:24 AM
feat(devc-remote): add --yes flag, path annotations, container prompt, improved SSH agent check, 139 files modified (scripts/devc-remote.sh, tests/test_devc_remote_preflight.sh)

### Commit 3: [7f636ac](https://github.com/vig-os/fd5/commit/7f636ac2e061a5cb4217c8da62dd7a0fbd3178b7) by [gerchowl](https://github.com/gerchowl) on February 26, 2026 at 12:25 AM
docs: update changelog for preflight feedback improvements, 4 files modified (CHANGELOG.md)
Loading
Loading