Skip to content

armgit / laya

Public Imported from GitHub
0

Non-autoregressive System 1 decision engine. Typed choice, score and yes/no decisions over any text in a single forward pass, in 100+ languages, with a router that picks the right checkpoint per request.

docs(index): routing and the HTTP API have pages; link them from the front door

Aashish3699eb1129c2
diff --git a/docs/index.md b/docs/index.md
index 654f0cf2..62c91840 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -23,6 +23,8 @@ is one copy to keep current.
| adopt Laya incrementally without granting execution permission | [Staged adoption](staged-adoption.md) |
| route, screen or triage inside a LangChain or LangGraph app | [LangChain & LangGraph](langchain.md) |
| run Laya from a terminal or connect its built-in MCP stdio server | [Command line and MCP server](cli-mcp.md) |
+| hand each request to the checkpoint that fits its language and task | [Routing](routing.md) |
+| call Laya over HTTP from a client written against the Jev wire protocol | [HTTP API](http-api.md) |
| run the SDK or the `laya-serve` HTTP API in a container, on CPU or an NVIDIA GPU | [Docker quickstart](docker.md) |
| build for ARM64 hosts or DGX Spark | [ARM64 and DGX Spark containers](docker-platforms.md) |
| specialise a checkpoint for your own decisions | [Browser-agent fine-tuning example](finetune_browser_agent.md) and the [fine-tuning notebook](https://github.com/NandhaKishorM/laya/blob/main/notebooks/laya_finetune_typed_decisions_2xT4_kaggle.ipynb) |
@@ -30,5 +32,5 @@ is one copy to keep current.
| look up a class, function or parameter | [Python API reference](reference/index.md) |
| score a labelled dataset, compare to a baseline, or gate a build on it | [Evaluation harness](evals.md) |
-Routing, the HTTP API and confidence gating are in the
-[README](https://github.com/NandhaKishorM/laya#readme) for now.
+Confidence gating is in the
+[README](https://github.com/NandhaKishorM/laya#automated-confidence-gating) for now.
diff --git a/tests/test_doc_citations.py b/tests/test_doc_citations.py
index ce4986fb..46330aab 100644
--- a/tests/test_doc_citations.py
+++ b/tests/test_doc_citations.py
@@ -110,6 +110,9 @@ DBLCOLON = re.compile(r'(?P<file>[A-Za-z0-9_.\-/]+\.py)::(?P<name>[A-Za-z_][A-Za
r'(?:\.[A-Za-z_][A-Za-z0-9_]*)?)')
LINECITE = re.compile(r'(?P<file>[A-Za-z0-9_.\-/]+\.py):(?P<a>\d+)(?:\s*-\s*(?P<b>\d+))?')
IDENT = re.compile(r'`(?P<name>[A-Za-z_][A-Za-z0-9_]*(?:\.[A-Za-z_][A-Za-z0-9_]*)*)`')
+# `docs/index.md`'s deferral sentence: "<topics> is/are in the [README](...) for now."
+DEFERRAL = re.compile(r'(?P<topics>[A-Za-z0-9 ,&/]+?)\s+(?:is|are) in the\s+'
+ r'\[README\]\([^)]*\)\s*for now\.')
# What may sit between a backticked symbol and the citation after it. Punctuation and spacing
# cover both live idioms -- "`Foo.bar` (`file:12`)" and "`Foo.bar`, (`file:12`)" -- and the
@@ -212,8 +215,44 @@ def positive_controls() -> None:
got is None, got)
+def landing_page() -> None:
+ """``docs/index.md`` is the site's front door, and it used to send three topics back to the
+ README -- two of which have pages in this tree. A reader who trusts that sentence never finds
+ them, so hold it to the tree: a topic the front door defers must have no page here, and every
+ page it links must exist. The first half is the drift that actually happens (a page is added,
+ the front door is not told); the second is the row this fix added."""
+ path = os.path.join(ROOT, "docs", "index.md")
+ text = open(path, encoding="utf-8").read()
+ pages = sorted(f[:-3] for f in os.listdir(os.path.join(ROOT, "docs")) if f.endswith(".md"))
+ check_true("the landing-page check can see the guide pages", len(pages) >= 20,
+ "only %d docs/*.md pages" % len(pages))
+
+ deferred = DEFERRAL.search(text)
+ check_true("the landing page still defers something to the README", deferred is not None,
+ "the `... is/are in the [README](...) for now.` sentence is gone, so this check "
+ "has nothing to hold -- delete it deliberately, not by accident")
+ if deferred is None:
+ return
+ topics = [t.strip() for t in re.split(r",| and ", deferred.group("topics")) if t.strip()]
+ check_true("the deferral lists the topics by name", len(topics) >= 1, topics)
+ for topic in topics:
+ slug = re.sub(r"\s+", "-", re.sub(r"^the\s+", "", topic.lower()).strip())
+ check_true("the README-only claim about %r has no page in this tree" % topic,
+ slug not in pages,
+ "docs/%s.md exists, so the front door has to link it instead of deferring it"
+ % slug)
+
+ links = [l for l in re.findall(r"\]\(([^)#\s]+\.md)\)", text) if not l.startswith("http")]
+ broken = [l for l in links
+ if not os.path.exists(os.path.join(ROOT, "docs", l.replace("/", os.sep)))]
+ check_true("every guide the landing page links exists", not broken, broken)
+ check_true("the landing-page link check has subjects", len(links) >= 10,
+ "only %d relative links: %s" % (len(links), links))
+
+
def main() -> int:
positive_controls()
+ landing_page()
files = text_files()
check_true("the scan covers the tree", len(files) > 300, "%d text files" % len(files))