Skip to content

docs: admin console guide and generated config reference - #1502

Merged
tt-cll merged 2 commits into
mainfrom
tt/admin-3
Oct 8, 2026
Merged

tt-cll merged 2 commits into
mainfrom
tt/admin-3

Conversation

@tt-cll

@tt-cll tt-cll commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Top of a 3-PR stack splitting #1471 (base: #1501):

  • docs/verifier/admin-console.md — rewritten for the in-process, single-verifier model (no ccv admin serve, no console DB, no read-only mode).
  • Registers the tools/configdoc target for the admin console config, so docs/config/admin-console/config.documented.toml is generated like every other app (removes the hand-written exception from docs/config/README.md).
  • docs/verifier/admin-console-demo/ — one-command disposable demo, reworked for the in-process model: a small harness (main.go) serves the real admin package over a seeded disposable Postgres, with a canned aggregator results client injected via admin.Deps.ResultsDialer. Verified end-to-end (search, gated reschedule, recovery preview, action log).
  • Runbook and CLI README references updated to the single-verifier console.
  • Changelog for the feature.

Stack: #1500 → #1501 → this PR.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 Changes recommended

The demo has unsafe cleanup behavior and broken or misleading operator documentation.

11 open findings
What changed in this PR

Adds operator documentation, generated configuration references, and a disposable demo for the in-process verifier admin console.

Changes:

  • Documents console setup, safety, recovery, and runbook workflows.
  • Registers generated admin-console configuration documentation.
  • Adds a seeded Postgres demo with a canned aggregator client.
File Description
.gitignore Ignores demo runtime artifacts.
changelog/​2026-09-23_admin_console.md Records the admin-console feature.
cli/​recovery/​README.md Links recovery CLI users to the console.
docs/​config/​README.md Lists the console config reference.
docs/​config/​admin-console/​config.documented.toml Provides generated config documentation.
docs/​runbooks/​remediating-stuck-or-dropped-messages.md Makes the console the primary recovery path.
docs/​verifier/​admin-console.md Adds the operator guide.
docs/​verifier/​admin-console-demo/​README.md Documents the demo walkthrough.
docs/​verifier/​admin-console-demo/​demo-config.toml Configures the demo console.
docs/​verifier/​admin-console-demo/​demo.sh Starts and tears down the demo.
docs/​verifier/​admin-console-demo/​main.go Implements the demo harness.
docs/​verifier/​admin-console-demo/​seed-verifier.sql Seeds representative verifier data.
tools/​configdoc/​registry/​registry.go Registers console config generation.
verifier/​pkg/​admin/​doccomments_gen.go Supplies generated field documentation.
Files not reviewed (1)
  • verifier/pkg/admin/doccomments_gen.go: Generated file

🧠 Review effort: Balanced


💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +35 to +36
pid="$(cat "$pidfile")"
if kill "$pid" 2>/dev/null; then

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — stop() now signals a PID only while ps -p <pid> still reports this demo's console-demo process, waits for it to exit before removing the PID file, and only then re-checks the port (the next start re-runs port_free as before).

