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
11 changes: 10 additions & 1 deletion .agent-plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,19 @@ _Source: `docs/external_review/summaries/v1_release_review_synthesis.md` — cro
- Labels: `type: docs`, `layer: render`
- Size: S (~200 lines across 4 notebooks)

- [x] **SMF-PR5 / PR 8.4a** — `test(scripts): canonical platform metadata lint gate`
- **Add canonical metadata diff/lint step** (HIGH): `scripts/lint_platform_metadata.py` loads the real publication artifacts (`release/kaggle/dataset-metadata.json` + `release/huggingface/README.md`) and fails on Kaggle privacy, license, task, exact platform tag vocabularies, HF split-path/set, Kaggle resource coverage, or task-split schema drift.
- **Offline review bundle guard** (HIGH): lint requires root agent-reviewable artifacts plus per-tier `lead_scoring.csv`, `feature_dictionary.csv`, `dataset_card.md`, `metrics.json`, `manifest.json`, task splits, and snapshot-safe relational tables to be represented in the canonical Kaggle resources list. The resource contract now reuses packaging constants for tiers/tables/root docs instead of shadowing the packager.
- **File-backed schema check**: when tier CSV/parquet files are materialized, lint compares metadata schema declarations to actual CSV headers and parquet Arrow schemas; `--strict-files` turns missing bundle files into release-readiness failures.
- **CI integration**: `release-artifacts-sync` now runs `python scripts/lint_platform_metadata.py` after docs/metrics/claims sync checks, so preview/publish metadata drift blocks PRs.
- **Focused tests**: `tests/scripts/test_lint_platform_metadata.py` covers the clean path and injected failures for private Kaggle metadata, license/task/tag drift, HF split paths absent from Kaggle resources, schema mismatch, and missing per-tier review artifacts.
- Labels: `type: test`, `layer: validation`, `layer: render`
- Size: S (~450 lines, mostly tests)

- [ ] **PR 8.4** — `feat(scripts): integration script + preview hardening`
- **Regenerate lockfile + bump to v1.0.1** (HIGH): delete `package-lock.json`, update `package.json` pin to `github:ShmuggingFace/ShmuggingFaceCore#v1.0.1`, regenerate via HTTPS. Fixes SSH lockfile and gets the socks/laundry copy fix in one step.
- **Remove fabricated Kaggle usability scores and medals** (HIGH): delete `TIER_USABILITY`, `TIER_MEDAL` constants from `build_shmuggingface_site.py`. These are dead config today (the framework ignores them) but latent misinformation.
- **Make build script read and diff against canonical metadata files** (HIGH): load `release/kaggle/dataset-metadata.json` and `release/huggingface/README.md` in the build script; compare `isPrivate`, tags, license, task, and split counts against the generated config; exit non-zero on mismatch. Structural gap that made `isPrivate: true` invisible in the preview.
- **Remaining preview-generator cleanup** (HIGH): `build_shmuggingface_site.py` no longer exists on `main`; if a ShmuggingFaceCore build path is reintroduced, it must consume or validate against the canonical lint gate from SMF-PR5 rather than hard-code task, tags, license, splits, or schema.
- **Raise on missing/malformed manifest+metrics fields** (MEDIUM): replace `manifest.get("n_leads", 5000)` etc. with explicit key lookups that raise clear errors. For a tool whose job is faithful preview, silent defaults produce plausible-but-false pages.
- **Use per-tier `dataset_card.md` as each tier's page body** (MEDIUM): currently all three tier pages show the same global README. One-line change per tier in the config builder.
- **Pin `wrangler` as devDependency + default to preview branch** (MEDIUM): add `wrangler` to `package.json` devDependencies; change `--branch main` to `--branch preview` as the default; add a `--production` flag for intentional production deploys. Prevents clobbering production on every local run.
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
run: python scripts/build_claims_register.py --check
- name: every claim in claims_register_source.yaml resolves & values match
run: python scripts/verify_claims_register.py
- name: Kaggle and Hugging Face metadata agree with release preview contract
run: python scripts/lint_platform_metadata.py

validate-dataset:
name: Validate lead scoring dataset
Expand Down
13 changes: 13 additions & 0 deletions scripts/_release_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,3 +363,16 @@ def load_relational_column_descriptions(release_dir: Path) -> dict[tuple[str, st
#: (DGP description, leakage / acceptance bands, break-me guide, etc.).
#: Copied wholesale into the upload tree when present.
AGENT_REVIEWABLE_DOCS_DIR: Final[str] = "docs"

#: Required vendored-doc files that should be represented in the
#: canonical platform metadata. This is separate from the directory
#: copy contract above: packagers copy the whole docs subtree, while
#: metadata lint requires these high-value review files to be visible
#: in the platform file list.
AGENT_REVIEWABLE_DOC_FILES: Final[tuple[str, ...]] = (
"README.md",
"feature_dictionary.md",
"generation_method.md",
"break_me_guide.md",
"relational_table_schemas.csv",
)
Loading
Loading