跳到主要內容

ARC 2.0.0-beta.28

Test and diagnose

Collect source, contract, runtime, and visible-surface evidence when a Blocklet fails — and map each failure to the right command.

When something fails, establish four independent facts: selected source, declared contract, local runtime, and visible/callable surface. One green step never implies the others.

Quick triage

SymptomFirst commandsLikely layer
Scaffold missing filesRe-run create; find treePackage source
"Failed DSL validation"arc dsl validate <dir>AUP/DSL sources
format_changed on lintarc dsl format --write <dir>Formatting only
Profile check failsarc blocklet check --profile <recipe>Missing recipe assets
Port already in useNamed instance (auto port) or --port. Do not stop a seed daemon you did not startLocal daemon
No blocklet found at pathEnsure blocklet.yaml, .aup/, or convention entryDiscovery
HTTP not 200 / blank hostUse printed Host / ?blocklet= URLRouting
Build ok, page wrongBrowser accept + source path checkSurface, not package zip
Stateful write failsConfirm /instance binding; not seed-onlyInstance data
Remote publish failsAuth, secrets, network — see publish pageRelease path

Diagnostic recipes

1. Package identity

bash
arc blocklet inspect ./my-app
arc blocklet list .
cat ./my-app/blocklet.yaml

Confirm id, did, version, and that you are looking at the directory you think you are.

2. Contract

bash
arc dsl validate ./my-app
arc blocklet check ./my-app --profile minimal-app   # or basic
arc blocklet dev ./my-app

dev reports detected content type and convention mounts. It does not serve traffic.

3. Artifact

bash
arc blocklet build ./my-app
# read the "instance:" line and file count
ls ./my-app/dist/.afs/manifest.json ./my-app/dist/blocklet.dist.json

4. Local surface

bash
export ARC_INSTANCES_DIR=/tmp/arc-instances-demo
arc service start --instance demo --home /tmp/arc-home-demo --blocklet ./my-app
arc service url --instance demo --print url
# probe the printed host/port; do not assume 4900

Then open the same URL in a real browser. Check console errors if the shell loads but content does not.

5. Service status

bash
arc service status --instance demo
arc service stop --instance demo    # only if this is your temporary named instance

Failure modes seen on 2.0.0-beta.28

ObservationEvidenceDocumentation stance
arc blocklet run errors with port in useSeed port 4900 occupiedNamed instance (auto port) or explicit --port. ARC_SERVICE_PORT only affects the seed instance
arc dsl lint fails on fresh minimal-app with format_changedScaffold emits unformatted DSLDocument dsl format --write; do not treat as broken recipe alone
arc deploy <path> --publish without snapshot secretError: Snapshot V2 requires AFS_DID_SPACE_SNAPSHOT_SECRET (or scope secret)Document as local-publish prerequisite — not a Blocklet source bug
arc deploy <path> daemon register returned missing 'dir' in one isolated trialCLI posts parent dir to /api/blocklets/dirs/addPrefer blocklet run / service start --blocklet for local accept; treat bare deploy register as environment-sensitive

What not to conclude

EvidenceInvalid conclusion
check passedUsers saw the correct page
build passedRemote deploy works
Local HTTP 200/instance writes and auth flows work
Historical product name in a pathFeature parity with that product