Repository navigation
docfilters CLI v1.0.0: three ports, the shared contract, and the CI that keeps them together - #49
Merged
Merged
Conversation
Translated from the change on #50 by the /propagate-delta command. Review it as a translation: see DocFiltersCli/.claude/commands/review-port.md.
Translated from the change on #50 by the /propagate-delta command. Review it as a translation: see DocFiltersCli/.claude/commands/review-port.md.
Translated from the change on #50 by the /propagate-delta command. Review it as a translation: see DocFiltersCli/.claude/commands/review-port.md.
python port of #50
cpp17 port of #50
java port of #50
Contributor
Author
|
Link the test PR |
gwasiak
approved these changes
Nov 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docfilters CLI v1.0.0: three ports, the shared contract, and the CI that keeps them together
masteralready has the C# reference. This adds the other threeimplementations, the machinery that proves all four behave identically, and
the release pipeline that ships them.
466 new files, 15 changed.
The three ports
The same seven-verb command line in C++17, Python and Java, mirroring the
reference folder for folder and name for name so any two can be diffed by eye.
cpp17/samples/cpp17already fetchespython/java/No new dependencies in any of them. Java has no argument-parsing library at
all, because
samples/javahas none, so it binds argv with the samehand-written argument table the other three wrap their parser behind.
The contract
tests/conformance/is the authority, 2,273 lines in four line-orientedfixtures that every suite reads and compares byte for byte:
arguments.txtformats.txt--totoken and what it impliesout-names.txt--out-namerendering, and templates that must be rejectedplan-corpus.txtThey are written by hand from what the tool is meant to do, never dumped from
csharp/. A dumped file could only prove the four agree with each other, andwould never catch an argument nobody implemented.
Below the plan, where the fixtures stop, two more checks:
tests/e2e/end2end.pydrives any of the four against the real engine throughone
--cliflag, andtests/parity/compares the four to each other ratherthan each to a description.
CI
cli.ymlgrows from one job to fifteen: a change detector, four per-languagematrix jobs, cross-implementation parity, release validation, four packaging
jobs, the publish step, and a
CI gatethat always reports.Two new workflows enforce the premise that the four move together:
ports-landed.ymlblocks a pull request touching the reference untilthe three translations have merged into it, so the contract change and all
four implementations reach
masterin a single merge. Override label:ports-unaffected.ai-sync.ymldoes the moving. On theai-synclabel it runs ClaudeCode against
.claude/commands/propagate-delta.mdand opens one port pullrequest per language, each targeting the source branch. Inference goes
through Bedrock in our own account over OIDC, so the only stored secret is a
role ARN, scoped to a gated environment. Fork pull requests are refused with
no override.
These answer different questions from
cli.yml's existingcontract-orderjob, which is why they carry separate override labels.
Reference fixes
Found while porting, fixed in
csharp/first and then translated, each with afixture or unit test behind it:
JsonWriterescapes unpaired surrogates. Written literally, they have noUTF-8 encoding, and each implementation's encoder invented its own answer:
U+FFFD in C#,
?in Java, a fatalUnicodeEncodeErrorin Python. Reachablefrom an NTFS filename or malformed document metadata. Five new tests.
help --jsonusesJsonWriter, notJsonSerializer. It was the oneJSON surface in the tool emitted on a single line.
versionprints the informational version.GetName().Versionis alwaysfour components, so
1.0.0came back as1.0.0.0, a shape no port canreproduce.
<Version>now comes only fromVERSION.txtviaDirectory.Build.props.E_OUTPUT_EXISTSmessage: "pass --overwrite" to "use --overwrite", withthe fixture.
plan-corpus.txtnow lists all five error codes that cannot be provokedfrom argv and a filesystem, and says where each one is exercised instead.
Two of them,
E_INTERRUPTEDandE_UNSAFE_OUTPUT, were undocumented.Outside the sample
bindings/c/CMakeLists.txt: the Windows import library that ships withexisting binaries now wins over the committed copy, and the release URL is
resolved only when actually downloading, so a configure against local
binaries needs neither the network nor the GitHub API.
bindings/python:MakeDocPackand its two entry points, which the Pythonport needs for
--to docpack.bindings/java/lib/ISYS11df.jar: updated build..gitignore:.claude/was ignored wholesale, which would have hidden thechecked-in agent commands; now only worktrees and
*.local.json.Documentation
CLAUDE.mdandAGENTS.mdhold the rules,languages.ymlholds where eachimplementation lives and how it is built, and
design/porting/holds themethod plus one traps file per language, including one for C# itself read the
other way round: what the reference's constructs mean, for the ports to
reproduce.
Reviewing
Execution/in any implementation is the sample, and the rest is the plumbingany real tool needs. For the ports, the useful read is one port's diff beside
the reference file it mirrors, which is what the layout is for.
Automated translation tests
See the PR containing
automated translation from manual C# change into C++, python and java.