Commit Graph

67 Commits

Author SHA1 Message Date
081d40c208 docs: document Redactor utility in CLAUDE.md, README, CHANGELOG
CLAUDE.md: added RedactorInterface bullet to the architecture list
(after Custom Analyser subclasses, before Detectors); added
ProjectZomboidRedactor entry under ProjectZomboid specifics; added
src/Util/ to the game-subtrees layout code block with a prose note
marking it as the sixth component directory introduced post-v0.1.0;
added Pitfall 5 on mandatory pass order.

README.md: new "Redaction" subsection between Quick start and
Architecture — PHP snippet, replacement descriptions, three toggle
methods, three documented v1 limitations.

CHANGELOG.md: added [Unreleased] section (Added + Changed) above
[0.1.0]. Removed the Redactor bullet from [0.1.0]'s Deferred list
entirely — the historical record stays accurate (v0.1.0 shipped
without it) and [Unreleased] now documents its arrival; a stub mention
in Deferred would be redundant.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:08:49 +00:00
d6831c5851 test: add Redactor integration coverage against existing PZ fixtures
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 15:02:57 +00:00
c2cb64e9a7 test: add Redactor combined and idempotence coverage
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 14:57:08 +00:00
2d1cbccc5d feat: add coordinates redaction pass
Adds three COORDS_*_REGEX constants (at-clause, bracketed, parenthesised)
plus COORDS_REPLACEMENT, wires them into redact(), and covers all three
contexts with 8 new tests including a critical negative test asserting
DebugLog-server.txt server-metadata triples are not redacted.
Also updates two Task 3 player-name tests whose expected strings now
include the coords redaction that the wired pass applies.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:49:52 +00:00
44b6b99047 feat: add player name redaction pass
Adds three lexical-context regexes (after-SteamID, ChatMessage author,
Combat/Safety pvp subsystem) and wires the player-name branch in redact().
Includes six PHPUnit tests covering all three contexts plus the toggle-off
and no-anchor-no-touch cases.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 14:43:14 +00:00
0c8dad9502 feat: add Steam ID redaction pass
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-01 14:38:26 +00:00
7755d8385c feat: scaffold RedactorInterface and ProjectZomboidRedactor with toggles 2026-05-01 14:34:34 +00:00
409de16003 docs: add Redactor implementation plan
Forward-looking plan on the redactor branch covering all eight design
questions called out in the careful-protocol kickoff: render-time
filter (raw is canonical), standalone string utility (not a Printer
decorator), regex-based detection with lexical anchors per PII
category, per-category placeholder replacement matching synthetic
fixture conventions, thin generic interface plus per-game
implementation under src/Util/ProjectZomboid/, hybrid fixture strategy
(unit-level synthetic plus integration against existing PZ fixtures).

