🤖 AI generated content
src/rootfilespec/bootstrap/TObject.py:89 unpacks ">hii", so fUniqueID (declared Fmt(">i") at :74) and fBits are signed Int_t. pidf (:78-83, read at :92-93) is stored raw and never used.
Spec:
- References §5 "What
fUniqueID means": fUniqueID is a UInt_t whose top byte is either zeroed (a referenced object) or a stale session index (a TRef), with 0xFF as an escape. A reader should take the serial as fUniqueID & 0x00FFFFFF and "never compare two fUniqueID words directly". Read signed, any surviving top byte ≥ 0x80 yields a negative number.
- References §2 "
pidf and the TProcessID records": the process id is pidf plus the record's key fPidOffset, and names a top-level key ProcessID<n>. The pidf docstring omits fPidOffset, which the spec's errata note is undocumented upstream too.
Evidence: by reading the code against the spec; no test file with a non-zero top byte or non-zero fPidOffset was identified, so not reproduced on data.
Suggested fix: read fUniqueID and fBits as >I; expose the 24-bit serial (property or documented mask); carry the enclosing key's fPidOffset in the buffer context so pidf + fPidOffset can be formed — this depends on #88, which currently does not even separate fPidOffset from fSeekPdir. Mapping to ProcessID<n> keys belongs with TRef/TRefArray in #101.
Severity / size: medium (wrong values only for referenced objects / TRef users) / S for signedness, M for resolution.
Related: #88, #101, #93 (the same trailing pidf for element code 15), #109.
Assisted-by: claude-code:claude-fable-5-1
src/rootfilespec/bootstrap/TObject.py:89unpacks">hii", sofUniqueID(declaredFmt(">i")at:74) andfBitsare signedInt_t.pidf(:78-83, read at:92-93) is stored raw and never used.Spec:
fUniqueIDmeans":fUniqueIDis aUInt_twhose top byte is either zeroed (a referenced object) or a stale session index (aTRef), with0xFFas an escape. A reader should take the serial asfUniqueID & 0x00FFFFFFand "never compare twofUniqueIDwords directly". Read signed, any surviving top byte ≥0x80yields a negative number.pidfand theTProcessIDrecords": the process id ispidfplus the record's keyfPidOffset, and names a top-level keyProcessID<n>. Thepidfdocstring omitsfPidOffset, which the spec's errata note is undocumented upstream too.Evidence: by reading the code against the spec; no test file with a non-zero top byte or non-zero
fPidOffsetwas identified, so not reproduced on data.Suggested fix: read
fUniqueIDandfBitsas>I; expose the 24-bit serial (property or documented mask); carry the enclosing key'sfPidOffsetin the buffer context sopidf + fPidOffsetcan be formed — this depends on #88, which currently does not even separatefPidOffsetfromfSeekPdir. Mapping toProcessID<n>keys belongs withTRef/TRefArrayin #101.Severity / size: medium (wrong values only for referenced objects /
TRefusers) / S for signedness, M for resolution.Related: #88, #101, #93 (the same trailing
pidffor element code 15), #109.Assisted-by: claude-code:claude-fable-5-1