Skip to content

Improve Calibration dashboard fixture demo - #39

Merged
snissn merged 1 commit into
mainfrom
demo-fixture-admin-files-ux
Jul 2, 2026
Merged

Improve Calibration dashboard fixture demo#39
snissn merged 1 commit into
mainfrom
demo-fixture-admin-files-ux

Conversation

@snissn

@snissn snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member

Summary

  • add an idempotent Calibration registry fixture seeder for dense admin demo data
  • document the seeded fixture boundary and committed live dashboard evidence
  • improve the Worker admin Files table so object IDs expand row details and zero receipt/coordinator values render as lifecycle states instead of meaningful hashes
  • keep the live dashboard default at 10 rows to stay within Worker subrequest limits after fixture seeding

Scope Boundary

This PR is demo/admin-dashboard support only. The fixture rows are synthetic registry-only rows for read-only dashboard density and do not claim real FOC provider storage. Object 1 remains the provider-backed evidence object documented in docs/calibration-worker-demo.md.

Live Worker already deployed for manual verification:

Validation

  • node --check scripts/seed-calibration-registry-fixtures.mjs
  • node --check src/worker/calibration-demo.mjs
  • node --test test/calibration-worker.test.mjs
  • pnpm lint
  • pnpm ops:validate
  • pnpm ops:smoke -- --iterations 3
  • pnpm test
  • pnpm worker:dry-run
  • git diff --check

Live Evidence

  • Fixture summary: artifacts/calibration/fixture-seed-summary.json
  • Durable fixture seed: 2026-07-demo-grid-durable, requestExpiresAt=4102444800 (2100-01-01 UTC)
  • Live registry counts after durable seeding: objectCount=97, accountCount=49, datasetRecordCount=17, coordinatorCount=1, relayerCount=1
  • Direct-read verification: fixture object IDs 50..97, 8 committed, 8 uploading, 32 requested, no missing rows, no expiry mismatches
  • Live /admin HTML includes renderFileRows, data-object-id, Pending receipt, and Not assigned

Caveats

  • Status filtering remains page-scoped because the dashboard reads direct registry pages rather than running a backend index scan. Use pagination to reach older committed fixture rows.

Copilot AI review requested due to automatic review settings July 2, 2026 08:02
@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a66a43f64f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/worker/calibration-demo.mjs Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves the Calibration Worker admin dashboard demo by adding a deterministic on-chain fixture seeder for dense registry demo data, updating the dashboard UI to support expandable file-row details and clearer “pending/missing” lifecycle states, and documenting the fixture/evidence boundary.

Changes:

  • Add scripts/seed-calibration-registry-fixtures.mjs plus a pnpm demo:seed-calibration-fixtures script to idempotently seed synthetic registry-only rows and write a public seed summary artifact.
  • Update the admin Files table rendering to use clickable object IDs that expand per-row details, and render zero receipt/coordinator values as pending/missing states; lower the default dashboard page size to 10.
  • Extend docs and tests to capture the new dashboard HTML surface and document seeded fixture counts + boundary.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/calibration-worker.test.mjs Adds assertions for the new dashboard HTML functions/markers (file-row renderer, expand controls, pending state strings).
src/worker/calibration-demo.mjs Lowers default page limit to 10; adds expandable file rows and lifecycle-state rendering for zero values; adds detail-row markup.
scripts/seed-calibration-registry-fixtures.mjs New idempotent Calibration registry fixture seeder producing deterministic synthetic rows + public summary JSON.
package.json Adds demo:seed-calibration-fixtures script entry.
docs/calibration-worker-demo.md Documents fixture seeding workflow, fixture/evidence boundary, and updated live evidence metadata.
artifacts/calibration/fixture-seed-summary.json Commits a public snapshot of a live fixture-seed run (counts + tx hashes).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/worker/calibration-demo.mjs Outdated
Comment thread docs/calibration-worker-demo.md Outdated
@snissn
snissn force-pushed the demo-fixture-admin-files-ux branch from a66a43f to 49de5f7 Compare July 2, 2026 08:09
@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@copilot review

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@copilot review