Branch off master aec835e. backup/pre-redactor tag pins start.
No code is written by this commit. Implementation pass kicks off
separately after plan review.
2026-05-01 14:28:44 +00:00
aec835e0eb docs: correct PatternAnalyser-driven Insight count (11, not 12)
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
Phase B.1 registers 4 Insight classes (EngineVersion, ModLoad,
ModMissingProblem, ServerExceptionProblem) on PatternAnalyser; Phase
B.2 adds 7 (PvpDamage + 6 Admin verbs). Total: 11. Phase B.3's three
Problem classes are emitted by custom Analyser subclasses, not
registered with PatternAnalyser, so they don't belong in this count.
2026-05-01 14:11:27 +00:00
6fde2d49ff docs: add iblogs bootstrap design
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
Step-3 deliverable from the #careful run. Captures the fork target
verification (mclogs MIT-licensed, active, PHP 8.5 floor, MongoDB
storage, already integrates Aternos's codex stack), the Composer dep
plan (indifferentketchup/codex via Gitea VCS pinned to v0.1.0), the
multi-file/session model decision (option iii — session-as-entity
wrapping N files, with mclogs single-pastes degenerating to
sessions-of-size-1), the UI changes (file-type tabs, redaction
toggle gated on Step 4), the API surface (session-aware new endpoints
plus legacy /api/1/log routes preserved for back-compat), a directional
string/branding inventory at file-level (line-precise inventory
deferred until the fork is cloned and grep-able), the migration
strategy (keep legacy routes, strip aternos/codex-* and Sherlock and
Aternos\Mclogs namespace), and open questions including the codex
Redactor decision deferred to Step 4.

No iblogs code is written by this commit. The fork, rename, and rewire
happen in a follow-up session after design approval.
2026-05-01 13:03:48 +00:00
52ff8cb3fe docs: add CHANGELOG.md with v0.1.0 entry
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
Keep-a-Changelog format, dated 2026-05-01, sections Added / Changed /
Deferred. Captures the framework rename to IndifferentKetchup\Codex\*
(Aternos namespace fully removed in 66a2fcc, MIT LICENSE preserves
original copyright), the components-outer-with-game-suffix layout
(option 1 from the Phase A Q3 decision, not option 3), the package
name indifferentketchup/codex, and the eight analysers shipped across
Phase B.1 / B.2 / B.3. Redactor utility, non-PZ games, and Packagist
publication land in Deferred.
v0.1.0
2026-05-01 12:57:46 +00:00
1485507c8f docs: add Redactor utility design spec (deferred)
Forward-looking design for the codex-side PII redactor utility flagged
in Phase A Step E (Q5) and explicitly deferred from Phase B. Captures
the per-game redactor shape (RedactorInterface plus
ProjectZomboidRedactor under src/Util/), the rationale for not using
a single generic regex utility (PII detection is context-sensitive),
the replacement conventions that match the synthetic fixture
placeholders, the regex anchor shapes, and the open questions for v1
vs v2.

Status: deferred. Not implemented in this commit. The spec exists so
iblogs's upload-time PII story has a referenced design to point at,
and so a future implementation pass has a clear contract to start
from.
2026-05-01 12:54:57 +00:00
ed920485dc docs: backfill Phase B.3 spec and plan
Retroactive design + plan documentation for Phase B.3 (deferred
analysers requiring custom Analyser subclasses for cross-entry and
threshold logic). Records the architectural shift away from vanilla
PatternAnalyser, the threshold constant rationale (event-pairing /
sliding-window / consecutive-snapshot deltas), and the synthetic
fixture extensions that exercise both trigger and non-trigger paths.
Plan is as-built with checkboxes pre-checked and SHAs referenced.
2026-05-01 12:53:32 +00:00
b99d8f3061 docs: backfill Phase B.2 spec and plan
Retroactive design + plan documentation for Phase B.2 (PvP combat
detection plus six admin verb-dispatch insight classes), reconstructed
from chat history and git log. Mirrors the shape of the existing
Phase B.1 docs. Plan is as-built with checkboxes pre-checked and
commit SHAs referenced inline; Deviations section captures the
90c85a0 brace-fix interlude.
2026-05-01 12:51:26 +00:00
38fa1471ba Expand README with worked example and architecture overview
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
Replaces the four-line stub with a usable landing page: install line,
end-to-end PHP example showing how a caller goes from a log file to
analysed insights, sample (placeholder-laden) output, a one-diagram
architecture summary, and a per-game support table. Sends interested
readers to CLAUDE.md for the extension guide and developer setup so
this file stays focused on consumers.

The example uses Project Zomboid because that is the in-tree reference
implementation. Output is illustrated with placeholder identifiers
(<hash>, <mod_id>, <missing>) rather than copied real-log content.
2026-05-01 05:41:36 +00:00
1cdc78c54c Refresh CLAUDE.md for Phase B.3 analyser additions
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 0s
The framework architecture section claimed PatternAnalyser was the
sole analysis surface; Phase B.3 introduced three custom Analyser
subclasses (ConnectionFailureAnalyser, ItemDuplicationAnalyser,
SkillProgressionAnomalyAnalyser) for cross-entry and threshold logic
that PatternAnalyser cannot express. Add a new bullet explaining when
to extend Analyser directly, plus an enumeration of which Log subclass
returns which kind of analyser from getDefaultAnalyser().

Also bumps the ProjectZomboid summary line from "11 log subclasses,
11 pattern classes" to include the analyser surface (12 Insight
classes plus 3 Analyser subclasses).
2026-05-01 05:36:51 +00:00
60f12bc868 Replace deprecated ::set-output with GITHUB_OUTPUT
GitHub deprecated the ::set-output workflow command in 2022 and the
runners now emit warnings on every CI run. Switch to writing the
'name=value' line into the file pointed to by \$GITHUB_OUTPUT, which is
the documented modern equivalent. The downstream cache step already
references steps.composer-cache.outputs.dir, no other change needed.
2026-05-01 05:35:57 +00:00
0c90e40a28 Add SkillProgressionAnomalyAnalyser
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 0s
Compares consecutive perks-snapshot rows per Steam ID and emits a
SkillProgressionAnomalyProblem for any single skill whose level gained
more than THRESHOLD_DELTA between two snapshots. Login/Logout/LevelUp
event rows are skipped via a perk-pair regex check on the bracketed
event field.

