Skip to content

docs: Bug Catcher findings and upstream engagement - #9

Merged
kavyabhand merged 3 commits into
mainfrom
docs/bug-catcher-upstream
Aug 2, 2026
Merged

kavyabhand merged 3 commits into
mainfrom
docs/bug-catcher-upstream

Conversation

@kavyabhand

Copy link
Copy Markdown
Member

Summary

  • Surveyed every upstream issue/PR into docs/evidence/upstream-issues.md; independently reproduced leads with minimal reproducers under docs/evidence/repro/.
  • Rewrote docs/findings.md (ordered by consequence + disproved hypotheses). Filed/confirmed upstream: comments on #136 and #105; new issues #141 and #142; fix PRs #143 and #144.
  • Added equivalence scope + intentional-divergences table to README/DECISIONS (D033–D034) and scorecard fragment upstream-findings.json. Track G allocator-misuse criterion remains an honest negative.

Suite assertion counts (unchanged)

Config Required
default 4930/4930
pow 4924/4924
natlog 4934/4934
pow_natlog 4928/4928

Test plan

  • CI green on this PR
  • README claim check / rendered scorecard region current
  • Spot-check docs/findings.md URLs and docs/evidence/repro/run-all.sh logs

Copilot AI review requested due to automatic review settings August 2, 2026 10:34

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the documentation/evidence set for “Bug Catcher” work against the pinned upstream TinyExpr commit, including measured repro logs, an upstream issue/PR survey, and a clearer statement of equivalence scope vs intentional divergences for the Zig C ABI port.

Changes:

  • Added an explicit equivalence-scope statement and an intentional-divergences table (with links to detailed findings).
  • Rewrote/expanded findings documentation and added an upstream issue/PR survey plus a scorecard fragment recording upstream engagement.
  • Added minimal reproducers + a “run all” script and checked-in run logs to support the documented claims.

Reviewed changes

Copilot reviewed 23 out of 24 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
README.md Adds equivalence scope + intentional-divergences table for top-level docs.
docs/journal.md Records the 2026-08-02 Bug Catcher/upstream engagement session notes.
docs/findings.md Rewrites findings into “by consequence” format and records upstream engagement links.
docs/evidence/upstream-issues.md Adds full upstream issue/PR survey used for novelty checking.
docs/evidence/scorecard.json Records upstream findings as a measured scorecard section.
docs/evidence/repro/run-log.txt Adds Linux repro run output for the repro suite.
docs/evidence/repro/run-log-linux-signed-char.txt Adds forced signed-char ctype trap output on Linux.
docs/evidence/repro/run-log-linux-docker.txt Adds Linux Docker repro run output (duplicate of run-log.txt content).
docs/evidence/repro/run-log-darwin.txt Adds macOS repro run output for the repro suite.
docs/evidence/repro/run-all.sh Adds a script that compiles/runs all reproducers and captures logs.
docs/evidence/repro/next_token_other.c Adds TU used to collide/interpose next_token.
docs/evidence/repro/next_token_main.c Adds minimal driver program calling te_interp for the collision test.
docs/evidence/repro/nest_overflow.c Adds fork-based binary search reproducer for deep-nesting stack overflow.
docs/evidence/repro/locale_decimals.c Adds reproducer for locale-dependent decimal parsing behavior.
docs/evidence/repro/fac_nan.c Adds probe for fac(NaN) behavior.
docs/evidence/repro/ctype_trap.h Adds trapping ctype wrapper header to surface signed-char UB.
docs/evidence/repro/ctype_highbit.c Adds input harness that feeds a high-bit byte into te_interp.
docs/evidence/fragments/upstream-findings.json Adds scorecard fragment capturing upstream engagement actions/URLs.
docs/evidence/fragments/fuzz-warmup.json Adds fuzz warmup evidence fragment.
docs/evidence/fragments/fuzz-warmup-progress.json Adds fuzz warmup-progress evidence fragment.
docs/evidence/fragments/enumeration-full.json Adds full enumeration evidence fragment.
docs/evidence/divergences.md Reframes divergences doc around equivalence scope + intentional/scoped divergences.
DECISIONS.md Adds D033–D034 documenting the scope/divergence table decision and upstream engagement plan.
.gitignore Adds ignores for most repro build outputs under docs/evidence/repro/.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +32 to +39
pid_t pid = fork();
if (pid == 0) {
try_depth(mid, mode);
_exit(0);
}
int st = 0;
waitpid(pid, &st, 0);
int ok = WIFEXITED(st) && WEXITSTATUS(st) == 0;
uname -a
echo "cc=$($CC --version | head -1)"
echo "utc=$(date -u +%Y-%m-%dT%H:%M:%SZ)"
echo "git=$(git -C "$ROOT" rev-parse HEAD)"
Comment on lines +64 to +71
elif $CC -O2 -o "$REPRO/next_token_multi_te_first" \
"$REPRO/next_token_main.o" "$REPRO/tinyexpr.o" "$REPRO/next_token_other.o" -lm \
-Wl,-mllvm 2>"$REPRO/next_token_multi.err"; then
true
else
# macOS ld64: -force_load not applicable; try -alias / just report static failure
echo "allow-multiple-definition unsupported on this linker; see static_link_exit"
cat "$REPRO/next_token_multi.err" 2>/dev/null || true
Comment on lines 10471 to +10474
"upstream_findings": {
"status": "not_measured"
"status": "measured",
"upstream_findings": {
"schema_version": 1,
@kavyabhand
kavyabhand merged commit 1120c0a into main Aug 2, 2026
43 checks passed
@kavyabhand
kavyabhand deleted the docs/bug-catcher-upstream branch August 2, 2026 10:39
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.

2 participants