Skip to content

WIP: align File::Temp stat modes and investigate goto sub cleanup - #1205

Merged
fglock merged 20 commits into
masterfrom
fix/file-temp-stat-mode
Sep 2, 2026
Merged

WIP: align File::Temp stat modes and investigate goto sub cleanup#1205
fglock merged 20 commits into
masterfrom
fix/file-temp-stat-mode

Conversation

@fglock

@fglock fglock commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Summary

  • Refresh stat(FILEHANDLE) metadata when its path still names the opened inode.
  • Keep the cached open-time identity for files renamed and replaced after opening.
  • Add File::Temp coverage for matching handle and pathname stat modes.

Closes #1201.

Validation

  • make — pass
  • make check-links — pass
  • src/test/resources/unit/file_temp_stat_mode.t — pass on JVM and interpreter
  • src/test/resources/unit/stat_filehandle_after_rename.t — pass on JVM and interpreter

@fglock fglock changed the title fix: align File::Temp handle and pathname stat modes WIP: align File::Temp stat modes and investigate goto sub cleanup Sep 1, 2026
fglock added a commit that referenced this pull request Sep 1, 2026
Document the remaining goto &sub lifecycle, argument ownership, and
typeglob-slot work for PR #1205.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
fglock added a commit that referenced this pull request Sep 1, 2026
Document the remaining goto &sub lifecycle, argument ownership, and
typeglob-slot work for PR #1205.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock force-pushed the fix/file-temp-stat-mode branch from c870343 to 12315f2 Compare September 1, 2026 15:24
fglock added a commit that referenced this pull request Sep 1, 2026
Resolve the PR #1205 CI timeout in goto_named_redefinition by reserving fresh
symbol lookup for explicit named goto markers. Saved coderefs now retain their
identity when a named stub is redefined, while the scoped source-frame cleanup
continues to preserve destructor timing.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
fglock added a commit that referenced this pull request Sep 1, 2026
Record the passing immutable full gate and the remaining hosted CI/UAT steps
for PR #1205's final tail-call parity candidate.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
fglock and others added 17 commits September 2, 2026 10:52
Refresh the cached open-file metadata when the pathname still identifies the
same inode. This makes stat(FILEHANDLE) reflect permissions applied after
sysopen creation while preserving the original identity after rename and
replacement.

Add File::Temp regression coverage for matching handle and pathname modes.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
Preserve the in-progress named tail-call resolution and cleanup regression
coverage discovered during UAT. The core goto-sub cases are not complete yet.

Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
Document the remaining goto &sub lifecycle, argument ownership, and
typeglob-slot work for PR #1205.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Preserve the existing handoff and implementation changes before further work.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <出>
Record deferred named-target lookup, live @_ handoff, and the remaining
destructor-ordering and eval-string parity work for the next engineer.

Validation:
- make check-links (pass)
- focused goto_tailcall_cleanup.t: system Perl, JVM, interpreter (pass)
- goto-sub.t: JVM and interpreter retain assertions 7, 9, and 18
- bounded make gates compile but time out in parallel unit shards

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <noreply@openai.com>
Resolve tail-call markers at the interpreter-backed eval boundary,
preserve literal @_ through bytecode goto lowering, and dispatch
top-level anonymous coderef calls.

Add focused regressions for cleanup, eval, AUTOLOAD, sparse arguments,
absent glob ARRAY slots, and anonymous coderef invocation.

Validation:
- system Perl, JVM, and interpreter focused regressions pass
- goto-sub.t has no not ok lines in either backend
- make check-links passes
- full make rebuilt the shadow JAR but unrelated parallel shards timed out

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <noreply@openai.com>
Drain only a retired tail-call frame's mortal entries, retaining deferred
Sub::Quote metadata owned by its caller. Restore refcount-aware typeglob
ARRAY and HASH slot detachment so saved slots survive undef and reinstallation.

Validation:
- system Perl focused regressions: 46 assertions pass
- JVM and interpreter focused regressions: Sub::Quote, typeglob, and goto pass
- make check-links passes
- full make rebuilt the shadow JAR and passed Joni packaging, then its
  parallel local shards stalled without reporting a failure

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <noreply@openai.com>
Resolve top-level tailcall markers before they escape as internal errors and
preserve a named target in the final diagnostic. Document the remaining
interpreter eval-boundary and destructor-ordering UAT work.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Flush current-scope mortal entries when a tail-call replacement completes,
and keep eval provenance in bytecode dynamic goto operations. This preserves
eval diagnostics while allowing normal dynamic coderef tail calls from eval.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Resolve the PR #1205 CI timeout in goto_named_redefinition by reserving fresh
symbol lookup for explicit named goto markers. Saved coderefs now retain their
identity when a named stub is redefined, while the scoped source-frame cleanup
continues to preserve destructor timing.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Limit completed tail-call cleanup to the marker-owned alias carrier. This
preserves DBIC schema lifetimes through Try::Tiny dynamic goto wrappers while
retaining destructor timing and saved-coderef identity.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Record the passing immutable full gate and the remaining hosted CI/UAT steps
for PR #1205's final tail-call parity candidate.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Do not expose the retained POSIX descriptor-stat snapshot on Windows. Route
filehandle stat through the existing BasicFileAttributes-backed path so
File::Temp handles and their paths report matching device, inode, and mode
fields.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Capture BasicFileAttributes when opening a channel and use its file key to
provide a stable Windows synthetic inode. This keeps unchanged handle/path
stat values aligned while preserving fstat-like identity after a pathname is
renamed and replaced.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Resolve a Windows handle's mode through the original pathname only while its
captured file identity still matches. This keeps File::Temp handle and path
stat results at 0600 while retaining the handle's open-time inode after a
rename and replacement.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Record the green Ubuntu and Windows validation gates and leave final UAT on
the exact published PR head as the remaining acceptance step.

Generated with Codex (https://openai.com/codex)

Co-Authored-By: Codex <codex@openai.com>
Record the reopened core regression and snapshot the selective ownership
experiments before rebasing PR #1205 onto master.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock
fglock force-pushed the fix/file-temp-stat-mode branch from 9d1514a to 1e992a3 Compare September 2, 2026 11:39
fglock and others added 3 commits September 2, 2026 14:33
Preserve borrowed argument aliases while releasing an inline blessed temporary
before its goto &sub replacement begins. Update the parity handoff with final
regression and validation evidence.

Generated with [OpenAI Codex](https://openai.com/codex/)

Co-Authored-By: OpenAI Codex <codex@openai.com>
Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
Route final uncaught Perl diagnostics through the active Perl STDERR handle,
so closing STDERR suppresses a bare die as it does in standard Perl. Add a
subprocess regression covering the behavior on both execution backends.

Generated with [Codex](https://openai.com/codex)

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
@fglock
fglock merged commit 4b93e60 into master Sep 2, 2026
2 checks passed
@fglock
fglock deleted the fix/file-temp-stat-mode branch September 2, 2026 15:01
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.

File::Temp::unlink0 fails when stat mode differs for handle and path

1 participant