Skip to content

Commit d3ca73b

Browse files
committed
fix(ci): ensure web target in deploy-pages, maintain stdlib test contract, and handle dev port auto-switch
1 parent 9b831aa commit d3ca73b

9 files changed

Lines changed: 122 additions & 113 deletions

File tree

‎.github/workflows/deploy-pages.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Build WebForge Website
5050
run: |
5151
cd website
52-
../target/release/webforge build src/main.txs
52+
../target/release/webforge build --target web src/main.txs
5353
ls -la dist/
5454
5555
- name: Verify WebForge Static Output

‎cli/src/commands/build.rs‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,25 @@ pub fn execute(
3636
_ => BuildProfile::Debug,
3737
};
3838

39+
let exe_name = std::env::current_exe()
40+
.ok()
41+
.and_then(|p| p.file_stem().map(|s| s.to_string_lossy().to_lowercase()))
42+
.unwrap_or_default();
43+
3944
let is_web = target_str.to_lowercase() == "web"
4045
|| file_path
4146
.map(|f| f.to_lowercase() == "web")
47+
.unwrap_or(false)
48+
|| exe_name.contains("webforge")
49+
|| current_dir.join("webforge.toml").exists()
50+
|| file_path
51+
.map(|f| {
52+
let p = Path::new(f);
53+
p.extension().and_then(|e| e.to_str()) == Some("wtxs")
54+
|| std::fs::read_to_string(p)
55+
.map(|s| s.contains("make a website") || s.contains("site \""))
56+
.unwrap_or(false)
57+
})
4258
.unwrap_or(false);
4359

4460
if is_web {

‎cli/src/commands/dev.rs‎

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,22 @@ pub fn execute(file_opt: Option<&str>, port_opt: Option<u16>) -> ExitCode {
8181
}
8282
}
8383

84-
let port = port_opt.unwrap_or(3000);
84+
let requested_port = port_opt.unwrap_or(3000);
85+
let mut port = requested_port;
86+
if port_opt.is_none() {
87+
for try_port in requested_port..requested_port.saturating_add(20) {
88+
if std::net::TcpListener::bind(("0.0.0.0", try_port)).is_ok() {
89+
if try_port != requested_port {
90+
println!(
91+
"ℹ️ Port {} was in use; automatically selected port {}",
92+
requested_port, try_port
93+
);
94+
}
95+
port = try_port;
96+
break;
97+
}
98+
}
99+
}
85100
println!(
86101
"{}",
87102
"========================================================="

‎graphify-out/.graphify_labels.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -468,5 +468,6 @@
468468
"466": "Community 466",
469469
"467": "Community 467",
470470
"468": "Community 468",
471-
"469": "Community 469"
471+
"469": "Community 469",
472+
"470": "Community 470"
472473
}

‎graphify-out/GRAPH_REPORT.md‎

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Graph Report - techscript (2026-10-21)
22

33
## Corpus Check
4-
- 507 files · ~334,246 words
4+
- 507 files · ~334,466 words
55
- Verdict: corpus is large enough that graph structure adds value.
66

77
## Summary
8-
- 5405 nodes · 9008 edges · 470 communities (357 shown, 113 thin omitted)
8+
- 5405 nodes · 9008 edges · 471 communities (357 shown, 114 thin omitted)
99
- Extraction: 100% EXTRACTED · 0% INFERRED · 0% AMBIGUOUS · INFERRED: 34 edges (avg confidence: 0.8)
1010
- Token cost: 0 input · 0 output
1111

1212
## Graph Freshness
13-
- Built from commit: `6a9e48f6`
13+
- Built from commit: `9b831aab`
1414
- Run `git rev-parse HEAD` and compare to check if the graph is stale.
1515
- Run `graphify update .` after code changes (no API cost).
1616

@@ -460,6 +460,7 @@
460460
- [[_COMMUNITY_Community 467|Community 467]]
461461
- [[_COMMUNITY_Community 468|Community 468]]
462462
- [[_COMMUNITY_Community 469|Community 469]]
463+
- [[_COMMUNITY_Community 470|Community 470]]
463464

