9.8 KiB
Current continuation: Sketcher validation
Batch: 21fec8f69be292db7bbc5505. Date: 2026-09-18.
Selected: Sketcher_Snap, Sketcher_StopOperation, Sketcher_ValidateSketch, Sketcher_ViewSection.
Changes in this continuation
- Validation now bypasses the synthetic
DesktopCommandStatefallback and operates on the selected retainedSketcher::SketchObjectthroughSketcherDesktopCommands.cpp. - Native operations reuse the methods called by
TaskSketcherValidation.cpp: coincidence detection/repair, invalid constraint evaluation/removal, degenerate geometry detection/removal, reversed external arc endpoint repair, orientation locking/unlocking, deletion of constraints to external geometry, and native open-vertex coordinates. Repairs use a transaction and recompute; external-constraint deletion requires explicit confirmation. - The module adapter validates selection, document, operation, tolerance, construction inclusion and active-task arguments, and verifies structured native findings. No common dispatcher changes.
- The mounted workbench panel provides tolerance, construction inclusion, operation selection, external-deletion confirmation, execution and visible findings/point coordinates. Validation inspection does not alter geometry.
- Executable native/browser cases inspect the official constrained hexagon at normal tolerance, detect and remove edges below a deliberately larger user tolerance, assert actual geometry/constraint results, idempotence and invalid-input rejection, and operate the mounted browser controls. This does not yet exercise every repair operation.
- First acceptance run failed in the pre-existing profile loader with
No module named 'ast'. Fixed the loader using the official source-extraction approach already present inSketcherProbe.cppand the existing structured Python request/result bridge, avoiding unavailableastandjsonpackages. This reuses the supplied official profile geometry.
Verification state
- Focused native build succeeded before the first runner invocation. A rebuild including the profile-loader repair and strict operation-type validation is in progress.
- Project TypeScript check and geometry-boundary static audit passed. The audit still states
singleRuntimeVerified: false; no broader geometry unification claim. - First runner invocation failed, not passed. No acceptance statuses were manually edited. Final evidence is pending.
- Browser prerequisites:
/tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs,/usr/bin/google-chrome. - Runner:
FREECAD_SKETCHER_PLAYWRIGHT_MODULE=/tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs FREECAD_BROWSER_EXECUTABLE=/usr/bin/google-chrome python3 tools/run_business_acceptance.py --module Sketcher --ids Sketcher:desktop:Sketcher_ValidateSketch --reuse.
Remaining work (preserve all requirements)
- Complete validation acceptance; fix the first attributable failure, without changing acceptance machinery. Sync the rebuilt Sketcher JS/WASM before running its browser case.
- Snap: implement the actual idle-edit preference and snapping interaction, with native ownership and browser assertions.
- StopOperation: cancel an actual drawing operation/preview while retaining the sketch editor and committed geometry.
- ViewSection: implement native sketch-plane/reversed-view semantics and actual browser display clipping, with geometry-preservation assertions. The synthetic fallback is insufficient.
- Validation still needs dedicated defect fixtures and browser assertions for the other repair operations, point highlighting, and task lifecycle where relevant. Current implemented point display is a coordinate list, not viewport markers.
- Earlier reorientation browser/attachment verification remains outstanding as recorded below. The current batch does not claim it passed.
IFC semantic contract, verifier, proof areas and acceptance machinery remain unchanged. No full-parity/API gates, deployment, pushes or external messages. The initial unscoped git status was rejected by the scheduler; subsequent Git reads used explicit file scope.
Sketcher Desktop Batch Checkpoint
Batch: 6e8179a5d54ae062a880f1a3. Date: 2026-09-17.
Implemented This Turn
Sketcher_ReorientSketchnow routes throughexecuteSketcherDesktopCommandon the retained document, before the legacy synthetic desktop command path.- Native implementation validates the selected whole sketch, plane, finite offset, reverse flag and detach confirmation. It changes placement and attachment in a document transaction, recomputes, returns native placement/normal and preserves the active sketch edit identity.
- The existing Sketcher adapter supplies document/selection, validates inputs and checks the command-specific response. The mounted workbench provides plane, offset, reverse and detach controls. The common dispatcher was not edited.
tools/sketcher-business-cases.mjsdeclares executable reorientation cases. The final case version checks six native plane directions and offsets on a constrained hexagon, refusal/confirmation of detachment, preserved geometry/constraint counts, and the mounted browser controls through the actual worker/dispatcher.- The module case declaration includes the selected ID and the mounted shell dependency. No other selected ID was added to coverage. No manual acceptance status changes were made.
Verification And Artifacts
- Focused build completed:
cmake --build freecad-source/build-web/configure --target FreeCADWebSketcherProbe -j2. - Built
FreeCADWebSketcherProbe.jsand.wasmwere copied toweb/public/kernel/. - The initial native-only reorientation case passed through
tools/run_business_acceptance.py --module Sketcher --ids Sketcher:desktop:Sketcher_ReorientSketch --reuse. - Initial evidence:
docs/current/business-evidence/b9beb5fd3bc041adf682b6fb-20260917T155146148113.json. This covers the earlier native-only case on an empty sketch. It does NOT verify the subsequently added hexagon, attachment or browser cases, or the subsequently expanded dependency declaration. - A browser diagnostic created
BrowserReorient/Sketchthrough the mounted workbench, dispatcher, worker and retained native document. It did not execute reorientation and is not acceptance proof. npm --prefix web run check:geometry-boundarypassed with no findings. Its output explicitly does not prove a single runtime or all native algorithms. An initial invocation without the explicit prefix failed because the login shell used the repository root; the corrected invocation succeeded.- The attempt to run the expanded case was refused before execution with
previous_validation_deferred,executedCount: 0,deferredIds: ["Sketcher:desktop:Sketcher_ReorientSketch"]. The runner reports a user pause on repeat validation. No runner, policy, verifier, requirement or ledger was modified to override it. Current extended coverage remains unverified.
Browser Case Prerequisites
Playwright was installed outside the repository at /tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs. Chrome exists at /usr/bin/google-chrome. The case also supports an installed playwright package and its default browser. Exact attempted runner command:
FREECAD_SKETCHER_PLAYWRIGHT_MODULE=/tmp/freecad-sketcher-browser-tools/node_modules/playwright/index.mjs FREECAD_BROWSER_EXECUTABLE=/usr/bin/google-chrome python3 tools/run_business_acceptance.py --module Sketcher --ids Sketcher:desktop:Sketcher_ReorientSketch --reuse
The case owns its Vite server and browser and closes both. It saves screenshots under /tmp/freecad-sketcher-reorient-{1280,390}.png when that part runs; they have not yet been produced. A separate diagnostic dev server was started at http://127.0.0.1:5197/workbench.html?module=Sketcher.
Remaining Boundaries And Next Work
- The final reorientation native/browser cases need actual execution when acceptance policy allows it. Do not treat the earlier native-only evidence as proof of the expanded cases. In particular, the new constrained-hexagon fixture and
ObjectXYsupport fixture have not yet run. Browser reorientation, responsive screenshots and camera/view alignment remain unverified. The implementation records native edit identity using the existing mechanism; this is not proof of a complete interactive drawing editor. Sketcher_Snapremains unimplemented for this batch. OfficialCommand.cpp:1545togglesSnapin Sketcher preferences and is active only in edit mode with an inactive drawing handler. Implement actual browser snapping/preferences and native ownership; do not accept the existing synthetic state object as behavior.Sketcher_StopOperationremains unimplemented. OfficialCommand.cpp:415purges the drawing handler while keeping the sketch editor open. It needs cancellation of an actual browser operation/preview and assertions that committed geometry survives. Clearing a status flag is insufficient.Sketcher_ValidateSketchremains unimplemented. OfficialCommand.cpp:844requires exactly one selected sketch and no active task, then opens the real validation task. Implement the native validation operations and mounted task with actual invalid/repair fixtures, not a command receipt.- Snap, StopOperation and ValidateSketch still reach the pre-existing synthetic
DesktopCommandStatefallback inSketcherProbe.cppand have no declared business cases. Do not count them as delivered. Next implementation should replace that fallback for the selected command being completed, connect its mounted UI, add semantic assertions, and run only its attributable acceptance case.
Reuse the local source packet and supplied WASM. Follow bounded source reads and focused build/sync rules. Preserve all original and supplemental requirements. IFC semantic export contract, verifier, proof areas and acceptance machinery were not changed. No full-parity/API gates, deployment, pushes or external messages were performed.