Compare commits
4 changed files with 15 additions and 52 deletions
|
|
@ -155,9 +155,11 @@ Manager}` switch picks the MCP tool allow-list claude sees. Both are
|
||||||
ancestor/descendant check instead of a manager-name check — see the
|
ancestor/descendant check instead of a manager-name check — see the
|
||||||
module docs for `loose_ends.rs`, `stores/broker.rs`, `actions.rs`,
|
module docs for `loose_ends.rs`, `stores/broker.rs`, `actions.rs`,
|
||||||
and `workers/crash_watch.rs` for the current owner-check logic in
|
and `workers/crash_watch.rs` for the current owner-check logic in
|
||||||
each. (Reminder cancellation is handled fully in-agent — see the note
|
each. (Question/answer routing and its own manager-override cancel
|
||||||
on `CancelLooseEndKind::Reminder` in
|
path — formerly `hive-c0re/src/questions.rs` and
|
||||||
`hive-c0re/src/socket_server/mod.rs`.)
|
`stores/operator_questions.rs` — has been removed entirely; reminder
|
||||||
|
cancellation is now handled fully in-agent, see the note on
|
||||||
|
`CancelLooseEndKind::Reminder` in `hive-c0re/src/socket_server/mod.rs`.)
|
||||||
|
|
||||||
None of the above is a stable interface — treat the module doc
|
None of the above is a stable interface — treat the module doc
|
||||||
comments as the source of truth for exactly which checks exist today.
|
comments as the source of truth for exactly which checks exist today.
|
||||||
|
|
|
||||||
|
|
@ -472,7 +472,7 @@ Pipeline:
|
||||||
- CommonMark from `nixosOptionsDoc.optionsCommonMark` is the only
|
- CommonMark from `nixosOptionsDoc.optionsCommonMark` is the only
|
||||||
output — the source of truth, emitted as `.md`.
|
output — the source of truth, emitted as `.md`.
|
||||||
- **HTML + CSS is rendered downstream by the website repo**
|
- **HTML + CSS is rendered downstream by the website repo**
|
||||||
(its own `options.nix`), which consumes this bundle's `host.md` /
|
(`nix/options.nix` there), which consumes this bundle's `host.md` /
|
||||||
`agent.md`, renders them with `cmark-gfm`, and shares one
|
`agent.md`, renders them with `cmark-gfm`, and shares one
|
||||||
stylesheet (`docs.css`) across `/options/` and the prose `/docs/`
|
stylesheet (`docs.css`) across `/options/` and the prose `/docs/`
|
||||||
tree. Keeping rendering in the website means the theme has a single
|
tree. Keeping rendering in the website means the theme has a single
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,14 @@
|
||||||
//! `stream-json` line) can expand to several: an `assistant` message with
|
//! `stream-json` line) can expand to several: an `assistant` message with
|
||||||
//! both a text block and a `tool_use` block produces two rows.
|
//! both a text block and a `tool_use` block produces two rows.
|
||||||
//!
|
//!
|
||||||
//! Six fields, and classification belongs **here**, not in the client: the
|
//! Design history: mara's terminal-message redesign (six rounds of
|
||||||
//! web UI renders what it is handed and owns no per-tool dispatch table, so
|
//! negotiation on the forge) collapsed what was an 11-field frontend-side
|
||||||
//! a new tool needs no frontend change. `level` carries styling, so a row
|
//! row shape (`StreamRow`, `frontend/packages/agent/src/lib/streamRow.ts`)
|
||||||
//! never names a CSS class. `kind`, `unread`, `from` and `expanded_default`
|
//! plus raw claude-JSON passthrough into this 6-field shape, with
|
||||||
//! are deliberately absent — adding one back is a design change, not an
|
//! classification moved server-side so the client-side `classifyEvent.ts` —
|
||||||
//! oversight.
|
//! a large per-tool dispatch table — mostly goes away. `kind`, `unread`,
|
||||||
|
//! `from`, and `expanded_default` were all considered and dropped along the
|
||||||
|
//! way; `level` replaces free-text CSS-class styling.
|
||||||
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use std::collections::HashMap;
|
use std::collections::HashMap;
|
||||||
|
|
|
||||||
|
|
@ -9,18 +9,12 @@
|
||||||
# Emits a CI error annotation per hit and exits 1 if any pointer is dead, 0
|
# Emits a CI error annotation per hit and exits 1 if any pointer is dead, 0
|
||||||
# otherwise. Runs as its own job; seconds, pure git+grep.
|
# otherwise. Runs as its own job; seconds, pure git+grep.
|
||||||
#
|
#
|
||||||
# Three arms, because a pointer is written three ways:
|
# Two arms, because a pointer is written two ways:
|
||||||
# root — a repo-root-relative path in prose or a comment, `docs/<dir>/<f>.md`
|
# root — a repo-root-relative path in prose or a comment, `docs/<dir>/<f>.md`
|
||||||
# rel — a markdown link resolved against the linking file, [x](../<dir>/<f>.md)
|
# rel — a markdown link resolved against the linking file, [x](../<dir>/<f>.md)
|
||||||
# path — any repo-relative source path, `<crate>/src/<f>.rs`, `nix/<f>.nix`
|
|
||||||
# (spelled with placeholders on purpose: a literal example path here would be
|
# (spelled with placeholders on purpose: a literal example path here would be
|
||||||
# a dead pointer this script then reports against itself)
|
# a dead pointer this script then reports against itself)
|
||||||
#
|
#
|
||||||
# The third arm carries no skip-list, and could only be built after the prose
|
|
||||||
# it would have flagged was fixed: every false positive was a sentence naming
|
|
||||||
# where something *used to* live. Tolerating those needs a past-tense
|
|
||||||
# heuristic — the permanent carve-out that teaches readers to ignore a gate.
|
|
||||||
#
|
|
||||||
# Scope is every tracked file, deliberately unrestricted by type: prose
|
# Scope is every tracked file, deliberately unrestricted by type: prose
|
||||||
# describes a path in words, and a stale path in a config file (an ignore
|
# describes a path in words, and a stale path in a config file (an ignore
|
||||||
# rule, a build input) is a live defect rather than a stale comment.
|
# rule, a build input) is a live defect rather than a stale comment.
|
||||||
|
|
@ -104,45 +98,10 @@ done < "$tmp/rel"
|
||||||
# something that resolves before a clean run means anything: if a rename, a
|
# something that resolves before a clean run means anything: if a rename, a
|
||||||
# pattern edit or a tree move silences the search, that is a failure of this
|
# pattern edit or a tree move silences the search, that is a failure of this
|
||||||
# script, not a property of the tree.
|
# script, not a property of the tree.
|
||||||
# Third arm: repo-relative paths to any tracked file, not just `docs/**.md`.
|
|
||||||
# A comment naming a moved `.rs` or `.nix` file misleads exactly as much as a
|
|
||||||
# dead doc link, and nothing was checking it.
|
|
||||||
#
|
|
||||||
# Both ends are anchored, and each anchor is there because its absence
|
|
||||||
# invented a path: unanchored, a `.js` extension matched the prefix of a
|
|
||||||
# `.json` one, and a bare `<dir>/` matched mid-path inside `nix/<dir>/…`,
|
|
||||||
# conjuring a top-level twin of a real nested file. (Placeholders, per the
|
|
||||||
# header — a literal here would be a dead path this arm reports against
|
|
||||||
# itself.) `grep -o` has no lookaround, so the boundary char is stripped below.
|
|
||||||
prefix_pattern='(nix|scripts|docs|frontend|branding|hive-[a-z0-9-]+/src|hivectl/src|swarmctl/src|swarm-controller/src)'
|
|
||||||
ext_pattern='(nix|sh|rs|md|ts|tsx|js|css|toml)'
|
|
||||||
path_pattern="(^|[^A-Za-z0-9._/-])${prefix_pattern}/[A-Za-z0-9._/-]+\\.${ext_pattern}($|[^A-Za-z0-9])"
|
|
||||||
|
|
||||||
git ls-files -z | xargs -0 -r grep -nEo "$path_pattern" /dev/null 2>/dev/null \
|
|
||||||
> "$tmp/paths0" || true
|
|
||||||
sed -E 's/^([^:]*:[0-9]+:)[^A-Za-z0-9]?/\1/; s/[^A-Za-z0-9]$//' "$tmp/paths0" \
|
|
||||||
> "$tmp/paths" || true
|
|
||||||
|
|
||||||
while IFS=: read -r file lineno ref; do
|
|
||||||
[ -n "${ref:-}" ] || continue
|
|
||||||
exempt "$file" "$lineno" && continue
|
|
||||||
if [ -f "$ref" ]; then
|
|
||||||
alive=$((alive + 1))
|
|
||||||
else
|
|
||||||
dead=$((dead + 1))
|
|
||||||
printf '::error file=%s,line=%s::repo path does not resolve: %s\n' \
|
|
||||||
"$file" "$lineno" "$ref"
|
|
||||||
fi
|
|
||||||
done < "$tmp/paths"
|
|
||||||
|
|
||||||
if [ "$(wc -l < "$tmp/root")" -eq 0 ]; then
|
if [ "$(wc -l < "$tmp/root")" -eq 0 ]; then
|
||||||
echo 'check-doc-refs: root-pointer search matched nothing — pattern or tree changed' >&2
|
echo 'check-doc-refs: root-pointer search matched nothing — pattern or tree changed' >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$(wc -l < "$tmp/paths")" -eq 0 ]; then
|
|
||||||
echo 'check-doc-refs: repo-path search matched nothing — pattern or tree changed' >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
if [ "$(wc -l < "$tmp/rel")" -eq 0 ]; then
|
if [ "$(wc -l < "$tmp/rel")" -eq 0 ]; then
|
||||||
echo 'check-doc-refs: relative-link search matched nothing — pattern or tree changed' >&2
|
echo 'check-doc-refs: relative-link search matched nothing — pattern or tree changed' >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue