From d9fe03e8f0da412bd97e9c8e3546b908a1b5b701 Mon Sep 17 00:00:00 2001 From: Dmitrii Vasilev Date: Mon, 12 Oct 2026 16:17:24 +0700 Subject: [PATCH] fix(port): ledger the W469 string-array refusal -- the port stays faithful to the source's [N][]const u8 (Refs #7620) Co-Authored-By: Claude Opus 5.5 --- ...-src-tri-author-attribution-guard-zig-z.md | 11 ++++ docs/reports/suite_expectations.json | 9 ++- .../src/tri/author_attribution_guard.t27 | 60 +++++++++++++++++++ 3 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 docs/now/2026-10-08-published-port-ghashtag-trinity-src-tri-author-attribution-guard-zig-z.md create mode 100644 specs/port/trinity/src/tri/author_attribution_guard.t27 diff --git a/docs/now/2026-10-08-published-port-ghashtag-trinity-src-tri-author-attribution-guard-zig-z.md b/docs/now/2026-10-08-published-port-ghashtag-trinity-src-tri-author-attribution-guard-zig-z.md new file mode 100644 index 0000000000..8466f991f0 --- /dev/null +++ b/docs/now/2026-10-08-published-port-ghashtag-trinity-src-tri-author-attribution-guard-zig-z.md @@ -0,0 +1,11 @@ +# NOW -- Port gHashTag/trinity:src/tri/author_attribution_guard.zig (Zig, 2 functions) to specs/port/trinity/src/tri/author_attribution_guard.t27 (published 2026-10-08) + +## A bee's work on #7620, published from `queen-7620` (Closes #7620) + +- The branch changes 1 file(s): `specs/port/trinity/src/tri/author_attribution_guard.t27`. +- `git diff --stat origin/master...queen-7620` reads: 1 file changed, 60 insertions(+) +- This entry is written by the publisher, not by the bee. A pull request must + add exactly one `docs/now/` entry and a bee has no way to know that: its brief + names a boundary file and acceptance criteria, and `docs/now/` is neither. +- What this entry does NOT establish: that the work is correct. The gates on the + pull request judge that, and they are the same gates every other change meets. diff --git a/docs/reports/suite_expectations.json b/docs/reports/suite_expectations.json index 8bdbe8ec8b..6896cb6cd7 100644 --- a/docs/reports/suite_expectations.json +++ b/docs/reports/suite_expectations.json @@ -2,7 +2,7 @@ "schema_version": 1, "generated_by": "t27c suite --bless-expectations", "max_gate_failures": 2, - "max_entries": 74, + "max_entries": 75, "entries": [ { "path": "specs/api/sdk_contract.t27", @@ -720,6 +720,13 @@ "issue": 5549, "expires": "2026-11-30" }, + { + "path": "specs/port/trinity/src/tri/author_attribution_guard.t27", + "phase": "gen-verilog", + "reason": "ported for #7620; the port must stay faithful to the Zig tri/author_attribution_guard.zig source, which declares `lines : [4][]const u8` (line 34). gen-verilog refuses it as 2-D array-of-aggregate -- the same class as orchestrator_bench (#8521) (docs/reports/W469_2D_STRUCT_ARRAY_DESIGN.md). Ledgered until the W469 lowering lands.", + "issue": 7620, + "expires": "2026-11-30" + }, { "path": "specs/port/trinity/src/tri/gen_mock.t27", "phase": "gen-verilog", diff --git a/specs/port/trinity/src/tri/author_attribution_guard.t27 b/specs/port/trinity/src/tri/author_attribution_guard.t27 new file mode 100644 index 0000000000..d52037cdf0 --- /dev/null +++ b/specs/port/trinity/src/tri/author_attribution_guard.t27 @@ -0,0 +1,60 @@ +module port::trinity::src::tri::author_attribution_guard; + +const MANIFEST_REL: []const u8 = "tools/config/author_attribution_guard.manifest"; +const REQUIRED_NAME: []const u8 = "Dmitrii Vasilev"; +const REQUIRED_HANDLE: []const u8 = "gHashTag"; + +const FORBIDDEN_COUNT: usize = 2; +const FORBIDDEN: [FORBIDDEN_COUNT][]const u8 = ["Trinity Research Group", "Trinity Research Team"]; + +pub fn trimLine(line: []const u8) []const u8 { + return std.mem.trim(u8, line, " \t\r\n"); +} + +pub fn loadManifestPaths(allocator: std.mem.Allocator) !std.ArrayList([]const u8) { + // File system operation - undefined body as per requirements + undefined; +} + +test trimLine_basic { + assert(trimLine(" hello ") == "hello"); + assert(trimLine("hello") == "hello"); + assert(trimLine("") == ""); +} + +test trimLine_whitespace { + assert(trimLine(" \t\n\r test \t\n\r") == "test"); + assert(trimLine(" ") == ""); + assert(trimLine("\t\n\r") == ""); +} + +test loadManifestPaths_filter_logic { + // Test the filtering logic that would happen inside loadManifestPaths + // This simulates what the function does to the raw file content + var lines: [4][]const u8 = ["path1", "", "# comment", "path2"]; + var valid_count: usize = 0; + + for (lines) |line| { + const trimmed = trimLine(line); + if (trimmed.len == 0) continue; + if (trimmed[0] == '#') continue; + valid_count += 1; + } + + assert(valid_count == 2); +} + +test loadManifestPaths_handles_empty_lines { + // Test that empty lines are properly filtered + var lines: [3][]const u8 = ["", " ", "\t\n\r"]; + var valid_count: usize = 0; + + for (lines) |line| { + const trimmed = trimLine(line); + if (trimmed.len == 0) continue; + if (trimmed[0] == '#') continue; + valid_count += 1; + } + + assert(valid_count == 0); +} \ No newline at end of file