464465
## God Nodes (most connected - your core abstractions)
465466
1. `Span` - 86 edges
@@ -507,7 +508,7 @@
507508
- 1-file cycle: `cli/src/commands/examples.rs -> cli/src/commands/examples.rs`
508509
- 1-file cycle: `cli/src/commands/fmt.rs -> cli/src/commands/fmt.rs`
509510

510-
## Communities (470 total, 113 thin omitted)
511+
## Communities (471 total, 114 thin omitted)
511512

512513
### Community 0 - "LoweringContext"
513514
Cohesion: 0.05
@@ -818,8 +819,8 @@ Cohesion: 0.12
818819
Nodes (15): Arc, Display, Formatter, Option, Path, PathBuf, Result, Self (+7 more)
819820

820821
### Community 86 - "commands/build.rs"
821-
Cohesion: 0.14
822-
Nodes (15): main(), Box, Error, Result, ExitCode, ExitCode, Option, Path (+7 more)
822+
Cohesion: 0.16
823+
Nodes (16): main(), Box, Error, Result, ExitCode, Error, ExitCode, Option (+8 more)
823824

824825
### Community 87 - "LiteralVal"
825826
Cohesion: 0.18
@@ -966,8 +967,8 @@ Cohesion: 0.11
966967
Nodes (17): 10. AI Rules, 11. Current Progress, 12. Remaining Work, 13. Important Files, 14. AI Workflow, 15. Session Memory, 16. Quick Context (One Minute Read), 1. Project Overview (+9 more)
967968

968969
### Community 124 - "OptimizationContext"
969-
Cohesion: 0.10
970-
Nodes (6): parser, Precedence, next_lower_precedence(), techscript_cli, techscript_common, techscript_errors
970+
Cohesion: 0.13
971+
Nodes (5): parser, Precedence, next_lower_precedence(), techscript_common, techscript_errors
971972

972973
### Community 125 - "VMError"
973974
Cohesion: 0.27
@@ -1086,7 +1087,7 @@ Cohesion: 0.50
10861087
Nodes (3): IRType, TypeInfo, Value
10871088

10881089
### Community 159 - ".register_encoding"
1089-
Cohesion: 0.15
1090+
Cohesion: 0.14
10901091
Nodes (13): 07 — TechScript 2.0 Parser Design, 1.1 Decision: Recursive Descent + Pratt Parser, 1. Parsing Strategy, 2. Parser State, 3. Statement & Method Parsing, 4.1 Binding Power Table, 4. Expression Parsing — Pratt Parser, 5. Error Recovery (+5 more)
10911092

10921093
### Community 160 - ".register_excel"
@@ -1286,8 +1287,8 @@ Cohesion: 0.25
12861287
Nodes (4): Display, Formatter, Result, ExitCode
12871288

12881289
### Community 213 - ".fmt"
1289-
Cohesion: 0.42
1290-
Nodes (8): Error, ExitCode, Option, Path, Result, build_web(), execute(), invoke_linker()
1290+
Cohesion: 0.36
1291+
Nodes (7): ExitCode, Option, Path, PathBuf, Vec, execute(), find_test_files()
12911292

12921293
### Community 214 - "gc_tests.rs"
12931294
Cohesion: 0.31
@@ -1840,7 +1841,7 @@ Nodes (4): ExitCode, Option, default_toml_config(), execute()
18401841
## Knowledge Gaps
18411842
- **1850 isolated node(s):** `Vec`, `Self`, `DebugSymbols`, `SourceMap`, `Result` (+1845 more)
18421843
These have ≤1 connection - possible missing edges or undocumented components.
1843-
- **113 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
1844+
- **114 thin communities (<3 nodes) omitted from report** — run `graphify query` to explore isolated nodes.
18441845

18451846
## Suggested Questions
18461847
_Questions this graph is uniquely positioned to answer:_

‎graphify-out/cache/stat-index.json‎

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)