Repository navigation
Conversation
…ensors, properties, deployments Stage the workshop sensor and device registry (Appendix A) as data and map it onto W3C SOSA/SSN: which project deploys which sensor, what it observes, and on whose subjects. - kg/sosa/workshop_sensor_registry.csv: 51 table rows -> 60 (device, award) rows, each award resolved to a grant with how it was matched (grant_match), model provenance (model_status), and whether a presenter spoke to it. PIs named; students/postdocs as role + lab (public repo, anon-only export). - observable_properties.csv: 52-key vocabulary aligned to DeviceCategory measures. - build_sosa.py: CSVs + committed export -> workshop_sensors.sosa.ttl (1,818 triples; 25 deployments, 15 platforms, 97 sensors, 2 actuators). Resolves grants and devices by key at build time; 33 rows link to existing Device nodes. - sosa.shapes.ttl: 9 shapes with RED/GREEN fixtures; --check gates them and the built layer. - kg.yml runs the check; kg/README.md gains the SOSA row; kg/sosa/README.md holds the S0-S5 plan (schema, DB tables, exporter, observations from datasets, PI confirmation). Staging only: nothing renders from these CSVs (Principle XI); S2 moves them into Supabase. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014VR8fVc4t6stw4vYKkhSDp
Contributor
🤖 Triage: Class C →
|
Contributor
🛑 Class C — this touches a danger layerPer the constitution (Development Workflow) danger-layer changes are spec-driven. Before this can merge, a maintainer must:
This gate is here because a small-looking diff to |
…base Unstructured sources (workshop notes, decks, transcripts) now enter the database instead of being read by the graph from a checked-in file: raw document -> ingestion_sources -> ingestion_records (payload per ingest/kinds/<kind>.schema.json, review flags, status) -> promote_ingestion_record() -> domain tables -> export() - Migration 20261006120000_data_ingestion: generic intake tables + promote functions, and the first record kind's domain tables (observable_properties, sensor_deployments, _devices, _properties, curator-only _presenters). SOSA invariants S-4/S-8 enforced as CHECKs; audit trigger on every table; ingestion_records excluded from cell provenance (intake state). Anon reads the domain tables, never payloads or names. - Migration 20261006120100 (generated by ingest/to_sql.py): 53-key vocabulary, the Appendix A source, 60 records with review flags, then promotion. Both tested on a scratch Postgres 16 with stubs: 60 deployments, idempotent re-runs, each CHECK/trigger/permission refuses as intended. - Exporter: section 4 of export() reads those tables via kg/sosa_layer.emit_sosa(); a no-op until the migration is applied. - kg/sosa/build_sosa.py now runs the real exporter over simulated tables (the staged records promoted as the SQL function does), so there is one implementation. Output is identical to the previous build except workshop_row -> source_locator. - Staged data moved to ingest/ (sources/, vocab/, kinds/); kg/sosa CSVs removed. - CI: ingest/to_sql.py --check (records valid, seed current) and the SOSA check; the kg job also runs for ingest/ and the ingestion migrations. Not applied: migrations are run by hand in the SQL editor. Presenter names are deliberately not in the repo. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014VR8fVc4t6stw4vYKkhSDp
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Unstructured material (workshop notes, slide decks, transcripts) now enters Supabase through a data ingestion layer, and the KG is built from the resulting rows rather than from a checked-in file. The first source is the workshop's Appendix A sensor and device registry. The exporter turns it into W3C SOSA/SSN: which project deploys which sensor, what that sensor observes, and on whose subjects (Janowicz et al. 2018).
ingestion_recordsholds one payload per record, validated againstingest/kinds/<kind>.schema.json, along with its review flags and status.Docs:
ingest/README.md: the ingestion architecturekg/sosa/README.md: the SOSA mapping and the remaining phasesChanges
Migration
20261006120000_data_ingestion.sqlingestion_sourcesandingestion_records.promote_ingestion_record()andpromote_ingestion_source(). Both are idempotent, and anything the promoter can't resolve becomes a review flag instead of a guess.sensor_deployment:observable_propertiessensor_deploymentssensor_deployment_devicessensor_deployment_propertiessensor_deployment_presenters(curator-only)unresolvedif and only if it has nogrant_idverify_noteingestion_recordsis excluded from cell provenance because it is intake state.Migration
…120100_ingest_workshop_appendix_a.sqlingest/to_sql.py.Exporter
export()section 4 reads the new tables throughkg/sosa_layer.emit_sosa().kg/sosa/build_sosa.pyworkshop_rowtosource_locator.CI
ingest/to_sql.py --check(records are valid and the seed is current) and the SOSA shapes check.kgjob now also runs for changes underingest/and to the ingestion migrations.Verified
1R34…) resolves to its grant. Re-running the schema and seed files is idempotent.ingestion_recordsandsensor_deployment_presenters.ingest/to_sql.py --checkgoes RED on a stale seed and on a no-presenter record that has noverify_note.kg/ci_check.pypasses, with the baseline unchanged.npm run test:guards: 44/44 pass.tscwas not run: there are no TypeScript changes andnode_modulesis not installed in this environment.Not done here
kg/export/bbqs.ttland move the SOSA shapes intokg/shapes/.kg/sosa/README.md.ingest-document) and a review screen are the next steps; seeingest/README.md.🤖 Generated with Claude Code
https://claude.ai/code/session_014VR8fVc4t6stw4vYKkhSDp