Commit Graph
40 Commits
Author SHA1 Message Date
cflmy 5740362880 test: finalize reader snapshots against the published Core 2026-11-24 14:22:14 +08:00
cflmy a482df80be feat: preview and download selected results from the reader 2026-11-24 14:03:27 +08:00
cflmy aa2a2b3ce4 feat: export one source-bound session result as a static ZIP 2026-11-24 13:43:27 +08:00
cflmy 3081581b0b feat: package reader media and fonts in the existing static exporter 2026-11-24 13:27:42 +08:00
cflmy b6962b2b38 feat: place calls and current results beside the function 2026-11-24 13:26:52 +08:00
cflmy 07fa0d62a8 feat: render safe local media, MathML and Markdown anchors 2026-11-24 13:23:35 +08:00
cflmy 37291137eb feat: stream verified Core execution events over the View SSE channel 2026-11-24 13:15:27 +08:00
cflmy 4cf500fb58 feat: consume Analysis v3 alongside v2 2026-11-24 13:08:16 +08:00
cflmy 27532e7b4c docs: adopt complete-reader RFC and freeze the RC.2 fixture 2026-11-24 13:05:08 +08:00
cflmy dcb9daeaf4 Merge pull request '完成 RFC-VIEW-0002 并验收交互式 View' (#1) from rfc-view-0002 into master
ci/woodpecker/push/woodpecker Pipeline was successful
2026-11-22 21:44:57 +08:00
cflmy 1942b5fd9b ci: run one View pipeline for each pull request update
ci/woodpecker/pr/woodpecker Pipeline was successful
2026-11-22 21:40:11 +08:00
cflmy 790c158db0 test: replay a nonterminal frame before forcing Chromium reconnect 2026-11-22 21:40:11 +08:00
cflmy 684f87acca evidence: record stock-archive View fixture acceptance
ci/woodpecker/push/woodpecker Pipeline was canceled
ci/woodpecker/pr/woodpecker Pipeline failed
2026-11-22 21:30:09 +08:00
cflmy 34de5a34d9 fix: make View fixtures run from the standalone beta archive 2026-11-22 21:28:55 +08:00
cflmy ce0efe5fc2 evidence: record issue 2 frozen archive and installed reader acceptance
ci/woodpecker/manual/woodpecker Pipeline failed
2026-11-22 21:07:12 +08:00
cflmy 88f49f9fd9 test: reap installed View servers after acceptance checks 2026-11-22 21:05:31 +08:00
cflmy 5b4e981229 docs: describe the installed View acceptance and compatibility baseline 2026-11-22 21:04:29 +08:00
cflmy d000bc1ac9 test: assert typed results under the reader CSP 2026-11-22 21:03:46 +08:00
cflmy df2e40d8d8 ci: run real-core integration with the verified release executable 2026-11-22 21:02:09 +08:00
cflmy 6c9aca975a test: exercise installed View calls and real Chromium reconnect 2026-11-22 21:02:09 +08:00
cflmy 95584c3120 ci: run View acceptance against the pinned official beta archive 2026-11-22 20:59:12 +08:00
cflmy 8c00ae3ea1 fix: finish View SSE responses after terminal events 2026-11-22 20:59:12 +08:00
cflmy b2a7f7173a docs: keep docs/RFC-VIEW-0002.md as a symlink to the archived spec path
RFC-VIEW-0002 §5.3 recommends docs/architecture/RFC-VIEW-0002.md; the symlink
preserves the original referenced path for readers while keeping one source of
truth.
2026-11-22 14:56:48 +08:00
cflmy 1c84395b0d evidence(PR-06): final frozen-CLI acceptance manifest for 0fceb40
One-command acceptance on the PR-06 commit: fmt/clippy/test/build/bundle/
archive_install/tool_list/view_help/verify/export/examples_check/browse/
real_run/export_suite/no_exec_suite/security_suite/browser/core_sha all PASS.
View binary eb19f796…, archive a3fb28c8…, frozen CLI 062cb56e… unchanged.
Records acceptance.log, check-examples.log, no-exec.log and the final manifest;
ACCEPTANCE.md now lists the exact evidence identity.
2026-11-22 14:55:38 +08:00
cflmy 0fceb40088 feat(PR-06): RFC §13.3 examples, export closure, acceptance and docs finalization
- add examples/{welcome,branch-loop,function-params,knowledge-only,
  unsafe-side-effect}.mq.md + explicit examples/view.json; all validated against
  the frozen CLI (double(5)=Int 10, branch-loop Int 0 with loop/return Trace,
  knowledge-only sem.no_entry_function, unsafe write only with explicit project
  grants) via scripts/check-examples.sh
- add scripts/test-no-exec.sh sentinel suite: browse/list/search/reload/export of
  the write fixture keeps source+lock hashes unchanged, writes no sentinel and
  produces exported HTML with no run controls/CSRF/external URLs
- static export no longer renders run controls (no run dock button/tab/call
  buttons/run dialog); only settings/more remain
- extend scripts/acceptance.sh with examples_check and no_exec_suite gates and
  extend the evidence manifest tests map
- rewrite docs/ACCEPTANCE.md against RFC §9/§10 with E01-E16/N01-N22 mapping;
  finalize STATUS/CONFORMANCE/README/COMPATIBILITY/CHANGELOG for 0.2.0
- record PR-06 evidence logs (examples, no-exec, pre-commit acceptance)
2026-11-22 14:54:23 +08:00
cflmy 807c24b952 feat(PR-05): Trace provenance annotations, grouped chips and stale semantics
- mark static anchors data-annotation-source=analysis and observed run chips
  data-annotation-source=trace with run seq/kind; group events per source anchor
  into one chip (>3 events collapse to ×N with a truthful title)
- add controller tests for source edits during a run (stale=true and all
  anchors/source ids null), mismatched Trace digest (run succeeds,
  trace.status=invalid, no events) and truncated Trace (event_budget preserved)
- ADR-0010 records the annotation/staleness strategy and the allowed inline-chip
  degradation instead of SVG curves
- extend browser suite with provenance/grouping assertions and dark-theme run
  screenshot; record PR-05 evidence (real Chromium, RFC width matrix)
- unit 63 + contract 41 + integration 43 + security 11 pass; clippy clean
2026-11-22 14:36:09 +08:00
cflmy 046834bcb6 feat(PR-04): SSE execution loop, 7-route server and session security
- replace src/server.rs with src/server/{mod,routes,security,sse}.rs implementing
  exactly the RFC-0002 §6.2 routes: GET /, GET /file, GET /assets, GET
  /api/documents, POST /api/runs, GET /api/runs/{id}/events, POST
  /api/runs/{id}/cancel; old /api/health, /api/document, /api/run and
  /api/clear-run are gone (404)
- SSE writes the event-stream directly to the socket and flushes every frame and
  heartbeat (tiny_http's chunked writer would delay frames); Last-Event-ID
  replay or authoritative snapshot, 128-event ring, terminal close, heartbeat
  comments, at most two observers per run, no polling route
- per-session HttpOnly SameSite=Strict cookie + X-View-CSRF, exact same-origin
  Origin, loopback Host, Sec-Fetch-Site cross-site rejection, JSON-only 64 KiB
  run POSTs; cancel is an authenticated bodyless control POST
- reader.js: Analysis-driven function form with text-only command preview,
  pure/project mode + explicit fs grants with second confirmation, one POST then
  EventSource, cancel, live result/stdout/stderr/Trace panel and keyed source
  anchors (skipped when stale); no innerHTML of CLI data and no status polling
- render: hidden live run shell, generic explicit-run dialog, function call
  buttons carrying Analysis function ids/params, data-analysis-digest/document
  attributes; remove the old run-confirm dialog and run-page reload path
- add tests/security/ suite, rewrite HTTP/SSE integration tests, update browser
  suite for EventSource/dark theme/RFC width matrix (incl. 2048x1133)
- ADR-0009 + docs/evidence/PR-04 with real Chromium log/screenshots and a real
  frozen-CLI SSE run (285 Trace v2 events, CLI SHA unchanged)
- unit 63 + contract 41 + integration 40 + security 11 pass; clippy clean
2026-11-22 14:30:40 +08:00
cflmy e13c1828a4 feat(PR-03): execution controller, cancellable process adapter and budgets
- add src/execution/{request,process,controller,events}.rs implementing RFC-0002
  §6.3 request validation, function_id->CLI name resolution, single-job
  lifecycle, dedupe by client_request_id+payload digest, 409 busy/conflict,
  unique terminal states, idempotent cancel and Trace v2 binding against the
  exact pre-run Analysis bytes
- route all Core subprocess spawning through one bounded, cancelable adapter
  with process-group TERM->2s->KILL, spawn hook, 4 MiB output caps and explicit
  --fuel/--max-output/--timeout/trace budgets; CoreClient check/--version reuse it
- add marqdo.view-run-events v1 event log: 128 frame ring, Last-Event-ID replay
  or authoritative snapshot, numeric seq/id, heartbeat constant
- add bounded --run-timeout (default 30s, max 120s
- add ADR-0008 (lifecycle/cancel race/trace-missing semantics) and PR-03
  evidence; execution tests use a real fake-Core executable
- unit 58 + contract 41 + integration 42 pass; clippy clean
2026-11-22 13:39:17 +08:00
cflmy 5c9a313424 refactor(PR-02): protocol/reader architecture, /api/documents and reader IA
- migrate crate to RFC-0002 §5.3 Reader layout: src/protocol/{analysis_v2,
  trace_v2,tool_v1}.rs, src/reader/{source,markdown,model,assemble,render,
  assets}.rs, src/config.rs; lib.rs is the composition root; delete app/project/
  semantic/trace/document/presentation/source_map/render/assets top-level files
- split presentation into model (types) and assemble (merge/stale/DocumentService)
- merge controlled project root/path boundary and UTF-8 byte spans into
  reader/source.rs; move view.json config to config.rs
- replace GET /api/document with read-only GET /api/documents (documents list +
  current outline/function/analysis summary) and add contract tests
- reading UI: drop variable/memory placeholder actions, keep one explicit
  unsupported explanation, add simple dark theme toggle over the single token
  layer; assert via rendering test
- reorganize tests into Cargo [[test]] suites tests/contract and
  tests/integration; record docs/evidence/PR-02
- unit 41 + contract 41 + integration 33 all pass; clippy clean
2026-11-22 13:08:09 +08:00
cflmy 5a61788bc9 feat(PR-01): 0.2.0 Tool v1 bundle, scripts/ layout and CI lanes
- bump View product version to 0.2.0 (Cargo.toml, Cargo.lock, tool.json, CLI)
- move all maintenance scripts from tools/ to scripts/ per RFC-0002 §5.3
- add scripts/verify-frozen-cli.sh: records version/SHA and fails if the frozen
  CLI changes across a command sequence
- add .github/workflows/ci.yml: quality lane + frozen-CLI acceptance lane with
  archive SHA verification and evidence upload; update .woodpecker.yml paths
- record PR-01 black-box evidence: tool install/list/view --help/version,
  tamper rejection, tool remove, frozen CLI SHA unchanged
2026-11-22 12:51:36 +08:00
cflmy d0f1834e98 docs(PR-00): adopt RFC-VIEW-0002 baseline, legacy and frozen-CLI audits
- move RFC-0001 to docs/architecture and ADRs to docs/decisions; add ADR-0007
- add static legacy View audit with KEEP_ASSET/REIMPLEMENT/DROP/UNKNOWN and
  LEGACY_RUNTIME_UNVERIFIED declaration
- add frozen CLI black-box contract audit (check/run/call, function-name
  resolution, JSON envelopes, Trace v2 binding, Tool v1 dispatch)
- add living CONFORMANCE matrix and refresh STATUS with remaining 0002 gaps
- mark 0001 ACCEPTANCE as historical evidence, not 0002 release gate
2026-11-22 12:46:05 +08:00
marqdo-view dev 9bc8524589 evidence(PR-06): frozen-CLI acceptance manifest for d641ca5
Generated by tools/acceptance.sh against the official 3.0.0-beta.1 archive:
- CLI SHA-256 before==after 062cb56e..., tool/analysis/trace = 1/2/2
- all gates PASS: build, bundle, archive install, view help/verify/export,
  Live browse, explicit CSRF-confirmed real run, export/security/browser suites
- view_source_sha d641ca5..., target x86_64-unknown-linux-gnu
- remote CI URL remains UNVERIFIED (documented)
2026-11-22 12:07:36 +08:00
marqdo-view dev d641ca58ac feat(PR-06): one-command frozen-CLI acceptance, evidence and final docs
- tools/acceptance.sh: RFC §18.1 end-to-end acceptance against the frozen CLI
  release archive in an isolated tool home (build/test/bundle/archive-install/
  view help/verify/export/browse/explicit CSRF run/export+security+browser
  suites/CLI SHA check) and generation of docs/evidence/<CLI-SHA>/manifest.json
- tools/test-contract.sh + .woodpecker.yml CI lanes (remote CI unverified)
- docs/ACCEPTANCE.md gate table (P0 all PASS; U-01/U-04 honestly PARTIAL),
  docs/audits/protocol-conformance.md, ADR-0006 documented RFC deviations
- unicode/CRLF/duplicate-text examples + frozen goldens + tests (S-04)
- presentation degradation matrix tests (S-05..S-07), hostile-stdout escaping
  test (X-05), keyboard accessibility browser checks (U-03)
- final README/STATUS/COMPATIBILITY/CHANGELOG with honest limitations
2026-11-22 12:06:45 +08:00
marqdo-view dev 1f34daffb0 feat(PR-05): pure static export and hardened Live boundary
- export.rs: marqdo view export PATH --out DIR through the same ReaderRenderer;
  index.html + pages/<relative>.html + hash-named assets + manifest.json
- export never calls Core run; refuses output inside project root and unrelated
  non-empty dirs; staging + atomic rename replaces only prior View exports
- offline by construction: embedded asset bytes, data-URI images, relative
  links, no remote subresources; --no-annotations hides anchors only
- HTTP hardening: max 32 concurrent requests (503), detail-free public error
  JSON/pages (no absolute paths/subprocess text), 30s page check budget
- tools/test-export.sh (manifest hashes + file:// Chromium offline check),
  tools/test-security.sh, adversarial security-project browser fixture
- tests/export.rs export contracts; ADR-0005; docs updated
2026-11-22 11:52:22 +08:00
marqdo-view dev 9a80272b5f feat(PR-03): browser acceptance and visual evidence for the single reader theme
- real Chromium (Playwright) suite against the frozen core: one CSS/one script,
  zero external requests, zero console errors, document/source switch, local
  search, settings, 7 viewport widths (390..2560) without overflow or dock
  clipping, no-JS readability, print mode, explicit run + clear
- tools/test-browser.sh starts Live servers on examples/welcome and
  examples/control-flow, verifies core SHA-256 unchanged
- screenshots committed under docs/evidence/PR-03 (Welcome 1664x920 / 390x844,
  real Trace run page); pixel-level manual comparison marked UNVERIFIED
- meta CSP drops the ignored frame-ancestors directive (HTTP header keeps it)
2026-11-22 11:43:59 +08:00
marqdo-view dev df1cf9ec24 feat(PR-04): explicit-run flow, Trace v2 validation and run visualization
- trace.rs: strict Trace v2 validation (schema/product/root_id/analysis_digest,
  known module ids, increasing seq, span bounds) + run states and anchor summaries
- POST /api/run: explicit confirm, CSRF token, Origin/Host checks, JSON limits,
  pure-only mode, one active run, process-group timeout, in-memory run cache
- POST /api/clear-run: session cache cleanup without touching project files
- server-rendered run panel (escaped stdout/stderr, Core error code, public final
  value only, capped event list, truncation/stale/failure states) and inline chips
  anchored to real statement spans; no per-assignment values or memory claims
- page refresh/open never invokes run (tested 10x); rejected requests never spawn
- real Trace v2 goldens (ok/truncated/arity error) from frozen CLI + contract
  and raw-HTTP tests; ADR-0004; docs updated
2026-11-22 11:38:39 +08:00
marqdo-view dev 80ce564f09 feat(PR-02): DocumentModel, Analysis v2 projection, single renderer and Live browsing
- document.rs: comrak marqdo.md.v1 parse -> DocBlock/Inline with exact UTF-8 spans
- semantic.rs: typed Analysis v2 validation (schema/profile/root_id/source_digest,
  units/functions/statements/resources/imports/references/calls/diagnostics,
  per-span UTF-8 checks with explicit view.source_span_invalid warnings)
- presentation.rs: one PresentationModel/Outline with source status matrix
- render.rs: one ReaderRenderer; sanitized GFM, statement anchors, heading mode
  badges (display-only prefix strip), source pane, docs/Live|Static link policy,
  CSP meta, no inline scripts, no raw HTML execution
- server.rs: loopback-only Live reader with Host/DNS-rebinding checks, strict
  percent decoding, project path boundary, security headers, read-only APIs
- app.rs: AppContext degradation (core missing -> prose-only, check error ->
  diagnostics + revoked semantics, protocol mismatch -> hard error)
- assets: single reader.css/reader.js + embedded SHA-256 AssetBundle, copied
  legacy logo/blossom/feather with provenance
- examples + frozen-CLI Analysis goldens + rendering/HTTP/asset/no-coupling tests
- ADR-0003 heading prefix/anchor identity; docs updated
2026-11-22 11:19:11 +08:00
marqdo-view dev 8ba20a5c67 feat(PR-01): single Rust package, Tool Protocol v1 bundle and PublicCoreClient
- src/lib.rs module layout + thin main.rs dispatcher; CLI owns browse/export/verify
- core_client: MARQDO_BIN only, explicit argv (no shell), 0700 scratch dirs,
  wall-clock timeout killing the whole process group, version/protocol negotiation
- project/source_map: canonical path boundary, SafeRelativePath, exact UTF-8
  byte <-> line/column <-> UTF-16 mapping, SHA-256 of exact bytes
- stable view.* error codes with 0/1/2 exit classes; BindDenied for non-loopback
- verify use case: Analysis v2 schema/profile/root_id/source_digest binding, no execution
- tool.json + tools/package.sh + tools/install-smoke.sh; frozen-CLI install smoke PASS
- contract tests with a real fake-core executable + architectural coupling gates
- COMPATIBILITY/CHANGELOG/STATUS updated
2026-11-22 10:33:14 +08:00
marqdo-view dev ef546f2ca6 docs(PR-00): legacy view audit, visual/state design baseline, ADRs
- audit legacy src/view render paths (serve/output/document/debug) with exact file:line evidence
- document CSS cascade: stylesheet -> notebook_ui (dormant skin) -> reader.css
- record Welcome-hero filename regex, export-time execution, missing CSRF in /api/run
- classify legacy assets (logo/blossom/feather reused under Apache-2.0; KaTeX not)
- add visual tokens, run-state matrix, ADR-0001/0002, STATUS, licenses, gitignore
- mark LEGACY_RUNTIME_UNVERIFIED (no build/mutation of legacy repos)
2026-11-22 10:08:03 +08:00
cflmy bf76288021 init 2026-11-22 09:54:46 +08:00