Repository navigation
feat(platform): add read-only deployment diagnostics page - #1186
Open
linus-liu-web wants to merge 1 commit into
Open
linus-liu-web wants to merge 1 commit into
linus-liu-web wants to merge 1 commit into
Conversation
This was referenced Nov 21, 2026
Operators had to run docker exec and query information_schema to notice deployment problems: an artifact over TEXT's 65,535-byte limit fails the run write with MySQL error 1406 and leaves the node running (Tencent#1092), a missing generated column surfaces as a raw "Unknown column" error (Tencent#201), and the Agent browser sidecar image is only discovered on first use (Tencent#1160). Add 平台管理 → 运维诊断 backed by GET /api/platform/diagnostics (admin only): - database connectivity and MySQL version; - run_telemetry.adapter / run_logs.level generated columns, with the command that restores them (scripts/install-schema-extensions.sh); - run_artifacts.content capacity compared with the engine's 1 MiB artifact limit (TEXT warns with the MEDIUMTEXT remedy); - Agent browser sidecar image presence with the prebuild command; - Docker availability and the configured AGENTFLOW_ISOLATED_IMAGE. The page only reports and suggests commands; it never runs migrations, keeping the manual-migration policy. Adds the diagnostics card to the platform admin tabs with zh/en copy, plus the API, engine/runtime accessors and tests.
linus-liu-web
force-pushed
the
feat/platform-diagnostics
branch
from
November 21, 2026 18:16
5d1cbd4 to
8f61604
Compare
Author
|
Rebased onto current Re-ran validation on the rebased tree:
Diff is still 15 files, +676/-1; |
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 changed
Operators previously had to run
docker execand queryinformation_schemaby hand to notice deployment problems. Three recent cases show the gap:run_artifacts.content'sTEXTlimit fails the run write with MySQL error 1406 and leaves the noderunning, with no hint in the UI ([Bug]: MySQL TEXT artifact exceeds 64 KiB and leaves SOP node running #1092).run_telemetry.adapter,run_logs.level) surfaces as a rawUnknown columnerror the first time a run is opened ([Feature]: 安装和升级时补齐必须的 SQL,避免缺列直接报给用户 #201).This adds a read-only 平台管理 → 运维诊断 / Platform administration → Deployment diagnostics page backed by
GET /api/platform/diagnostics(platform admins only):run_telemetry.adapter/run_logs.levelexist and are generated columns, withscripts/install-schema-extensions.shas the remediation command (installer/./start.sh pullcovers Compose).run_artifacts.contenttype compared with the engine's single-artifact limit (engine.ArtifactSizeLimit(), 1 MiB);TEXT/TINYTEXTwarns about the MEDIUMTEXT remedy.agentflow -browser-imageprebuild command; hidden whenAGENTFLOW_BROWSER=off.AGENTFLOW_ISOLATED_IMAGEexists locally.The page never writes anything and never executes a migration; it only reports state and copyable commands, consistent with the repository policy that operators run
migrations/by hand. The UI follows the existing platform-admin card/tab structure, useslfTzh/en copy, and has no new dependency.Related: this implements the proposal in #1185; the artifact-column remedy belongs to the separate widening migration in #1184.
Scope
Compatibility
Read-only endpoint, platform-admins only, same auth path as the existing
/api/platform/*routes. No schema change and no migration is run. The new page renders inside the existing platform administration view and is only reachable by platform admins. The schema checks require MySQL; other storage drivers report the check as skipped.Validation
go vet ./internal/httpapi ./internal/runtime ./internal/engine ./webpasses;gofmtclean.go test ./internal/httpapi -run 'Platform|Diagnostics' -count=1passes, including the new admin/member access test (member → 403, admin → checks with valid statuses and the expected IDs).go test ./internal/runtime -run 'Browser|DockerImage' -count=1passes (sidecar image reference reporting, empty-reference guard).go test ./internal/engine -run TestArtifactSizeLimit -count=1passes.go test ./web -count=1passes, including the new node test for the panel markup, status classes and counts.python3 scripts/check-public.pypasses.go test -p=2 ./..., andscripts/scan-secrets.sh(its scanner download timed out on this network).Safety