Skip to content

fix(2.0): doctor display & findings catalogue, PG TLS error classification, skills parity - #754

Merged
Mola-maker merged 2 commits into
layerfs_v2_0_0from
fix/v2-doctor-pg-skills
Nov 22, 2026
Merged

Mola-maker merged 2 commits into
layerfs_v2_0_0from
fix/v2-doctor-pg-skills

Conversation

@Mola-maker

Copy link
Copy Markdown
Member

Summary

Addresses confirmed LayerFS 2.0 defects and documentation gaps found during concentrated testing on layerfs_v2_0_0 (ed9118963):

  • Doctor Web Spec (core/docs/issues/call-surface-2-0/doctor-page/index.html) (Fixes [2.0] Doctor display defects in web spec (doctor-page/index.html) and CLI renderer (output::doctor) #744, advances Ephemeral-AI-Lab/layerfs-project#159):
    • Show .detail (Call command + check rows) when expanding healthy or unchecked folder rows (machine, store, sandbox).
    • Fix responsive horizontal overflow at 720px and 375px (<=780px wrap, .mock label/select wrap) and keep .fact visible across all viewports.
    • Constrain #tip with max-height / overflow-y: auto and safe placement so tooltips never clip the viewport or overlap their trigger element.
    • Report honest clipboard feedback (Copied vs Copy failed + toast) when navigator.clipboard is missing or rejects.
    • Guard goTo(HOME_KEY) / unknown keys and dangling W.by[x.machine] references.
    • Align CHECKS.store what text and checkIds / reachMachines with calls.json and the Rust backend (native machine = 3 checks, native sandbox = 15 checks, PostgreSQL own_connections reach).
  • Doctor CLI Terminal Output (api/crates/layerfs-cli/src/output.rs, tests/rendering.rs) (Fixes [2.0] Doctor display defects in web spec (doctor-page/index.html) and CLI renderer (output::doctor) #744, advances Ephemeral-AI-Lab/layerfs-project#159):
    • Dynamically align severity and not checked columns when both appear (width = 11, preserving width = 8 when not_checked is empty).
    • Render observed_at, evidence on findings, and the check tree in --detail --text mode.
    • Add TTY-gated banner::bold summary styling (respecting NO_COLOR).
  • Doctor Findings Catalogue & Fault-Injection Receipts (docs/architecture/control/doctor/findings.md) (Ephemeral-AI-Lab/layerfs-project#159):
    • Enumerates all 55 frozen 2.0 doctor check IDs across all 6 families + workspaces with causes, evidence keys, safety-tagged remedies (read/safe/disruptive/destructive), and 9 live fault-injection verification receipts on Linux ext4 + PostgreSQL 18.6.
  • PostgreSQL 18 TLS Error Classification & Test URL Parsing (connection.rs, store_stats.rs, project_doctor_full.rs) (Fixes [2.0] PostgreSQL TLS handshake error misclassified as Integrity (Malformed) & test URL parser panic on libpq strings #745):
    • In Connector::connect(), classify Dial::Driver(e) via e.code().map(|c| rows::sqlstate(c.code())) so pre-session TLS handshake/certificate errors (e.code() == None) return BackendError::Closed (Unavailable) instead of BackendError::Integrity ("the Store answered something malformed").
    • Support both URI and libpq key-value LAYERFS_TEST_POSTGRES_URL formats in store_stats.rs and project_doctor_full.rs.
  • Repo Skills & @layerfs/node Metadata (api/node/package.json, .agents/skills/) (Fixes [2.0] Repo skills (.agents/skills/) and @layerfs/node package.json drift against frozen 2.0 surface (LF11-LF13, V23, RC-4) #746):
    • Fix "85 calls" -> "83 calls" in api/node/package.json.
    • Sync .agents/skills/layerfs-js-sdk/ (store.md, doctor.md, workspace.md, SKILL.md) with LF11–LF13, V23, and RC-4, and update retired source paths in .agents/skills/layerfs-sdk-observe/.

Verification

  • python3 -B tools/check_product_boundary.py: PASS (1,596 production files scanned).
  • NO_COLOR=1 cargo +1.85.1 test --locked -p layerfs-cli --test doctor --test doctor_targets --test rendering: 13/13 passed.
  • Live PostgreSQL 18.6 (127.0.0.1:55432, amcheck + pgstattuple + pg_stat_statements + TLS):
    • layerfs-persistence --test postgresql_doctor_access: 10/10 passed.
    • layerfs-api --features machine --test postgres_refusals --test store_stats --test project_doctor_full: 11/11 passed.
  • Headless Chromium + CLI Doctor E2E suite (14 tests across 1280px/720px/375px, light/dark themes, tooltip containment, clipboard, PTY ANSI/NO_COLOR): 14/14 passed.
  • Live PostgreSQL E2E suite (auth lifecycle, embedded-credential refusals, connect/disconnect/reconnect, --with live,stats, 5s silent TCP timeout, compaction, project.doctor --full): 11/11 non-root tests passed.

… drift

- doctor-page: show Call/checks on healthy folder rows, responsive layout
  (<=780px, visible .fact), bounded tooltip without anchor overlap, honest
  clipboard feedback, goTo/dangling-machine guards, calls.json parity
- cli output::doctor: aligned columns with not_checked, --detail renders
  observed_at/tree/evidence, TTY-gated bold summary
- persistence: TLS handshake failure before a session is Closed
  (Unavailable), not Integrity (answered something malformed)
- tests: store_stats/project_doctor_full accept URI and libpq PG URLs
- skills/package.json: 83 calls, LF11-LF13, V23, RC-4 alignment

Refs #744, #745, #746
…catalogue

- doctor-page: allow .mock label/select to wrap within 375px viewport
- docs: publish docs/architecture/control/doctor/findings.md covering all 55
  frozen 2.0 doctor checks, evidence keys, safety-tagged remedies, and live
  fault-injection receipts (Ephemeral-AI-Lab/layerfs-project#159)
@Mola-maker

Copy link
Copy Markdown
Member Author

人工核验过了,无问题

@Mola-maker
Mola-maker merged commit b09b495 into layerfs_v2_0_0 Nov 22, 2026
2 checks passed
@Mola-maker
Mola-maker deleted the fix/v2-doctor-pg-skills branch November 22, 2026 15:09
yifanxuaaa added a commit that referenced this pull request Nov 22, 2026
…rol-plane fixes)

Brings in the six origin commits (#751, #754, #755 and the store.move manifest repairs) beside the local LF14 commit 712f4d0.

Production LOC: 205907 -> 206226 (delta +319); first-parent comparison (parent 712f4d0 vs the merged tree), counted with tools/production_loc.py --root on git archive extracts of both snapshots; control scope 58808 -> 59068 (delta +260). Reference absent (retired R9c; last counted 65,417 at tree 498dd19).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant