Skip to content

[feat] bound Machine print bytes per execution (LET-31) - #183

Merged
vt128 merged 1 commit into
masterfrom
codex/print-byte-budget-star44
Nov 11, 2026
Merged

vt128 merged 1 commit into
masterfrom
codex/print-byte-budget-star44

Conversation

@vt128

@vt128 vt128 commented Nov 6, 2026 •

Copy link
Copy Markdown
Member

Machine.SetMaxPrintBytes lets a host limit UTF-8 message bytes delivered through the print handler. Zero is unlimited. Run and Call receive fresh allowances, loaded source modules share the caller allowance, and a REPL session shares one allowance. An over-budget message is withheld and execution reports PrintLimitExceededError, accessible through errors.As. Reset retains the configured limit. The usage notes explain message accounting and the host controls for formatting, loggers, direct stderr, return values and message construction.

Fresh Go 1.27.3 / Go 1.19.13 full build, race tests twice, vet, coverage and normal commit-hook checks pass. Both compilers cover all 56 added statements, with repository/package coverage increasing and existing covered statements retained. All 80 consumer configurations pass, with 40 exact coverage pairs. Four fresh CLI binaries pass eight public examples and four framework contract checks. Source, defensive coverage and downstream artifacts have independent reviews. The exact head passes all 23 required / 24 reported checks, both Codecov gates, review inspection and checks-watch.

The original fixed 64-bit experiments retain the 208 B default Machine and show about 48 B plus one allocation for nonzero configuration before execution. Thirteen positive bootstrap intervals remain despite no positive Holm-adjusted timing findings across the fixed 144 suites / 4,272 metrics. These recorded costs and uncertainty are accepted for the optional output defense under the safety-first, simple-implementation direction. Original measurements retain their source labels. Tracks LET-31 / LOCAL-007.

@codacy-production

codacy-production Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 5 minor

Results:
5 new issues

Category Results
CodeStyle 5 minor

View in Codacy

🟢 Metrics 97 complexity · 12 duplication

Metric Results
Complexity 97
Duplication 12

View in Codacy

🟢 Coverage 100.00% diff coverage · +0.04% coverage variation

Metric Results
Coverage variation ✅ +0.04% coverage variation (-1.00%)
Diff coverage ✅ 100.00% diff coverage

View coverage diff in Codacy

Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (0e893c1) 8456 8043 95.12%
Head commit (f727de6) 8530 (+74) 8117 (+74) 95.16% (+0.04%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#183) 110 110 100.00%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.05%. Comparing base (0e893c1) to head (f727de6).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #183      +/-   ##
==========================================
+ Coverage   94.00%   94.05%   +0.05%     
==========================================
  Files          53       53              
  Lines        6769     6834      +65     
==========================================
+ Hits         6363     6428      +65     
  Misses        258      258              
  Partials      148      148              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vt128
vt128 marked this pull request as ready for review November 6, 2026 23:40
@vt128
vt128 force-pushed the codex/print-byte-budget-star44 branch from d5be700 to dc0a973 Compare November 7, 2026 07:17
@vt128
vt128 marked this pull request as draft November 7, 2026 08:43
@vt128
vt128 force-pushed the codex/print-byte-budget-star44 branch from 9b209a2 to f727de6 Compare November 11, 2026 00:23
@vt128
vt128 marked this pull request as ready for review November 11, 2026 00:48
@vt128
vt128 merged commit 74c6925 into master Nov 11, 2026
24 checks passed
@vt128
vt128 deleted the codex/print-byte-budget-star44 branch November 11, 2026 00:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant