Skip to content

Conversation

@disconcision
Copy link
Member

No description provided.

disconcision and others added 8 commits January 11, 2026 23:30
CLI implementation (src/CLI/):
- Rust-style error formatting with source context, line numbers, carets
- evaluate_with_probe_map for probe sample collection
- All commands working: run, format, analyze, probe (with --many)

Documentation (plans/hazel-lsp-cli/):
- cli-api.md: Complete CLI reference with examples
- hazel-primer.md: Comprehensive Hazel syntax guide
- hazel-builtins.md: Full builtin list with OCaml/ReasonML differences
- vision.md: Long-term direction (semantic views, structural queries)
- experience-log.md: AI experience tracking workflow
- README.md: Project plan with status tracking

Sample programs (hazel-programs/):
- 9 documentation programs extracted from ML slides
- 39 B2T2 programs extracted from ML slides
- Folder structure for study tasks and examples

Utilities (scripts/):
- extract-docs.py: Extract .hz programs from ML backup_text fields

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
CLI test command (src/CLI/):
- ./hazel test runs tests and reports pass/fail with line numbers
- Shows hint strings for named tests (hint "name" test ... end)
- Supports --verbose flag to show all tests
- Exit code 0 = pass, 124 = failures

Study program infrastructure (plans/study-programs.md):
- Requirements for probe debugging user study programs
- Development process and bug design guidelines
- Tiered list of program concepts ready for parallel implementation
- Probe mechanism overview from codebase research

Example programs:
- emojipaint.hz: Working version with comprehensive tests
- emojipaint-bug.hz: Buggy version with single failing test
- Proper indentation applied to both

Documentation updates:
- cli-api.md: Full test command documentation
- hazel-primer.md: Named tests, debugging workflow with probes
- README.md: Updated status and TODOs

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Three new programs for probe debugging user studies:

Tic-Tac-Toe (~265 lines, 18 tests):
- 3x3 board with win/draw detection
- Bug variants: wrong diagonal indices, turn not alternating

Game of Life (~230 lines, 20 tests):
- Cellular automaton with birth/death rules
- Bug variants: missing diagonal neighbors (easy), wrong survival
  threshold (medium), sequential instead of simultaneous update (hard)

Calculator (~270 lines, 28 tests):
- Expression parser with operator precedence
- Tokenizer, recursive descent parser, evaluator
- Bug variants: flat precedence, right-associativity

Documentation updates:
- hazel-primer.md: Added note about comment syntax
- experience-log.md: Documented eval reserved name and comment gotchas
- Each program folder has detailed README with bug descriptions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@codecov
Copy link

codecov bot commented Jan 12, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (probe-III@ab19caf). Learn more about missing BASE report.

Additional details and impacted files
@@             Coverage Diff              @@
##             probe-III    #2056   +/-   ##
============================================
  Coverage             ?   50.38%           
============================================
  Files                ?      219           
  Lines                ?    25075           
  Branches             ?        0           
============================================
  Hits                 ?    12635           
  Misses               ?    12440           
  Partials             ?        0           
Files with missing lines Coverage Δ
src/haz3lcore/ProbePerform.re 9.12% <ø> (ø)
src/haz3lcore/lang/Token.re 81.25% <ø> (ø)
src/haz3lcore/projectors/ProbeText.re 0.00% <ø> (ø)
.../haz3lcore/projectors/implementations/ProbeProj.re 1.20% <ø> (ø)
src/haz3lcore/zipper/Printer.re 87.50% <ø> (ø)
src/haz3lcore/zipper/action/Action.re 0.00% <ø> (ø)
src/haz3lcore/zipper/action/SampleCursorPerform.re 20.00% <ø> (ø)
src/haz3lcore/zipper/action/Triggers.re 76.33% <ø> (ø)
src/language/dynamics/Sample.re 11.73% <ø> (ø)
src/language/dynamics/state/EvaluatorState.re 64.17% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Base automatically changed from probemoar to dev January 16, 2026 23:03
disconcision and others added 20 commits January 16, 2026 18:42
CLI changes:
- Add --auto/-a flag to ./hazel probe command
- When enabled, uses AutoProbe.ids_to_autoprobe to automatically
  place probes on expressions (one per line heuristic)
- Works with existing --many flag for multiple samples

