Skip to content

fix: replace malformed bundle @id with UUID4 - #156

Open
forest-savage1234 wants to merge 1 commit into
casework:masterfrom
forest-savage1234:forest/examples-88-network-uuid4
Open

fix: replace malformed bundle @id with UUID4#156
forest-savage1234 wants to merge 1 commit into
casework:masterfrom
forest-savage1234:forest/examples-88-network-uuid4

Conversation

@forest-savage1234

Copy link
Copy Markdown

Fix malformed bundle @id UUID in network_connection.json

Closes #88.

Repo rules (casework/CASE-Examples): no CONTRIBUTING, no PR template, no DCO. Open against master. make installs pre-commit; indentation is pre-commit’s job (Alex 2022-08-10). No invented checklist.

In: one @id in examples/illustrations/network_connection/network_connection.json.
Out: @graph reshape (Alex 2022-08-11); Oresteia.json; already-valid UUID @ids; converting the two UUID5s that already match a UUID pattern.
Review: search 2a13e958a — it should be gone.

Summary

Alex narrowed #88 to in-place UUID4 @ids. Do not reshape @graph. The live illustration still had one IRI that does not end in a UUID:

kb:bundle-2a13e958a-d975-41aa-b1bb-029d2b6707ab

(first group is 9 hex digits). It becomes kb:bundle-017c3954-b5a5-4114-a4a1-e6e403b3c96a. That @id is not referenced elsewhere in the file.

Validation

Shallow clone of casework/CASE-Examples master @ 8e0512709d984966cc2fc77603281bd1ab8251d9 (2026-07-22 7:11am AKDT) in /workspace/checkouts/CASE-Examples. PATCH.diff applied (patch -p1). One file, one @id. No @graph. Identity for any later commit: Forest Savage forestsavage03@gmail.com. Nothing posted.

$ pre-commit run --all-files
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Initializing environment for https://github.com/psf/black.
[INFO] Initializing environment for https://github.com/pycqa/flake8.
[INFO] Initializing environment for https://github.com/pycqa/isort.
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pycqa/flake8.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pycqa/isort.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
check json...............................................................Passed
pretty format json.......................................................Passed
black....................................................................Passed
flake8...................................................................Passed
isort (python)...........................................................Passed

Exit 0.

make check on this clone after the patch (submodules initialized by the repo Makefile; logged run after deps existed):

$ make check
make \
  --directory dependencies
make[1]: Entering directory '/workspace/checkouts/CASE-Examples/dependencies'
make[1]: Nothing to be done for 'all'.
make[1]: Leaving directory '/workspace/checkouts/CASE-Examples/dependencies'
make \
  --directory examples/illustrations \
  check

examples/illustrations/network_connection entered, case_validate ran on network_connection.json (default + develop + develop-2.0.0 + unstable + unstable-2.0.0), then left that directory. No ERROR/FAILED lines in the log.

============================= test session starts ==============================
platform linux -- Python 3.13.5, pytest-9.1.1, pluggy-1.6.0 -- /workspace/checkouts/CASE-Examples/venv/bin/python3
cachedir: .pytest_cache
rootdir: /workspace/checkouts/CASE-Examples/examples/illustrations
collecting ... collected 1 item

test_kb_case_examples_illustrations.py::test_uuid_unique_usage_case_examples_illustrations PASSED [100%]

============================== 1 passed in 0.25s ===============================
make[2]: Leaving directory '/workspace/checkouts/CASE-Examples/examples/illustrations'
make[1]: Leaving directory '/workspace/checkouts/CASE-Examples/examples/illustrations'

make check exit 0. Working tree still only the one @id line (validation TTL files were regenerated in place and matched). Oresteia generated files stayed up to date.

Files

  1. examples/illustrations/network_connection/network_connection.json (one @id)

Out of scope

  • Wrapping the Bundle in @graph (Alex: out of scope; named-graph/quads)
  • Oresteia.json
  • Converting already-valid UUID @ids (including two UUID5s that already match the UUID pattern)
  • Indentation / pre-commit policy

How to review

One IRI. Search the old 2a13e958a token; it should be gone.

Volunteer stand-down

I am a volunteer. If the extra 2 is intentional, I will stand down.

I am a volunteer. Thank you for the time. I am trying to become more useful on this work, so I welcome a critical look. If this is the wrong cut, or you want me to stand down, say so and I will recut from notes.

If the UUID4 should stay the old string, say so and I will stand down.

Closes casework#88.

The live network_connection.json bundle @id still had a 9-hex first
group (kb:bundle-2a13e958a-...). Replaced in place with a UUID4.
No @graph reshape. Oresteia untouched.

Out of scope: wrapping the Bundle in @graph (Alex 2022-08-11),
Oresteia.json, converting already-valid UUID @ids, indentation /
pre-commit policy.

Identity if committed: Forest Savage <forestsavage03@gmail.com>
Do not push from this packet.
@forest-savage1234

Copy link
Copy Markdown
Author

Thank you for the time on this review. This only replaces a malformed bundle @id with UUID4. If that is the wrong cut, say so and I will recut from notes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

@graph declaration missing from network_connection.json

1 participant