ambitgraph 0.9.6__tar.gz → 0.9.8__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (118) hide show
  1. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/MANIFEST.in +1 -2
  2. {ambitgraph-0.9.6/ambitgraph.egg-info → ambitgraph-0.9.8}/PKG-INFO +1 -1
  3. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/edge.py +2 -2
  4. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/grant.py +11 -11
  5. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/ambit-mapllm-contract.md +5 -5
  6. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/daemon.py +7 -11
  7. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/contract.py +18 -17
  8. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/fastapi_pack.py +6 -6
  9. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/supabase_pack.py +1 -1
  10. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/langmirror.py +38 -76
  11. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/load.py +4 -7
  12. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/mapllm.py +1 -1
  13. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/model.py +3 -6
  14. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/orchestrate.py +47 -89
  15. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/registry.py +79 -109
  16. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/serve.py +36 -46
  17. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/export.py +8 -12
  18. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/ledger.py +35 -45
  19. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/_delimited.py +105 -9
  20. ambitgraph-0.9.8/ambitgraph/architecture.py +397 -0
  21. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/cli.py +40 -60
  22. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/codelib.py +58 -167
  23. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/config.py +9 -8
  24. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/design_tokens.py +1 -0
  25. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/docs_discovery.py +1 -1
  26. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/duplication.py +19 -25
  27. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/edges.py +89 -99
  28. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/estimate.py +28 -31
  29. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/explain_stage.py +18 -5
  30. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/families.py +5 -5
  31. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/feeds.py +1 -1
  32. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/gate.py +10 -11
  33. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/gate_check.py +2 -3
  34. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/inventory.py +49 -37
  35. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/jscalls.py +108 -102
  36. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/jsobjects.py +4 -2
  37. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/langs.py +196 -122
  38. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/merge.py +185 -208
  39. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/merge_jsp.py +1 -1
  40. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/objects.py +177 -35
  41. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/__init__.py +30 -39
  42. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/classdiagram.js +2 -2
  43. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/graph.js +10 -16
  44. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/insideview.js +1 -1
  45. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/library.js +29 -29
  46. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/next_embed.css +2 -2
  47. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/paths.js +4 -5
  48. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/standalone.py +1 -1
  49. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/wholemap.js +3 -3
  50. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/parameterize.py +61 -79
  51. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/pipeline.py +34 -16
  52. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/portal.py +92 -92
  53. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/prompts.py +2 -3
  54. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/pyshapes.py +73 -36
  55. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/report.py +25 -31
  56. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/shell.py +947 -916
  57. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/symbols.py +1964 -1286
  58. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/text_capture.py +6 -21
  59. {ambitgraph-0.9.6 → ambitgraph-0.9.8/ambitgraph.egg-info}/PKG-INFO +1 -1
  60. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph.egg-info/SOURCES.txt +1 -0
  61. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/pyproject.toml +1 -1
  62. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/LICENSE +0 -0
  63. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/README.md +0 -0
  64. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/__init__.py +0 -0
  65. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/envelope.py +0 -0
  66. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/fields.py +0 -0
  67. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_contracts/household.py +0 -0
  68. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/__init__.py +0 -0
  69. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/__main__.py +0 -0
  70. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/ambit-map-enrich.md +0 -0
  71. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/assistant.py +0 -0
  72. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/cli.py +0 -0
  73. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/__init__.py +0 -0
  74. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/express_pack.py +0 -0
  75. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/flask_pack.py +0 -0
  76. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_map/dialects/nextjs_pack.py +0 -0
  77. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/__init__.py +0 -0
  78. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/cli.py +0 -0
  79. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/responsibility.py +0 -0
  80. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambit_telegraph/store.py +0 -0
  81. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/WALKTHROUGH.md +0 -0
  82. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/__init__.py +0 -0
  83. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/__main__.py +0 -0
  84. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/cockpit.py +0 -0
  85. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/console.py +0 -0
  86. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/demo.py +0 -0
  87. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/doctor.py +0 -0
  88. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/emit.py +0 -0
  89. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/engine_identity.py +0 -0
  90. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/eval.py +0 -0
  91. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/explain.py +0 -0
  92. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/gate_server.py +0 -0
  93. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/harvest.py +0 -0
  94. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/html_safe.py +0 -0
  95. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/jsonlines.py +0 -0
  96. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/mds.py +0 -0
  97. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/_init_js.py +0 -0
  98. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/charts.js +0 -0
  99. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/escape.js +0 -0
  100. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/filterpanel.js +0 -0
  101. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/objectcard.js +0 -0
  102. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/search.js +0 -0
  103. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/omniscient_next/siderail.js +0 -0
  104. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/pycalls.py +0 -0
  105. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/ratify.py +0 -0
  106. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/reports.py +0 -0
  107. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/responsibility.py +0 -0
  108. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/sample.py +0 -0
  109. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/secretary.py +0 -0
  110. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/stages.py +0 -0
  111. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/tables.py +0 -0
  112. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/tasks.py +0 -0
  113. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph/urcode.py +0 -0
  114. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph.egg-info/dependency_links.txt +0 -0
  115. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph.egg-info/entry_points.txt +0 -0
  116. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph.egg-info/requires.txt +0 -0
  117. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/ambitgraph.egg-info/top_level.txt +0 -0
  118. {ambitgraph-0.9.6 → ambitgraph-0.9.8}/setup.cfg +0 -0
