Skip to content

Java and C time_date_logic: nanoTime, TimeUnit, bare time()/clock() (Part of #8863) - #9229

Merged
squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8863-20261124T1745Z
Nov 24, 2026
Merged

squid-shepherd[bot] merged 2 commits into
mainfrom
churn/8863-20261124T1745Z

Conversation

@squid-protocol

Copy link
Copy Markdown
Owner

Part of #8863 (child #8862 / #8868). Checklist: partial [c:a9dfa2bb] -- no draft contracts remain (#9207 declared the last five); this slice takes two contract-answerable time_date_logic rows from #8868. The owner readings are still open (below).

What changed

The time_date_logic contract is "a now/time/date constructor, duration arithmetic, a formatting or timezone call". #8868 measured clock calls the rules missed:

  • Java (recall 0.38): System.nanoTime (17 functions) and TimeUnit. (9) now match.
  • C (recall 0.52 / precision 0.65): bare time( calls (35 functions) now match, plus clock(, difftime, mktime. A lookbehind (?<![.>\w]) keeps member calls (x.time(, p->time() and longer names (runtime() out.

Tests: new positive/decoy pairs in test_java_strict.py and test_c_strict.py.

Golden drift (attributed)

Both fixtures blessed via golden-lock.sh crucible_check.py --update --yes. Only time_date_logic counts moved (gnucobol_internals codegen.c and fileio.c: 2 -> 3, from C time() plus the fingerprint / drift-centroid values that depend on them (springboot Java). No other signal moved.

Class / Sibling gaps

Class: time_date_logic misses clock or duration calls the contract names, measured per language in #8868. In this PR: Java and C. Rust and Go are in #9227. Sibling gaps, each a different mechanism or an owner decision:

  • Keyword families in Go, Rust, JavaScript, TypeScript, Java, C: per-language differences that need a definition decision #8868 owner readings: is assert an abort (C panics_and_aborts precision 0.48), and which doc styles count in TS/JS (precision 0.25 / 0.02). Need the owner.
  • TS/JS regex_execution: regex literals and .test( need division-vs-regex disambiguation and touch the test_vs_regex ambiguity tests.
  • Rust thread_sleeps (sleep, time::sleep) and io (TcpListener::bind, OpenOptions::new, stdin/stdout); C io (close, mmap, fgets); Go io (os.ReadDir, os.WriteFile, ...). Per-language rule rows.
  • Java OffsetDateTime, LocalTime: test_java_strict.py pins OffsetDateTime.now as a negative, so changing it is a decision. C++ and C# time_date_logic were not measured.
  • Java io (0.00 / 0.00), Go closures precision 0.36, Rust branch precision 0.70, Go/TS decorators false fires: causes not traced.

Remaining slices

Per-language rule rows above, one language per PR; owner readings on #8862.

Gates

pr_gates.py --fast 9/9; --ratchets 9 pass, 0 skipped. Strict tests for both languages pass (221). Rule CPU timing was not measured separately: the change adds one alternation each to two short regexes.

Lessons for agents

🤖 Generated with Claude Code

squid-protocol and others added 2 commits November 24, 2026 12:58
@squid-protocol squid-protocol added the shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md label Nov 24, 2026
@squid-shepherd

Copy link
Copy Markdown
Contributor

No description provided.

@squid-shepherd
squid-shepherd Bot marked this pull request as ready for review November 24, 2026 18:13
@squid-shepherd
squid-shepherd Bot enabled auto-merge (squash) November 24, 2026 18:15
@github-actions

Copy link
Copy Markdown
Contributor

🐦‍⬛ Muninn Security Scan

✅ No security issues found.

🐦‍⬛ Powered by Muninn · Skald Lab

@squid-shepherd
squid-shepherd Bot merged commit eca1848 into main Nov 24, 2026
127 checks passed
@squid-shepherd
squid-shepherd Bot deleted the churn/8863-20261124T1745Z branch November 24, 2026 18:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

shepherd:merge Maintainer: merge when green (auto-merge, squash). Guide: docs/ci.md

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant