Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/scripts/check-production-line-limit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,16 @@
# file drops under the limit, delete its entry in the same PR.
#
# Usage: check-production-line-limit.sh [ROOT] (default: repo root)
# The pkgs/id flake runs this same script inside its fast lane, with
# ROOT defaulting to the pkgs/id source root, so PR coverage does not
# depend on the separate line-guard workflow's path filters.
set -euo pipefail

LIMIT=2500
ROOT="${1:-$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)}"

# path -> removal issue
declare -A GRANDFATHERED=(
# 5,325 production lines when the guard landed; split tracked by
# https://github.com/developing-today/code/issues/4704
["pkgs/id/src/web/markdown.rs"]="https://github.com/developing-today/code/issues/4704"
# 2,504 production lines; the F11.10 file itself, regrown. Split:
# https://github.com/developing-today/code/issues/4715
["pkgs/id/src/cli.rs"]="https://github.com/developing-today/code/issues/4715"
Expand Down
6 changes: 3 additions & 3 deletions .github/scripts/check-production-line-limit.test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ gen() { # gen <path> <production-lines> [test-lines]
mkdir -p "$TMP/ok/pkgs/id/src/web"
gen "$TMP/ok/pkgs/id/src/small.rs" 100
gen "$TMP/ok/pkgs/id/src/long_with_tests.rs" 100 5000
# The real grandfathered path, over the limit: warning, not failure.
gen "$TMP/ok/pkgs/id/src/web/markdown.rs" 3000
# A remaining grandfathered path, over the limit: warning, not failure.
gen "$TMP/ok/pkgs/id/src/cli.rs" 3000
bash "$SCRIPT" "$TMP/ok" >"$TMP/ok.out"
grep -q "GRANDFATHERED pkgs/id/src/web/markdown.rs" "$TMP/ok.out"
grep -q "GRANDFATHERED pkgs/id/src/cli.rs" "$TMP/ok.out"
grep -q "production-line-guard: OK" "$TMP/ok.out"
echo "pass: compliant tree passes, grandfather reported"

Expand Down
1 change: 1 addition & 0 deletions .github/scripts/id-pr-checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ taplo-check
clippy-lint
web-lint
cargo-check
production-line-limit
test-unit
test-shard-0
test-shard-1
Expand Down
2 changes: 1 addition & 1 deletion .opencode/plans/2026-10-20_phase-11-status.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ This document audits the completion status of all eighteen Phase 11 tasks (F11.1
| **F11.7** | Host metrics & tracing | **Planned** | Tracked in roadmap | Actor queue depth, command latency, and Prometheus metrics endpoint. |
| **F11.8** | Benchmarks | **Planned** | Tracked in roadmap | Replay, append/fsync, and fan-out benchmarks with committed baselines. |
| **F11.9** | Bytes per frame | **Planned** | Tracked in roadmap | Measure full-screen frame sizes at 80x24 and 200x60 across examples. |
| **F11.10** | Split large modules | **Done** | [PR #808](https://github.com/developing-today/code/pull/808) | `world.rs` → `world/{mod,types,core,actor,handle,util,tests}.rs`; `world_session.rs` → `world_session/{mod,types,tests}.rs`. No file over 2,500 production lines. |
| **F11.10** | Split large modules | **In Progress** | [PR #808](https://github.com/developing-today/code/pull/808), [Issue #1438](https://github.com/developing-today/code/issues/1438) | The ID fast lane now includes the `production-line-limit` flake check (shared guard + synthetic contract tests); #1438 splits the regrown `markdown.rs` and removes its grandfather entry. Other corrected-count overages remain tracked in #4715, #4716, and #4717. |
| **F11.11** | One client projection | **Done** | [PR #250](https://github.com/developing-today/code/pull/250), [PR #256](https://github.com/developing-today/code/pull/256), [PR #808](https://github.com/developing-today/code/pull/808) | Seed redacted in snapshot/history (#250); single `project_event_for` projection with `history` scope (#256); structural guard pinning the two session serialization sites (#543, PR #808). Host events (#242) open. |
| **F11.12** | Journal format management | **Planned** | [Issue #227](https://github.com/developing-today/code/issues/227) | Pre-fix fail-loud rollback check landed in #244. Version header and `check`/`backup` CLI planned. |
| **F11.13** | Error taxonomy | **Done** | [PR #808](https://github.com/developing-today/code/pull/808) | `CapError` now carries a stable `CapErrorCode` plus an advisory reason on the wire; `schedule.at` returns the `check_schedule` reason. Codes documented in `world_caps`. |
Expand Down
25 changes: 25 additions & 0 deletions pkgs/id/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,31 @@
};
doc = mkCheck "doc" "doc";
cargo-check = mkCheck "cargo-check" "cargo-check";
# F11.10 production module-size guard (#1438): runs the same
# repo-level guard and its synthetic-failure contract tests
# from the ID fast lane. The script is copied from the flake
# root's parent so the check does not depend on the separate
# production-line-guard workflow's path filters. No cargo or
# web build: this is a seconds-long bash/awk scan.
production-line-limit =
pkgs.runCommand "id-production-line-limit"
{
nativeBuildInputs = with pkgs; [
gawk
findutils
gnugrep
];
}
''
root="$(mktemp -d)"
mkdir -p "$root/pkgs"
cp -r ${./.} "$root/pkgs/id"
cp -r ${../../.github} "$root/.github"
bash "$root/.github/scripts/check-production-line-limit.sh" "$root"
bash "$root/.github/scripts/check-production-line-limit.test.sh"
mkdir -p $out
echo "production-line-limit passed at $(date)" > $out/result.txt
'';
crash-gate = mkCheck "crash-gate" "crash-gate";
# PR-gate splits of crash-gate (#551): the aggregate above runs
# every heavy full sweep serially (~15 min, the slowest PR
Expand Down
Loading