@@ -7,8 +7,7 @@ prune docs
7
7
  prune build
8
8
  prune dist
9
9
 
10
- # Development evidence directories (screenshots, transcripts, review notes).
11
- # Both spellings: the dated evidence-* folders and the single evidence/ folder they moved into.
10
+ # Development evidence folders, in both spellings, never ship.
12
11
  prune evidence-*
13
12
  prune evidence
14
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ambitgraph
3
- Version: 0.9.6
3
+ Version: 0.9.8
4
4
  Summary: Read-only codebase scan: reusable units, families, roles, ownership candidates, duplication.
5
5
  Author: AmbitGraph
6
6
  License-Expression: Apache-2.0
@@ -122,8 +122,8 @@ def edge_key(edge_kind, seat_a, seat_b) -> tuple:
122
122
 
123
123
 
124
124
  def edge_state(edge_events, edge_kind, seat_a, seat_b):
125
- """`None` means NO EVENT EXISTS -- never `"off"`. That distinction is
126
- the whole reason the implicit edge composes cleanly with the explicit
125
+ """`None` means NO EVENT EXISTS -- never `"off"`. Keeping the two apart
126
+ is why the implicit edge composes cleanly with the explicit
127
127
  ones (see the module docstring). The LAST matching event in LIST order
128
128
  wins -- never sorted by `ts`, the same ordering law as every other