Study-write tasks for probes user study:
- basepoint: tiny task, parameter order ambiguity
- clamp: tiny task, condition boundary errors
- running-sum: small task, fold accumulator errors
- Each has sketch, solution, and storyboard files
- Tests formatted with line breaks for auto-probe visibility

Also includes:
- study-write-plan.md: research questions, task categories, design notes
- cli-autoprobe-proposal.md: implementation design document
- session-log.md: example incremental CLI session

Co-Authored-By: Claude Opus 4.5 <[email protected]>
- Replace verbose ^^probe(...) with cleaner ⟦...⟧ brackets in CLI output
- Fix probe values appearing on first line of multi-line expressions
  (now correctly placed at end of expression using m.last.row)
- Add Token.probe_start/probe_end constants for Unicode brackets
- Add refractor_seg_to_seg_text for customizable probe rendering

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Changed ~indent="" to skip Printer's computed indentation, which was
causing output to have different (usually more) indentation than the
source file. The computed indentation is designed for Hazel's structural
editor, but CLI output should preserve the original whitespace from the
parsed segment.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Botanical/celestial themed tutorial introducing probes:
- Seeing values with basic probes
- Environment hover for variable values
- Branches and the ∅ (not evaluated) icon
- Functions and multiple samples
- Closure cursor and sample alignment
- Single/many mode, arrow key navigation

Uses ⟦⟧ bracket notation to represent probed expressions in text.
Sets up for Part 2: larger Greenhouse Planner program with debugging.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New study-write tasks with sketch/solution pairs:
- emojipaint-extend: Extend emoji paint with new brush feature
- last-element: Find the last element of a list
- mentions: Extract @mentions from text
- safe-head: Safe version of list head with Option type

Each task includes storyboard documentation for guided exploration.
Also adds task-ideas.md and CLI syntax exploration notes.

Co-Authored-By: Claude Opus 4.5 <[email protected]>
New commands:
- ./hazel gen-slides: Generate ML slide files from hazel-programs/examples/
- ./hazel gen-slides-clean: Remove generated files and restore empty stub

Features:
- Recursively finds all .hz files in the examples directory
- Parses each file and serializes to PersistentSegment format
- Generates individual ML files for each program
- Creates AllExamples.re aggregation module
- Strips leading indentation before parsing (configurable)
- Hierarchical slide titles based on directory structure

Configuration in src/CLI/GenSlides.re (input_dir, output_dir, root_title, etc.)

Integration:
- Added examples library to web dependencies
- Added Examples.AllExamples.all to Init.re documentation list
- Stub AllExamples.re allows build to succeed when slides not generated

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Resolve merge conflicts from refactors.manuals changing from Id.Map.t
to RefractorList.t (association list). Updated call sites to use list
operations instead of Id.Map operations:

- Printer.re: Use [] instead of Id.Map.empty for default refractors
- Triggers.re: Update type annotations and use List.assoc_opt,
  ListUtil.remove_assoc, List.is_empty
- Cli.re: Build refractor list instead of Map, fold into list
- ProbeSidebar.re: Add missing projector_list arg to mk_view,
  convert manuals to Map for RefractorView.mk_data
- Test_ExpToSegment.re: Use [] for empty refractors

Co-Authored-By: Claude Opus 4.5 <[email protected]>
Convert recursive do_until and do_until_piece functions in Zipper.re to
iterative implementations using while loops. The previous recursive
versions would overflow the JavaScript call stack when traversing
documents with thousands of tokens.

Also includes related refactoring:
- Move Sample.Capture type to its own submodule in Sample.re to avoid
  type inference issues with overlapping field names
- Add clear_transient() to EvaluatorState to prevent serializing large
  app_args data (~100MB+) over postMessage
- Only store app_args for probe target IDs to reduce memory usage

Co-Authored-By: Claude Opus 4.5 <[email protected]>
@disconcision disconcision changed the base branch from dev to probe-III February 4, 2026 06:35
disconcision and others added 6 commits February 4, 2026 01:48
When a function argument is syntactically just a variable (e.g., g(x)),
filter that variable from the environment display since its value is
already visible in the call display (e.g., g(5)).

- Add get_arg_var_names to extract variable names from direct Var args
- Handles tuples: f(x, y+1) filters x but keeps y
- Handles parenthesized expressions
- Update sample_environment to accept filter_vars parameter

Co-Authored-By: Claude Opus 4.5 <[email protected]>
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