CSE Roadmap

Specialist tier · about 5 hours · 13 parts

Part 6 of 13 · 2 min read

What the example found

The three real branches' diff sizes, real pytest results, checker flags, and description checks.

How to read the branch-size table: each row is one of three real branches built with git and holding the same underlying bug fix, with different amounts added around it.

Branch (toy repo) Files Changed lines Where the lines are
Good: fix and tests 2 22 source 12, tests 10
No test: same fix 1 12 source 12
Bloated: fix, reformat, rename, print 3 51 source 13, router reformat 34, tests 4

What to notice: the bloated branch's actual source fix is 13 lines, almost identical to the other two branches' 12. So literally all of the extra size (38 of 51 lines) is unrelated reformatting, a rename, and a debug print. None of those were needed by the stated bug fix.

How to read the pytest-run table: each row is a real pytest invocation against one branch or one combination of code and tests.

Real pytest run Result
main, existing tests 3 passed
main + good branch's tests 2 failed, 3 passed
good, own tests 5 passed
no-test + good branch's tests 5 passed
bloated, own tests 3 passed
bloated + good branch's tests 1 error (import of the renamed pick)

What to notice: the bloated branch's own test run shows "3 passed" with no apparent problem. But that is only because it rewrote the tests to match its own rename. Running the good branch's unmodified tests against the bloated code produces an import error. That exposes how the rename silently breaks anyone who imports the old name.

How to read the checker-flags table: each row is one of the three branches; columns are what the diff checker and the commit-message checker flagged.

Checker Good No test Bloated
Diff flags none no_tests formatting_churn, debug_leftover, undocumented_api (false alarm)
Commit flags none not_imperative ("Fixed parsing") subject_period, not_imperative

What to notice: the checker flags the no-test branch for missing tests and the bloated branch for noise. But it never catches the one thing that actually matters most about the bloated branch, the breaking rename. That only showed up when the good branch's own tests were run against it.

How to read the description table: each row is a fictional pull-request description at increasing levels of completeness.

Description (fictional) Flags
"fix bug" no issue link, no why, no testing, too short
One sentence with an issue link no why, no testing, too short
Issue link, problem, change and test evidence none

What to notice: adding just the issue link to a one-sentence description still leaves three flags standing. A link alone doesn't answer why the change is needed or how it was verified. That is why the checker treats these as three separate, independent requirements rather than one combined "has enough information" check.

{{svg:path|A contribution path and a ladder of contribution types.}} {{svg:lab|Three pull requests built with real git and run with real pytest.}}