129
129
  reduction in this contract (`role_of`'s twin)."""
@@ -151,11 +151,10 @@ def grant_is_active(grant, now: datetime, *, tokens_spent: int = 0,
151
151
 
152
152
  # The closed vocabulary `grant_is_active`'s own off-path walk can honestly
153
153
  # produce -- 'active' plus the six OFF paths, in the exact order
154
- # `grant_is_active` checks them. A PURE ADDITION: the Telegraph's own two
155
- # extra verdicts ('ambiguous', 'meter-unreadable') do NOT belong here -- a
156
- # package that does no I/O can never know a file is torn or that a
157
- # registry holds two records sharing an id, so an enum value this module
158
- # can never honestly return would be a lie.
154
+ # `grant_is_active` checks them. The Telegraph's own extra verdict
155
+ # ('ambiguous') does NOT belong here -- a package that does no I/O can never
156
+ # know that a registry holds two records sharing an id, so an enum value
157
+ # this module can never honestly return would be a lie.
159
158
  GRANT_VERDICTS = (
160
159
  "active", "absent", "master-off", "revoked", "expired",
161
160
  "tokens-exhausted", "turns-exhausted",
@@ -165,12 +164,13 @@ GRANT_VERDICTS = (
165
164
  def grant_liveness(grant, now: datetime, *, tokens_spent: int = 0,
166
165
  turns_spent: int = 0, revoked_ids=(),
167
166
  master_off: bool = False) -> str:
168
- """The verdict twin of `grant_is_active` -- a PURE ADDITION, and
169
- `grant_is_active` itself is not touched by one character. The boolean is
170
- decided in exactly ONE place: this function calls `grant_is_active` with
171
- the identical arguments first, and returns 'active' the moment it says
172
- True. `grant_liveness` never re-derives the rule and can never disagree
173
- with the function that is actually executed in production.
167
+ """The verdict twin of `grant_is_active`: it returns 'active' or the
168
+ name of the first OFF path that holds, while `grant_is_active` stays
169
+ the boolean. The boolean is decided in exactly ONE place: this
170
+ function calls `grant_is_active` with the identical arguments first,
171
+ and returns 'active' the moment it says True. `grant_liveness` never
172
+ re-derives the rule and can never disagree with the function that
173
+ decides the boolean.
174
174
 
175
175
  Only on False does this function walk the off-paths -- and it walks
176
176
  them in `grant_is_active`'s OWN order (master off, revoked, expired,
@@ -264,12 +264,12 @@ A refused draft never renders as an empty or zero judged plane — a plane that
264
264
  counts as a plane that loaded empty. Every other field this document does not name is tolerated
265
265
  additively: an unrecognised key is ignored, never a reason to refuse the whole file.
266
266
 
267
- ## What the acceptance of a real repository taught
267
+ ## Six ways a conforming file can still mislead
268
268
 
269
- The rules above are the shapes; running a real assistant against a real, unmodified public
270
- repository end to end found six ways a conforming file — or the run that produces it — can still
271
- mislead a reader even while it parses cleanly. Each is a rule for the assistant writing these
272
- files directly, not a change to the shapes themselves.
269
+ The rules above are the shapes; beyond them there are
270
+ six ways a conforming file — or the run that produces it — can still mislead a reader even
271
+ while it parses cleanly. Each is a rule for the assistant
272
+ writing these files directly, not a change to the shapes themselves.
273
273
 
274
274
  - **`parent` is a verbatim anchor, or the empty string — never prose, and never an external
275
275
  framework's name.** It is the exact `file::hook` text some other unit's own `anchor` field
@@ -1070,17 +1070,13 @@ def launch(args, out_dir, repo, idle_minutes, budget_s=None,
1070
1070
  instead and never calls this function at all) from this module's own
1071
1071
  invocation_form() plus the literal " map", and passes it through.
1072
1072
  `cmd=None` (the default) is resolved HERE the same way, from THIS
1073
- process's own argv0/executable -- so a caller that never heard of
1074
- this parameter (an existing test, an older caller) still gets a
1075
- real, typeable stop instruction rather than a KeyError.
1076
-
1077
- `cmd_name`, new for mapllm support: threaded to child_argv()
1078
- unchanged (see its own docstring), and
1079
- used to resolve `cmd` itself when the caller leaves it None -- "map"
1080
- (the default, byte-unchanged) or "mapllm". Every existing caller
1081
- either passes `cmd` explicitly (cmd_map does) or never heard of
1082
- `cmd_name` at all, so this default resolution changes nothing for
1083
- them.
1073
+ process's own argv0/executable -- so a caller that leaves `cmd` out
1074
+ still gets a real, typeable stop instruction rather than a KeyError.
1075
+
1076
+ `cmd_name` is threaded to child_argv() unchanged (see its own
1077
+ docstring), and used to resolve `cmd` itself when the caller leaves
1078
+ it None -- "map" (the default) or "mapllm". A caller that passes
1079
+ `cmd` explicitly (cmd_map does) never reaches that resolution.
1084
1080
 
1085
1081
  Returns (exit_code, lines_to_print, url_to_open_or_None). cmd_map is a
1086
1082
  thin caller: print each line, then orch.open_browser(url, not
@@ -354,10 +354,10 @@ def literal_string_arg_and_rest(args_text):
354
354
  if i >= n or s[i] not in ('"', "'"):
355
355
  return None, "" # bare name, attribute, or no immediate quote at all
356
356
  if prefix.lower() not in ("", "r"):
357
- return None, "" # f/F/rf/fr/b/B/rb/br -- never a literal in v1
357
+ return None, "" # f/F/rf/fr/b/B/rb/br -- never read as a literal
358
358
  quote = s[i]
359
359
  if s[i:i + 3] == quote * 3:
360
- return None, "" # triple-quoted route paths are not supported in v1
360
+ return None, "" # triple-quoted route paths are not supported
361
361
  j = i + 1
362
362
  buf = []
363
363
  closed = False
@@ -571,7 +571,7 @@ def attribute_tail(text):
571
571
 
572
572
  def attribute_head(text):
573
573
  """The FIRST identifier in a simple dotted attribute chain
574
- (`members.router` -> "members", `a.b.c` -> "a") -- None on the exact
574
+ (`ledgers.router` -> "ledgers", `a.b.c` -> "a") -- None on the exact
575
575
  same grammar attribute_tail refuses (a bare name, a call, a
576
576
  subscript, or anything else that is not a plain dotted chain of
577
577
  identifiers). Exists so an attribute-form mount argument's own HEAD
@@ -598,7 +598,10 @@ def attribute_head(text):
598
598
  # already handed to it, matching every other helper in this module.
599
599
  # ---------------------------------------------------------------------------
600
600
 
601
- _PY_FROM_IMPORT_HEADER_RE = re.compile(r'(?m)^[ \t]*from[ \t]+(\.*)([\w.]*)[ \t]+import\b')
601
+ # The gap after "from" is the whole run of spaces and tabs when a dotted name follows it, else the run but its last
602
+ # character, which the blank before "import" then takes; possessive runs read a long gap once, never re-split.
603
+ _PY_FROM_IMPORT_HEADER_RE = re.compile(r'(?m)^[ \t]*from(?:[ \t]++(?=[\w.])|(?:[ \t](?=[ \t]))++)'
604
+ r'(\.*+)([\w.]*+)[ \t]+import\b')
602
605
  _PY_IMPORT_RE = re.compile(r'(?m)^[ \t]*import[ \t]+([\w.]+)(?:[ \t]+as[ \t]+([A-Za-z_]\w*))?')
603
606
  _PY_IMPORT_NAME_RE = re.compile(r'^[A-Za-z_]\w*$')
604
607
 
@@ -607,10 +610,9 @@ def _py_clause_span(text, import_kw_end):
607
610
  """(start, end) of a from-import clause -- the names between `import`
608
611
  and the end of the statement, in `text`. A parenthesized clause's
609
612
  span (balanced-paren scan) covers every physical line it spans --
610
- `from .routers import (\\n members,\\n ...\\n)` reads correctly
611
- as one clause, the corpus's own DOMINANT multi-line shape (a
612
- representative "ten aggregates, each contributing a router"
613
- file). A bare (non-parenthesized) clause runs to the end of its own
613
+ `from .routers import (\\n ledgers,\\n ...\\n)` reads correctly
614
+ as one clause, the common multi-line shape (one file importing
615
+ several router modules at once). A bare (non-parenthesized) clause runs to the end of its own
614
616
  physical line only -- a backslash line continuation on a bare clause
615
617
  is not followed, never guessed at past it. None for an unterminated
616
618
  `(` -- the whole clause is simply not read, never guessed at. BY-VALUE
@@ -666,9 +668,8 @@ def py_import_maps(blanked_text):
666
668
  name_imports, so module_spec stays "" downstream
667
669
  and the renderer's own never-guess path (legacy
668
670
  name-coincidence resolution, then the honest
669
- MOUNT_UNRESOLVED note) applies -- exactly the
670
- posture the pre-existing legacy path already took
671
- on this same input before this map existed. A
671
+ MOUNT_UNRESOLVED note) applies -- the legacy
672
+ path's own posture on this same input. A
672
673
  name bound to the SAME target more than once
673
674
  (`from .auth import bp` repeated, or reached via
674
675
  two equivalent clauses) is unaffected -- there is
@@ -676,18 +677,18 @@ def py_import_maps(blanked_text):
676
677
  module_imports -- bound_alias -> module_spec for every plain `import
677
678
  <module_spec> [as <bound_alias>]` -- e.g. `import
678
679
  routers.users as u` yields module_imports["u"] ==
679
- "routers.users"; `import members` (no alias, one
680
- segment) yields module_imports["members"] ==
681
- "members". A DOTTED plain import with no alias
680
+ "routers.users"; `import ledgers` (no alias, one
681
+ segment) yields module_imports["ledgers"] ==
682
+ "ledgers". A DOTTED plain import with no alias
682
683
  (`import routers.users`) binds only the top
683
684
  package name in real Python, one hop short of what
684
685
  a two-segment attribute mount needs -- never
685
686
  guessed at, so it contributes nothing.
686
687
 
687
688
  Together with attribute_head_module_spec (below), these cover the
688
- ATTRIBUTE-FORM mount head (`include_router(members.router, ...)`) --
689
- including the corpus's own dominant shape, `from .routers import
690
- (members, ...)` then `members.router`: Python's `from package import
689
+ ATTRIBUTE-FORM mount head (`include_router(ledgers.router, ...)`) --
690
+ including the common shape, `from .routers import
691
+ (ledgers, ...)` then `ledgers.router`: Python's `from package import
691
692
  name` is ambiguous between "name is an object inside package" and
692
693
  "name is a submodule of package"; attribute_head_module_spec resolves
693
694
  that ambiguity the only way an attribute-mount head CAN (the
@@ -146,9 +146,9 @@ def extract(files, model):
146
146
  # says so
147
147
  # The attribute's own HEAD resolves through this
148
148
  # file's own `import <module_spec> [as head]` or `from
149
- # <module_spec> import head` -- the corpus's own DOMINANT
150
- # shape (`from .routers import (members, ...)` then
151
- # `members.router`). declared_name is the attribute's
149
+ # <module_spec> import head` -- the common
150
+ # shape (`from .routers import (ledgers, ...)` then
151
+ # `ledgers.router`). declared_name is the attribute's
152
152
  # tail either way.
153
153
  head = contract.attribute_head(parts[0])
154
154
  mod = contract.attribute_head_module_spec(head, module_imports, name_imports)
@@ -162,9 +162,9 @@ def extract(files, model):
162
162
  if not found:
163
163
  # NO prefix= at all -- a REAL mount at the
164
164
  # application root (FastAPI's own default), not "nothing
165
- # to say" -- this is the DOMINANT shape on a real corpus
166
- # (`app.include_router(members.router)`, no prefix=
167
- # anywhere), which used to vanish here entirely.
165
+ # to say" -- this is the common shape
166
+ # (`app.include_router(ledgers.router)`, no prefix=
167
+ # anywhere), and it is recorded as a root mount.
168
168
  mounts.append(contract.Mount(prefix="", router_name=router_name, uid=uid, line=line,
169
169
  module_spec=module_spec, declared_name=declared_name,
170
170
  root=True))
@@ -51,7 +51,7 @@ _CHAIN_CONTINUES = ".),"
51
51
 
52
52
  # Realtime channel table refs --
53
53
  # `<client>.channel(...).on('postgres_changes', {..., table: 'name'})`.
54
- # JS/TS only in v1 (SUPABASE_BLIND_REALTIME says so) -- the Python client's
54
+ # JS/TS only (SUPABASE_BLIND_REALTIME says so) -- the Python client's
55
55
  # equivalent is a differently-named method (on_postgres_changes), not this
56
56
  # same call shape, and adding it is out of scope here.
57
57
  CHANNEL_RE = re.compile(r'\b([A-Za-z_$][\w$]*)\s*\.\s*channel\s*\(')
@@ -6,9 +6,8 @@ copy + MAPLLM_EXTRA_INCLUDE_EXT, ambit_map/registry.py's JS_LANGS/PY_LANGS/
6
6
  ROUTEDNESS_LANGS, ambit_map/paths.py's KIND_READER_LANGS/_GRAMMAR_EXTS, and
7
7
  ambit_map/library.py's own blind-sentence language vocabulary. Every value
8
8
  below is UNCHANGED from what its scattered original held -- this module
9
- only gives them one address; see each field's own comment for its prior
10
- location, and the module-docstring note below for the no-member-deletion
11
- rule.
9
+ only gives them one address; see the module-docstring note below for
10
+ the no-member-deletion rule.
12
11
 
13
12
  THE WALL (tests/test_import_boundaries.py's violations helper, the
14
13
  ambit_map stdlib-only rule inside rule_message, and that file's own
@@ -18,15 +17,13 @@ shared-stdlib-only package -- there was never a choice of a third shared
18
17
  package; the wall forecloses it outright, by architectural rule. So this
19
18
  module cannot import ambitgraph/
20
19
  langs.py and DERIVE its values the way ambitgraph/symbols.py, edges.py,
21
- config.py and codelib.py now derive theirs from langs.py -- it is instead
20
+ config.py and codelib.py derive theirs from langs.py -- it is instead
22
21
  an ASSERTED COPY: every value below is retyped by hand, checked against
23
22
  langs.py's own values ONLY by a TEST (tests/test_langs_mirror_diff.py),
24
- NEVER by any import at runtime. This is not a new exception -- the
25
- identical both-sides-import shape is already live at
23
+ NEVER by any import at runtime. The same both-sides-import shape is
26
24
  tests/test_map_serve.py's own
27
25
  test_engine_include_ext_is_duplicated_by_value_and_never_drifts test
28
- (ENGINE_DEFAULT_INCLUDE_EXT vs ScanConfig().include_ext), which this
29
- module's own admission field below continues rather than replaces.
26
+ (ENGINE_DEFAULT_INCLUDE_EXT vs ScanConfig().include_ext).
30
27
 
31
28
  Unlike ambitgraph/langs.py (which imports `re` and `dataclasses` for its
32
29
  own LangSpec declarations), this module is a pure, dependency-free LEAF:
@@ -58,10 +55,8 @@ writes.
58
55
  # through ambitgraph/symbols.py's config_hash and through the cross-import
59
56
  # equality pin at tests/test_map_serve.py's own
60
57
  # test_engine_include_ext_is_duplicated_by_value_and_never_drifts test
61
- # (see that engine module's own docstring for the full argument). Formerly
62
- # hand-duplicated separately inside ambit_map/orchestrate.py;
63
- # orchestrate.py now aliases this tuple instead of carrying its own
64
- # literal.
58
+ # (see that engine module's own docstring for the full argument).
59
+ # orchestrate.py aliases this tuple instead of carrying its own literal.
65
60
  # ===========================================================================
66
61
  ENGINE_DEFAULT_INCLUDE_EXT = (
67
62
  ".py", ".js", ".ts", ".tsx", ".jsx", ".java", ".jsp", ".jspf",
@@ -70,32 +65,26 @@ ENGINE_DEFAULT_INCLUDE_EXT = (
70
65
  ".cpp", ".cc", ".hpp", ".hh",
71
66
  # Swift -- tail-append, mirroring langs.py's own tuple exactly.
72
67
  ".swift",
68
+ # Rust -- tail-append, mirroring langs.py's own tuple exactly.
69
+ ".rs",
73
70
  )
74
71
 
75
72
  # The extra extensions a mapllm run admits beyond the shared engine default
76
- # above -- in world-popularity order, the C++ foundation first (formerly
77
- # ambit_map/orchestrate.py's own
78
- # MAPLLM_EXTRA_INCLUDE_EXT literal; this constant is not part of
73
+ # above -- (this constant is not part of
79
74
  # ambitgraph/langs.py at all -- it is this product's OWN scope extension,
80
75
  # mirrored here only so orchestrate.py can source every admission fact
81
- # from this one file). ".c"/".h" left this tuple once they gained a real
82
- # LangSpec: they are ENGINE_DEFAULT_INCLUDE_EXT members above now, not a
83
- # mapllm-only widening.
84
- # ".cpp"/".hpp" LEFT this list in the same commit that admitted them to the
85
- # engine tuple and gave them a grammar -- the ".c"/".h" precedent exactly. An
86
- # extension in BOTH lists is the double-admission defect: orchestrate
87
- # concatenates them, so it would arrive twice in Plan.include_ext. A test
88
- # asserts the two sets are disjoint at any tree state.
76
+ # from this one file).
77
+ # An extension in BOTH this list and ENGINE_DEFAULT_INCLUDE_EXT is a
78
+ # double admission: orchestrate concatenates them, so it would arrive twice
79
+ # in Plan.include_ext. A test asserts the two sets are disjoint.
89
80
  #
90
- # ".kt" AND ".kts" join as Kotlin moves into the mapllm lane -- ONE
81
+ # ".kt" AND ".kts" are admitted together -- ONE
91
82
  # admission, TWO extensions, because
92
83
  # .kts (Kotlin Script: build.gradle.kts and friends) is the SAME language read
93
84
  # by the SAME lexer, and its grammarless entry is a value copy of .kt's. They
94
85
  # are admitted together because admitting only .kt would leave .kts files
95
86
  # unmanifested: an unadmitted extension is not reported as skipped, it is
96
87
  # simply absent from every coverage surface, so the omission would be silent.
97
- # Measured on the reference corpus at sha dfcfab38248eaad2482fca86f6b2967316c95d73:
98
- # 573 .kt and 44 .kts -- 44 of 617 Kotlin files, silently missing.
99
88
  # They satisfy the disjointness rule above BY CONSTRUCTION: Kotlin has no
100
89
  # LangSpec and no extractor, so neither extension is an
101
90
  # ENGINE_DEFAULT_INCLUDE_EXT member and neither can double-admit -- it is read
@@ -104,13 +93,15 @@ ENGINE_DEFAULT_INCLUDE_EXT = (
104
93
  # into include_ext, which is the first of the twelve config_hash keys) and does
105
94
  # NOT move it for a caller-supplied --config, which plan() leaves byte-verbatim.
106
95
  # Appended at the tail like every other widening.
107
- MAPLLM_EXTRA_INCLUDE_EXT = (".rs", ".kt", ".kts")
96
+ # ".rs" LEFT this list the same way ".c"/".h"/".cpp"/".hpp" did, the moment
97
+ # Rust gained a real LangSpec: it is an ENGINE_DEFAULT_INCLUDE_EXT member
98
+ # above now, not a mapllm-only widening.
99
+ MAPLLM_EXTRA_INCLUDE_EXT = (".kt", ".kts")
108
100
 
109
101
 
110
102
  # ===========================================================================
111
103
  # Naming's product-side grouping (a third spelling of the naming
112
- # vocabulary) -- formerly ambit_map/registry.py's own JS_LANGS/PY_LANGS
113
- # literals, the pair
104
+ # vocabulary) -- JS_LANGS and PY_LANGS, the pair
114
105
  # kind_key's src_lang branch reads. READER-TOLERANCE VOCABULARY (see module
115
106
  # docstring): today ambitgraph/symbols.py's build_file_plane (the only
116
107
  # writer of a file row's `lang` field) folds .jsx/.mjs/.cjs/.ts/.tsx all
@@ -122,12 +113,12 @@ MAPLLM_EXTRA_INCLUDE_EXT = (".rs", ".kt", ".kts")
122
113
  # vocabulary gate at all. PY_LANGS carries no such extra member -- "py" is
123
114
  # the only tag ambitgraph/langs.py's "py" LangSpec ever declares.
124
115
  #
125
- # JAVA_LANGS (additive): the identical one-tag
116
+ # JAVA_LANGS: the identical one-tag
126
117
  # grouping shape as PY_LANGS -- "java" is the only tag ambitgraph/langs.py's
127
118
  # "java" LangSpec ever declares, so this carries no reader-tolerance member
128
119
  # either. Exists as its own named grouping (never folded into JS_LANGS or
129
120
  # PY_LANGS) because kind_key's import branch needs a THIRD disjoint
130
- # src_lang bucket once include/import.java joins include/import.py and
121
+ # src_lang bucket: include/import.java, beside include/import.py and
131
122
  # include/import.js.
132
123
  # ===========================================================================
133
124
  JS_LANGS = ("js", "jsx", "mjs", "cjs", "ts", "tsx")
@@ -185,34 +176,6 @@ GO_LANGS = ("go",)
185
176
  # independently-declared copies, never a cross-wall import.
186
177
  TYPE_SYMBOL_KINDS = ("class", "interface", "enum", "record")
187
178
 
188
- # C_TYPE_SYMBOL_KINDS (the wall-legal PRODUCT-side mirror of
189
- # ambitgraph/codelib.py's own _C_TYPE_SYMBOL_KINDS): the literal kind
190
- # strings symbols.py's extract_c_symbols emits for a C type declaration --
191
- # a tagged bodied "struct"/"union"/"enum", and "typedef". "function" is
192
- # deliberately not a member (it is the callable half, the same boundary
193
- # TYPE_SYMBOL_KINDS draws against "constructor"). "enum" is a member of
194
- # BOTH this tuple and TYPE_SYMBOL_KINDS, and the two language gates are
195
- # disjoint, under the C_LANGS gate above. Diffed against
196
- # ambitgraph.codelib._C_TYPE_SYMBOL_KINDS by tests/test_langs_mirror_diff.py
197
- # (DIFFED_FACT_NAMES entry "c_type_symbol_kinds") -- one origin
198
- # (symbols.py's own kind literals), two independently-declared copies,
199
- # never a cross-wall import.
200
- C_TYPE_SYMBOL_KINDS = ("struct", "union", "enum", "typedef")
201
-
202
- # RB_TYPE_SYMBOL_KINDS (the wall-legal PRODUCT-side mirror
203
- # of ambitgraph/codelib.py's own _RB_TYPE_SYMBOL_KINDS): the literal kind
204
- # strings extract_ruby_symbols emits for a Ruby scope-opener declaration --
205
- # "class" and "module", the two keywords _RB_SCOPE_LINE_RX matches. Unlike
206
- # TYPE_SYMBOL_KINDS/C_TYPE_SYMBOL_KINDS above, this set already includes
207
- # "class" itself (Ruby genuinely has classes), so it feeds BOTH halves of
208
- # codelib.py's carve identically -- the same shape TYPE_SYMBOL_KINDS takes
209
- # for Java, never C's shape (which unions "class" in separately because C
210
- # never emits that literal kind at all). Diffed against ambitgraph.codelib._RB_TYPE_SYMBOL_KINDS
211
- # by tests/test_langs_mirror_diff.py (DIFFED_FACT_NAMES entry
212
- # "rb_type_symbol_kinds") -- one origin (symbols.py's own kind literals),
213
- # two independently-declared copies, never a cross-wall import.
214
- RB_TYPE_SYMBOL_KINDS = ("class", "module")
215
-
216
179
  # NAMESPACE_LANGS (the wall-legal PRODUCT-side mirror of
217
180
  # ambitgraph/langs.py's own NAMESPACE_LANGS): the `lang` tags whose units
218
181
  # get the java-namespace treatment (the languages whose LangSpec declares
@@ -228,14 +191,13 @@ NAMESPACE_LANGS = frozenset({"java", "jsp"})
228
191
 
229
192
 
230
193
  # ===========================================================================
231
- # Formerly ambit_map/registry.py's own ROUTEDNESS_LANGS
232
- # literal. READER-TOLERANCE VOCABULARY, same law as JS_LANGS above: "jspf"
233
- # can never appear as a real `lang` value today (ambitgraph/symbols.py's
194
+ # ROUTEDNESS_LANGS. READER-TOLERANCE VOCABULARY, same law as JS_LANGS
195
+ # above: "jspf" can never appear as a real `lang` value today (ambitgraph/symbols.py's
234
196
  # build_file_plane folds .jspf into the tag "jsp", never into "jspf"
235
197
  # itself) but stays for the identical producer-portability reason.
236
198
  # ambit_map/registry.py re-exports the name (`ROUTEDNESS_LANGS =
237
199
  # langm.ROUTEDNESS_LANGS`), kept alive because
238
- # tests/test_langs_value_pins.py's own locked oracle pin still asserts
200
+ # tests/test_langs_value_pins.py's own locked oracle pin asserts
239
201
  # `reg.ROUTEDNESS_LANGS` by value; no product call site reads it today.
240
202
  # ===========================================================================
241
203
  ROUTEDNESS_LANGS = ("jsp", "jspf", "java")
@@ -339,10 +301,9 @@ KIND_READER_LANGS = {
339
301
 
340
302
 
341
303
  # ===========================================================================
342
- # Product-side mirror -- formerly ambit_map/paths.py's own
343
- # _GRAMMAR_EXTS literal, a hand-kept copy of ambitgraph/symbols.py's
344
- # _LANG_FOR_EXT key set (exactly the extensions with a real comment-
345
- # blanking grammar). Unlike JS_LANGS/PY_LANGS/ROUTEDNESS_LANGS above, this
304
+ # Product-side mirror -- the _GRAMMAR_EXTS set, a hand-kept copy of
305
+ # ambitgraph/symbols.py's _LANG_FOR_EXT key set (exactly the extensions
306
+ # with a real comment-blanking grammar). Unlike JS_LANGS/PY_LANGS/ROUTEDNESS_LANGS above, this
346
307
  # set carries NO reader-tolerance members: it is a copy of the ENGINE's own
347
308
  # key set (every ambitgraph/langs.py LangSpec's naming_exts, unioned), not
348
309
  # a copy of a possibly-foreign `lang` value's vocabulary.
@@ -365,14 +326,17 @@ _GRAMMAR_EXTS = frozenset({
365
326
  # reporting Go's now-parsed facts as grammarless, which is a FALSE
366
327
  # WARNING on the product surface, not a missing one.
367
328
  ".go",
329
+ # Rust -- the same edit, for the twelfth grammar. ".rs" was already
330
+ # admitted (through MAPLLM_EXTRA_INCLUDE_EXT) before it had a grammar; its
331
+ # LangSpec makes it belong here, and grammarless_table_trigger must stop
332
+ # firing on Rust-sourced table facts.
333
+ ".rs",
368
334
  })
369
335
 
370
336
 
371
337
  # ===========================================================================
372
338
  # The disclosure-gate vocabulary -- THE PER-SENTENCE LANGUAGE
373
- # TAG, product side. Formerly ambit_map/library.py's own
374
- # _BLIND_SENTENCE_LANGS/_blind_langs pair; it lives here, with every other
375
- # cross-wall copy.
339
+ # TAG, product side. It lives here, with every other cross-wall copy.
376
340
  #
377
341
  # The engine declares each blind sentence's own languages AT the sentence
378
342
  # (ambitgraph.symbols.BlindSentence's `langs`, empty meaning the sentence
@@ -399,12 +363,10 @@ _GRAMMAR_EXTS = frozenset({
399
363
  # forbids asking the engine for it. The prefix constants and these rows are
400
364
  # held equal by the seam tests, never by an import.
401
365
  #
402
- # The prose-word sniffing this field used to carry (BLIND_LANG_PROSE_WORDS
403
- # plus library.py's compiled _BLIND_LANG_FILTER) is retired: it was an
404
- # all-or-nothing guess read off a sentence's English, wrong in both
405
- # directions (Java-only pages rendering C sentences, C-only pages dropping
406
- # their own call-coverage note), and the tag rows below are the declared
407
- # answer that replaces it.
366
+ # The tags are declared, not read off a sentence's English: a guess from the
367
+ # prose words would be all-or-nothing and would go wrong in both directions (Java-only
368
+ # pages rendering C sentences, C-only pages dropping their own call-coverage
369
+ # note), so the tag rows below state each sentence's languages outright.
408
370
  # ===========================================================================
409
371
  _JSP_JAVA = frozenset({"jsp", "jspf", "java"})
410
372
  _C = frozenset({"c"})
@@ -442,13 +442,10 @@ def load_run(run_dir):
442
442
  # plane routes an edge with an unknown endpoint to
443
443
  # phantom_edges (see _edge_plane's own `dst_raw not in
444
444
  # known_uids or src not in known_uids` branch above) -- this
445
- # plane used to validate ONLY `src`, so a stale or hand-made
446
- # artifact's `through`/`target_file` pointing at a uid this
447
- # scan never read would sail straight through to
448
- # unitpage._member_resolved_rows -> _neighbour_row(model,
449
- # e.target, ...), which falls back to fam.pigment('modules')
450
- # (never raises) but emits reg.href_unit(<nonexistent uid>) --
451
- # a dead link and an unbacked claim on the page. Today's
445
+ # plane checks `through` and `target_file` as well as `src`, because
446
+ # a stale or hand-made artifact's `through`/`target_file` pointing
447
+ # at a uid this scan never read would otherwise enter the model as
448
+ # an edge to a unit this scan never read. Today's
452
449
  # engine only ever emits a "found" chain so this cannot fire
453
450
  # from a fresh scan (build_member_resolved's own contract),
454
451
  # but a stale edges.json is exactly the case this fail-closed
@@ -29,7 +29,7 @@ docstring gives for its lazy import of the same module (serve.py imports
29
29
  orchestrate at its own top level; a module-level import here would be
30
30
  circular for the same reason, one layer further out).
31
31
 
32
- A DISCLOSED v1 LIMIT (no mechanism yet): serve.MapState's own
32
+ A DISCLOSED LIMIT (no mechanism covers it): serve.MapState's own
33
33
  ensure_fresh() rescans the tree on its own schedule (a request-triggered
34
34
  fingerprint check) via a PLAIN orch.run_scan(self.plan) call, with no
35
35
  `run_dir=` and no knowledge of the conductor thread -- if that rescan
@@ -52,9 +52,8 @@ class UnresolvedRef:
52
52
  kind: str
53
53
  line: int
54
54
  plane: str
55
- # Additive reason code: "" (the default) is byte-identical to every
56
- # earlier UnresolvedRef -- every existing keyword-only construction
57
- # site stays valid unchanged.
55
+ # Reason code: "" (the default) carries no reason, so a
56
+ # keyword-only construction site may omit it.
58
57
  # "cross_root_import_held" marks an import HELD on the cross-root
59
58
  # tier of its language's own evidence ladder (ambitgraph/edges.py's
60
59
  # ladder for Python -- neither '' nor the importer's own derived
@@ -68,9 +67,7 @@ class UnresolvedRef:
68
67
  # same token, byte-identically, for a java-sourced cross-root hold,
69
68
  # rather than minting a java-named twin (the sentence text itself
70
69
  # already names no language, by deliberate choice -- see registry.py's
71
- # CROSS_ROOT_IMPORT_HELD_SENTENCE). (Was "ambiguous_import_roots"
72
- # before the ladder change renamed it; see edges.py's own docstring
73
- # for why the old name no longer names a distinct state.) A machine
70
+ # CROSS_ROOT_IMPORT_HELD_SENTENCE). A machine
74
71
  # token is an interface, so this one keeps the same posture as
75
72
  # cross_root_import_held -- each ships WITH its own registry.py
76
73
  # sentence, never a free-text reason (a free-text