Threshold of 3 reflects PZ's slow leveling pace: typical session bridges
should not produce four-or-more level jumps in a single skill. The
constant is documented inline so operators can tune for modded XP
servers without touching analysis logic.

Synthetic fixture extended with a PlayerSuspect Steam ID carrying two
snapshots: Strength jumps 2 -> 10 (delta +8, triggers), Fitness jumps
2 -> 8 (+6, triggers), Maintenance jumps 0 -> 3 (+3, exactly at
threshold, does NOT trigger). The existing single-snapshot players
remain noise-free.
2026-04-30 22:43:44 +00:00
ba3fae8736 Add ItemDuplicationAnalyser
Sliding-window heuristic over (Steam ID, item code) groups: any window of
THRESHOLD_WINDOW_SECONDS containing THRESHOLD_COUNT or more positive-delta
events for the same player/item pair triggers a Problem. Negative deltas
(drops, transfers out) are filtered. Five events in ten seconds (defaults)
encodes the rule of thumb that legitimate gameplay rarely produces five
identical items in that span.

Constants live as class constants on the analyser so operators can
override via subclass without touching analysis logic; the docblocks
record the justification.

Synthetic fixture extended with a 6-event burst (AdminUser +
Base.Bullets9mm in <1s) and a 4-event sub-threshold group (Player1 +
Base.Plank scattered over 4 minutes) to exercise both paths.
2026-04-30 22:41:36 +00:00
73e9ca6181 Add ConnectionFailureAnalyser
First custom Analyser subclass in this game tree. PatternAnalyser
operates per-entry without cross-entry state, so pairing
'attempting to join' with 'allowed to join' per Steam ID requires a
bespoke pass over the log. The analyser counts attempts and allowed
events per Steam ID and emits a ConnectionFailureProblem for each
player whose attempt count exceeds their allowed count. Unmatched
'attempting to join used queue' rows are surfaced as failures in v1
because a long queue wait is indistinguishable from a real failure
without timing context.
2026-04-30 22:39:13 +00:00
c444e8543b pre-phase-B.3 checkpoint 2026-04-30 22:38:00 +00:00
c57d646229 Wire ProjectZomboidAdminLog default analyser
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
2026-04-30 21:48:31 +00:00
51eb2de282 Wire ProjectZomboidPvpLog default analyser 2026-04-30 21:47:51 +00:00
d15fc81f9f Add AdminTeleportedInformation insight 2026-04-30 21:47:14 +00:00
64641fa8e8 Add AdminReloadedOptionsInformation insight 2026-04-30 21:46:47 +00:00
b7b89ef24e Add AdminChangedOptionInformation insight 2026-04-30 21:46:13 +00:00
caed04db10 Add AdminGrantedAccessInformation insight 2026-04-30 21:45:34 +00:00
a2faa551a1 Add AdminAddedXpInformation insight 2026-04-30 21:45:12 +00:00
0d85a05df3 Fix missing closing brace in AdminPattern
The previous commit's Edit replaced the TELEPORTED constant including its
trailing closing brace and forgot to add the brace back. Tests went red
with a ParseError. Restoring the brace.
2026-04-30 21:44:34 +00:00
90c85a052f Add AdminAddedItemInformation insight 2026-04-30 21:44:08 +00:00
55f769ca1e Add PvpDamageInformation insight 2026-04-30 21:43:24 +00:00
df62da1d6e pre-phase-B.2 checkpoint 2026-04-30 21:42:51 +00:00
3db825cfdc Wire ProjectZomboidServerLog default analyser
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 0s
2026-04-30 21:34:02 +00:00
423c6d3963 Add ServerExceptionProblem insight 2026-04-30 21:33:07 +00:00
1d09358e7b Add ModMissingProblem and ModMissingSolution 2026-04-30 21:32:15 +00:00
4be6ebac10 Add ModLoadInformation insight 2026-04-30 21:31:33 +00:00
11efa66494 Add EngineVersionInformation insight 2026-04-30 21:31:01 +00:00
e45fd85665 pre-phase-B checkpoint 2026-04-30 21:30:26 +00:00
499f4c7211 Plan Phase B.1 ServerLog analysers 2026-04-30 21:29:08 +00:00
1a443df662 Document Phase B.1 ServerLog analyser design
Captures the decision to forgo custom Analyser subclasses (the framework's
PatternAnalyser already handles multi-line entry text via Entry::__toString),
the five Insight components under src/Analysis/ProjectZomboid/, the new
DebugServerPattern::EXCEPTION constant for header+stack-body capture, the
PatternAnalyser configuration that ServerLog::getDefaultAnalyser will return,
the per-class coalescing semantics, and the test plan that drives the existing
synthetic debug-server-minimal.txt fixture end-to-end.
2026-04-30 21:24:32 +00:00
3640ca8291 Add CLAUDE.md project guidance and ignore Claude local artefacts
Some checks failed
Tests / Run tests on PHP v8.4 (push) Failing after 1s
Tests / Run tests on PHP v8.5 (push) Failing after 1s
Captures the framework architecture, the docker-based PHP/Composer
runtime, the components-outer game subtree convention, the
PatternParser-and-named-groups gotcha, the workflow conventions that
emerged during the rename and ProjectZomboid build-out, and the
synthetic-only fixture rule for committed test data. Adds .claude/ and
.claude.local.md to .gitignore so Claude session state and personal
overrides don't ride along.
2026-04-30 21:01:10 +00:00
cca5208cc0 Wire ProjectZomboidDetective with all 11 log classes
Constructor pre-registers every concrete ProjectZomboid Log subclass so
that detect() can dispatch on filename hint plus content signature.
Data-provider test verifies each of the eleven synthetic fixtures
resolves to its expected Log class via the public Detective surface.
2026-04-30 20:43:51 +00:00
27424f6a14 Add ProjectZomboidBurdJournalsLog (BurdJournals.txt)
Per-line warnings emitted by the BurdJournals mod, format
'[time] [BurdJournals] LEVEL: message.'. Parser captures time, the
[BurdJournals] tag as the entry prefix, and the LEVEL token. Detectors:
filename match plus content signature on the literal '[BurdJournals]'
tag bracket.
2026-04-30 20:42:52 +00:00
d7c36ffc07 Add ProjectZomboidUserLog (user.txt)
Two row variants: low-level Connection events and player join/disconnect
events. The LINE regex accepts both shapes; analysers route via
CONNECTION (action/index/guid/id) and PLAYER_EVENT (steamid/player/event)
named-group regexes. Detectors: filename match plus content signatures
on either variant.
2026-04-30 20:42:19 +00:00
7b3342b3d2 Add ProjectZomboidAdminLog (admin.txt)
Free-form English message body with verb-dispatched analyser regexes
(ADDED_ITEM, ADDED_XP, GRANTED_ACCESS, CHANGED_OPTION,
RELOADED_OPTIONS, TELEPORTED). Parser captures only the timestamp,
since the admin name itself can include parentheses or whitespace.
Detectors: filename match plus content signatures on
'added item Base.X in Y's inventory' and 'granted ROLE access level on'.
2026-04-30 20:41:31 +00:00
af05c97dfc Add ProjectZomboidPvpLog (pvp.txt)
Two row variants share the file: Safe House toggles ([LOG] Safety:)
and Combat events ([INFO] Combat: ... weapon=... damage=...). Parser
captures time, level, and the subsystem token (Safety|Combat) as the
entry prefix. COMBAT and SAFETY regexes extract structured fields,
including support for negative Z coordinates from basement levels.
Synthetic fixture covers both variants and represents zombie/vehicle/
real-PvP weapon types so analysers can later filter on damage>0 and
weapon!=zombie.
2026-04-30 20:40:03 +00:00
00c17261a3 Add ProjectZomboidPerkLog (PerkLog.txt)
Per-line skill snapshot log; each Login event is paired with a perks
row containing comma-separated Skill=N tokens. PERK_PAIR regex extracts
each pair via preg_match_all for analyser use. Detectors: filename
match plus content signature on the unique '[Cooking=N, Fitness=N,
Strength=N,' prefix of the perks-row bracket.
2026-04-30 20:38:39 +00:00
6387fb1c52 Add ProjectZomboidMapLog (map.txt)
Per-line world object placement/removal log. LINE pattern handles both
integer and floating-point coordinates and both 'Base.X' and
'IsoObject (X)' object encodings. Detectors: filename match plus content
signature on the added/removed verbs paired with Base./IsoObject prefix.
2026-04-30 20:37:50 +00:00
49cf4927f6 Add ProjectZomboidItemLog (item.txt)
Per-line item gain/loss event log. Parser captures only the timestamp;
analysers decompose location/delta/item via ItemPattern::FIELDS.
Detectors: filename match plus content signature on the
container/floor/inventory location verbs paired with a signed delta.
2026-04-30 20:37:06 +00:00
cc9c512667 Add ProjectZomboidCmdLog (cmd.txt)
Per-line client RPC trace. Parser captures only the timestamp;
analysers decompose steamid/player/command/coords via CmdPattern::FIELDS.
Detectors: filename match plus content signature on the
'steamid "name" command @ x,y,z' line shape.
2026-04-30 20:36:26 +00:00