Skip to content

Commit 258427b

Browse files
authored
doc: hide deps from the public lean-beam surface (#10)
* doc: hide deps from the public lean-beam surface * doc: clarify deps alias risk
1 parent 743d0ac commit 258427b

6 files changed

Lines changed: 15 additions & 20 deletions

File tree

‎Beam/Cli.lean‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1451,7 +1451,6 @@ private def usage : String :=
14511451
" beam [--root PATH] [--socket PATH | --port N] lean-run-with <path> <handle-json|-|--handle-file <path>> [--stdin | --text-file <path> | -- <text...> | <text...>]",
14521452
" beam [--root PATH] [--socket PATH | --port N] lean-run-with-linear <path> <handle-json|-|--handle-file <path>> [--stdin | --text-file <path> | -- <text...> | <text...>]",
14531453
" beam [--root PATH] [--socket PATH | --port N] lean-release <path> <handle-json|-|--handle-file <path>>",
1454-
" beam [--root PATH] [--socket PATH | --port N] lean-deps <path>",
14551454
" beam [--root PATH] [--socket PATH | --port N] lean-sync <path> [+full]",
14561455
" beam [--root PATH] [--socket PATH | --port N] lean-refresh <path> [+full]",
14571456
" beam [--root PATH] [--socket PATH | --port N] lean-save <path> [+full]",
@@ -1495,6 +1494,7 @@ private def printExperimentalInfo (home : System.FilePath) : IO Unit := do
14951494
IO.println s!"Experimental expert commands live in {doc}"
14961495
IO.println "This is an unstable broker escape hatch, not part of the stable runAt contract."
14971496
IO.println "Current experimental entry point: lean-request-at"
1497+
IO.println "Unsupported or broken compatibility aliases may still exist for tests; they are not part of the supported or experimental surface."
14981498

14991499
private def runLeanRunAt
15001500
(home : System.FilePath)

‎docs/experimental.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ broker-side conveniences for debugging and exploration.
88
`lean-beam request-at` is an unstable broker escape hatch for expert debugging. It does not widen the
99
stable `runAt` contract.
1010

11+
Some unsupported or broken compatibility extensions may still exist in the tree for tests or local
12+
maintainer workflows. Treat those as implementation leftovers, not as experimental API candidates.
13+
The current example is the hidden `lean-deps` compatibility alias: you can use it at your own risk
14+
to extract full deps, but there are no guarantees and the information is likely broken.
15+
1116
## `lean-beam request-at`
1217

1318
`lean-beam request-at` forwards a small whitelisted set of standard Lean LSP requests against the current

‎scripts/lean-beam‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ usage:
1818
lean-beam [--root PATH] [--socket PATH | --port N] run-with <path> <handle-json|-|--handle-file <path>> [--stdin | --text-file <path> | -- <text...> | <text...>]
1919
lean-beam [--root PATH] [--socket PATH | --port N] run-with-linear <path> <handle-json|-|--handle-file <path>> [--stdin | --text-file <path> | -- <text...> | <text...>]
2020
lean-beam [--root PATH] [--socket PATH | --port N] release <path> <handle-json|-|--handle-file <path>>
21-
lean-beam [--root PATH] [--socket PATH | --port N] deps <path>
2221
lean-beam [--root PATH] [--socket PATH | --port N] sync <path> [+full]
2322
lean-beam [--root PATH] [--socket PATH | --port N] refresh <path> [+full]
2423
lean-beam [--root PATH] [--socket PATH | --port N] save <path> [+full]

‎skills/lean-beam/SKILL.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Supported command families:
4242

4343
- bootstrap the Lean backend: `lean-beam ensure`
4444
- inspect existing code or proof state: `lean-beam hover`, `lean-beam goals-prev`, `lean-beam goals-after`
45-
- inspect file, dependency, or daemon state: `lean-beam deps`, `lean-beam open-files`, `lean-beam doctor`, `lean-beam stats`,
45+
- inspect file or daemon state: `lean-beam open-files`, `lean-beam doctor`, `lean-beam stats`,
4646
`lean-beam reset-stats`
4747
- try one isolated speculative Lean snippet: `lean-beam run-at`
4848
- continue from one exact speculative state: `lean-beam run-at-handle`, `lean-beam run-with`,
@@ -54,7 +54,7 @@ What to treat as the default public skill surface:
5454

5555
- default and stable enough for normal use: `lean-beam hover`, `lean-beam goals-prev`, `lean-beam goals-after`,
5656
`lean-beam run-at`, `lean-beam sync`, `lean-beam refresh`
57-
- narrower but supported wrapper surface: `lean-beam deps`, `lean-beam open-files`, `lean-beam doctor`,
57+
- narrower but supported wrapper surface: `lean-beam open-files`, `lean-beam doctor`,
5858
`lean-beam stats`, `lean-beam reset-stats`, `lean-beam save`, `lean-beam close-save`
5959
- alpha support APIs: `lean-beam run-at-handle`, `lean-beam run-with`, `lean-beam run-with-linear`,
6060
`lean-beam release`, `lean-beam-search`

‎skills/lean-beam/references/workflow-details.md‎

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -51,12 +51,6 @@ printf '%s\n' "$HANDLE_JSON" | lean-beam-search playout "Foo.lean" "exact trivia
5151
printf '%s\n' "$HANDLE_JSON" | lean-beam-search release "Foo.lean"
5252
```
5353

54-
Inspect dependency order for multi-file edits:
55-
56-
```bash
57-
lean-beam deps "Foo.lean"
58-
```
59-
6054
Inspect Lean type/term information at a specific position:
6155

6256
```bash
@@ -101,7 +95,7 @@ What is not a valid checkpoint target:
10195

10296
## Source-File And Execution Model
10397

104-
- `lean-beam run-at` and `lean-beam deps` do not edit `Foo.lean`
98+
- `lean-beam run-at` does not edit `Foo.lean`
10599
- `lean-beam hover` is the stable read-only semantic inspection command for an existing position
106100
- `lean-beam goals-prev` and `lean-beam goals-after` are the stable read-only proof-state
107101
inspection commands for an existing tactic position
@@ -210,7 +204,6 @@ lean-beam refresh "T.lean"
210204

211205
Practical boundary:
212206

213-
- use `lean-beam deps "T.lean"` to inspect direct imports when choosing likely upstream modules
214207
- this is a targeted recovery loop, not a full dependency scheduler
215208
- if retries keep walking additional modules, or if you need final workspace trust, stop and run
216209
`lake build`
@@ -244,8 +237,6 @@ itself to prove the dependency cone is fresh.
244237

245238
```bash
246239
lean-beam ensure
247-
lean-beam deps "B.lean"
248-
249240
# make a real edit in A.lean and save the source file to disk
250241
lean-beam sync "A.lean"
251242
lean-beam run-at "B.lean" 12 2 "#check someNameFromA"

‎tests/test-beam-wrapper.sh‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -745,35 +745,35 @@ EOF
745745
cd "$tmp3"
746746
deps_out="$("$beam_script" lean-deps SaveSmoke/A.lean)"
747747
if [ "$(RUNAT_JSON_PAYLOAD="$deps_out" read_json_text_field ok)" != "true" ]; then
748-
echo "expected wrapper lean-deps to succeed despite unrelated broken files" >&2
748+
echo "expected hidden lean-deps compatibility alias to succeed despite unrelated broken files" >&2
749749
printf '%s\n' "$deps_out" >&2
750750
exit 1
751751
fi
752752
if ! printf '%s\n' "$deps_out" | grep -q '"name": "SaveSmoke.B"'; then
753-
echo "expected lean-deps imports to include SaveSmoke.B" >&2
753+
echo "expected hidden lean-deps compatibility alias imports to include SaveSmoke.B" >&2
754754
printf '%s\n' "$deps_out" >&2
755755
exit 1
756756
fi
757757
if ! printf '%s\n' "$deps_out" | grep -q '"name": "SaveSmoke"'; then
758-
echo "expected lean-deps importedBy to include SaveSmoke" >&2
758+
echo "expected hidden lean-deps compatibility alias importedBy to include SaveSmoke" >&2
759759
printf '%s\n' "$deps_out" >&2
760760
exit 1
761761
fi
762762
stats_out="$("$beam_script" stats)"
763763
if [ "$(RUNAT_JSON_PAYLOAD="$stats_out" read_json_text_field result.sessions.lean.active)" != "false" ]; then
764-
echo "expected lean-deps not to start a live Lean session" >&2
764+
echo "expected hidden lean-deps compatibility alias not to start a live Lean session" >&2
765765
printf '%s\n' "$stats_out" >&2
766766
exit 1
767767
fi
768768
session_starts="$(RUNAT_JSON_PAYLOAD="$stats_out" read_json_text_field result.byBackend.lean.sessionStarts)"
769769
if [ "${session_starts:-0}" -ne 0 ]; then
770-
echo "expected lean-deps not to start any Lean sessions" >&2
770+
echo "expected hidden lean-deps compatibility alias not to start any Lean sessions" >&2
771771
printf '%s\n' "$stats_out" >&2
772772
exit 1
773773
fi
774774
deps_count="$(RUNAT_JSON_PAYLOAD="$stats_out" read_json_text_field result.byBackend.lean.ops.deps.count)"
775775
if [ "${deps_count:-0}" -lt 1 ]; then
776-
echo "expected lean-deps stats to record at least one deps request" >&2
776+
echo "expected hidden lean-deps compatibility alias stats to record at least one deps request" >&2
777777
printf '%s\n' "$stats_out" >&2
778778
exit 1
779779
fi

0 commit comments

Comments
 (0)