Both issues from the previous review are already addressed in the current commit:

  1. Copy receipt fields: The receipt item rendering at lines 1447–1453 uses receipt.providerId, receipt.datasetId, receipt.pieceId, receipt.addPieceTxHash, receipt.retrievalUrlHash, and receipt.isNewDataSet — exactly the fields returned by formatCopyReceipt. No stale pieceCid/receiptHash references remain in the copy-receipt block.

  2. Shell-agnostic docs: Line 188 of docs/calibration-worker-demo.md reads # Export PRIVATE_KEY or PLATFORM_ROOT_PRIVATE_KEY in the current shell first. — no source ~/.zshrc.

No further changes needed.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 49de5f7d26

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread scripts/seed-calibration-registry-fixtures.mjs Outdated
Copilot finished work on behalf of snissn July 2, 2026 08:16
@snissn
snissn force-pushed the demo-fixture-admin-files-ux branch from 49de5f7 to 6013839 Compare July 2, 2026 09:19
@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@codex review

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@copilot review

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

Copilot AI commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

@copilot review

No new issues found. The two previously flagged items are resolved:

  • Copy receipt rows use the correct formatCopyReceipt fields (providerId, datasetId, pieceId, addPieceTxHash, retrievalUrlHash, isNewDataSet).
  • The fixture seeding docs snippet is shell-agnostic.

The remaining changes (expandable row details, lifecycle-state cells for zero hashes, default page limit of 10, idempotent fixture seeder) look correct. pnpm lint passes. Test failures in the sandbox are pre-existing viem module-not-found errors unrelated to this PR.

Copilot finished work on behalf of snissn July 2, 2026 09:21

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 601383993c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +120 to +124
await assertOwner({ publicClient, config });
await ensureCoordinator({ publicClient, walletClient, config, stdout, txHashes });
await ensureRelayer({ publicClient, walletClient, config, stdout, txHashes });

const beforeCounts = await readCounts({ publicClient, config });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Capture counts before role mutations

When the signer is not already allowlisted, ensureCoordinator/ensureRelayer submit transactions before beforeCounts is read, so the public summary's counts.before.coordinatorCount or relayerCount already includes mutations from this run. That makes the committed evidence misleading for fresh registries or rotated signers; read beforeCounts before any maybeSend role setup or label these counts as post-role-setup.

Useful? React with 👍 / 👎.

return Number(object.status ?? object[14]);
}

function summarizeObservedFixtures(rowStates, config) {

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3 Badge Emit object ID ranges from generated summaries

The committed fixture summary and docs use observedFixtures.objectIds.first/last to substantiate the seeded span (50-97), but this generator never computes that field. Any operator rerunning the documented seeder will overwrite artifacts/calibration/fixture-seed-summary.json without the object range, removing the evidence for the claimed fixture span.

Useful? React with 👍 / 👎.

@snissn

snissn commented Jul 2, 2026

Copy link
Copy Markdown
Member Author

Merge readiness summary for latest head 601383993cebcb9fb85e72300892e061c9f7db05:

  • CI: latest-head GitHub Actions test passed.
  • Local validation: node --check scripts/seed-calibration-registry-fixtures.mjs; node --check src/worker/calibration-demo.mjs; git diff --check; node --test test/calibration-worker.test.mjs; pnpm lint; pnpm ops:validate; pnpm ops:smoke -- --iterations 3; pnpm test; pnpm worker:dry-run.
  • Review threads: all Codex/Copilot threads are resolved, including copy-receipt fields, shell-agnostic fixture docs, and durable fixture expiry.
  • Copilot: latest requested review found no new issues on this shape.
  • Codex: latest-head review was requested and acknowledged; no new unresolved findings surfaced after the final durable-expiry fix.
  • CodeRabbit: latest-head review was requested; no response surfaced before merge.
  • Caveat: fixture rows are synthetic registry-only data for the read-only admin demo. Provider-backed evidence remains object 1 as documented.

Merging under explicit user authorization after latest-head CI, local validation, and resolved review threads.

@snissn
snissn merged commit 79b64c2 into main Jul 2, 2026
2 checks passed
@snissn
snissn deleted the demo-fixture-admin-files-ux branch July 2, 2026 09:26
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.

3 participants