start() {
command -v docker >/dev/null || die "docker is required"
docker info >/dev/null 2>&1 || die "docker daemon is not running"
command -v nc >/dev/null || die "nc is required (port checks)"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — command -v curl is checked with the other prerequisites and fails fast with the actual missing-binary error.

Comment on lines +58 to +61
docker run -d --name "$CONTAINER" \
-e POSTGRES_USER="$PG_USER" -e POSTGRES_PASSWORD="$PG_PASSWORD" \
-e POSTGRES_DB="$VERIFIER_DB" \
-p 127.0.0.1:"$PG_PORT":5432 postgres:15-alpine >/dev/null

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — start() installs an EXIT trap that calls stop on any non-zero exit during startup (a successful start keeps everything running). Verified: a deliberately failing seed exits non-zero and leaves no container or harness behind.

Comment thread docs/verifier/admin-console-demo/README.md Outdated
![Demo walkthrough: search for a failed message, inspect its detail page, pass the
reschedule attestation preview, execute, and see it in the action log](demo.gif)

Prerequisites: Docker (running), Go, nc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done — curl is listed in the quick-start prerequisites.

Comment on lines +2 to +7
# One-command demo of the CCV admin console. See README.md for the walkthrough.
#
# start (default) : disposable Postgres, seeded demo data, and the console harness
# (the real admin package, served in-process) on http://127.0.0.1:8105
# stop : stop the console harness, remove the container
# clean : stop and also delete .runtime/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Condensed to three lines (shebang aside).

Comment on lines +1 to +5
// Command admin-console-demo is the harness for the admin console demo (see README.md
// in this directory): it serves the real admin console (verifier/pkg/admin) over a
// seeded disposable database, the same way the verifier factory serves it in-process.
// A canned aggregator results client stands in for the aggregator's attestation read
// API so the reschedule gate can be shown without real infrastructure.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Condensed to three lines.

Comment on lines +1 to +7
-- Demo data for the verifier database. demo.sh runs this after the console harness
-- has started (it applies the verifier migrations, action-log table included, at
-- startup).
-- Message IDs are 8x8 repeats so they are easy to read out and type into search:
-- 0xdeadbeef x8 -> attested (the harness's canned aggregator holds ccv data)
-- 0xcafebabe x8 -> not attested (executable reschedule target; has drop evidence)
-- 0x0badf00d x8 -> retry window expired (detail page shows the expiry state)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Condensed to three lines; the per-chain legend below it was already short and stays.

Comment on lines +61 to +66
-- Failed archive rows the search and reschedule flows read. Categories are derived
-- at read time from these values (see verifier/pkg/jobqueue/archivecategory):
-- policy hook rejected... -> policy_rejected
-- source chain selector... not configured -> validation_error
-- storage-writer table -> storage_failure
-- completed_at >= retry_deadline -> retry_window_expired

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Condensed to three lines.

Comment thread docs/verifier/admin-console.md Outdated
Comment on lines +95 to +97
`check-config` runs the same loading and validation as startup and prints the listen
address and access mode. Run it after every config change — it catches misspelled keys
and malformed files before the verifier does it at startup.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done in the wiring PR (#1501): check-config now receives the CLI-loaded verifier secrets and runs the same BasicAuthFromSecrets + ValidateAccessPolicy validation as console startup; this PR updates the guide's pre-flight section to match.

@tt-cll
tt-cll added this pull request to the merge queue Oct 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue because a pull request earlier in the stack was removed Oct 8, 2026
@tt-cll
tt-cll added this pull request to the merge queue Oct 8, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 8, 2026
Base automatically changed from tt/admin-2 to main October 8, 2026 17:02
@github-actions

github-actions Bot commented Oct 8, 2026

Copy link
Copy Markdown

Code coverage report:

Package main tt/admin-3 Diff
github.com/smartcontractkit/chainlink-ccv/aggregator 46.28% 46.28% +0.00%
github.com/smartcontractkit/chainlink-ccv/bootstrap 65.67% 65.67% +0.00%
github.com/smartcontractkit/chainlink-ccv/cli 53.78% 53.78% +0.00%
github.com/smartcontractkit/chainlink-ccv/cmd 39.79% 39.79% +0.00%
github.com/smartcontractkit/chainlink-ccv/common 46.09% 46.09% +0.00%
github.com/smartcontractkit/chainlink-ccv/docs 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/executor 42.14% 42.14% +0.00%
github.com/smartcontractkit/chainlink-ccv/indexer 34.40% 34.36% -0.04%
github.com/smartcontractkit/chainlink-ccv/integration 61.81% 61.81% +0.00%
github.com/smartcontractkit/chainlink-ccv/internal 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/migration 78.70% 78.70% +0.00%
github.com/smartcontractkit/chainlink-ccv/pkg 84.62% 84.62% +0.00%
github.com/smartcontractkit/chainlink-ccv/pricer 0.00% 0.00% +0.00%
github.com/smartcontractkit/chainlink-ccv/protocol 66.31% 66.31% +0.00%
github.com/smartcontractkit/chainlink-ccv/tools 35.47% 39.64% +4.17%
github.com/smartcontractkit/chainlink-ccv/verifier 40.06% 39.99% -0.07%
Total 45.50% 45.40% -0.10%

Files added (in tt/admin-3):

  • github.com/smartcontractkit/chainlink-ccv/docs/verifier/admin-console-demo/main.go
  • github.com/smartcontractkit/chainlink-ccv/verifier/pkg/admin/doccomments_gen.go

@tt-cll
tt-cll added this pull request to the merge queue Oct 8, 2026
Merged via the queue into main with commit 460c63b Oct 8, 2026
49 checks passed
@tt-cll
tt-cll deleted the tt/admin-3 branch October 8, 2026 17:57
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.

4 participants