The debt in this repository

Free preview 5 min to read

A course about communicating technical debt is worthless without debt to communicate. So here is this application's, found by running the tools rather than by asking anyone's opinion.

What grep finds

$ grep -rn "TODO\|FIXME\|HACK\|XXX" app/ lib/

One line, and it is not a marker. It is lib/tasks/course_ruby.rake matching a regex that searches for the word TODO, as part of this repository's own course-authoring tooling. The application's own 258 Ruby files and 101 templates have zero.

That is worth pausing on, because the instinct is to read it as "this codebase has no debt." It means this codebase has no debt that anyone wrote down. The markers record what a developer noticed while typing. They cannot record what nobody noticed, what was decided in a meeting, or what became debt after the code was written and correct.

Every item below is real, and none of it has a TODO.

What the tools find, and what already happened to two of them

The lint job was red, and it has since been fixed.

$ bin/rubocop
422 files inspected, 22 offenses detected, 11 offenses autocorrectable
22  Layout/SpaceInsideArrayLiteralBrackets [Safe Correctable]
22  Total in 6 files

That is what this repository reported the day this register was first compiled. .github/workflows/ci.yml runs bin/rubocop -f github as one of its three jobs. And a job that stayed red taught people to stop reading it, which is lesson 2's whole argument. It was fixed the same week, in commit df99fec, touching the six files the scan named. Run bin/rubocop today and it reports zero offenses across 601 files.

The security scanner had six warnings, and both classes of them have since been fixed.

$ bin/brakeman
46 controllers, 28 models, 82 templates scanned in 1.2s
Security Warnings: 6
  3 x Format Validation (ValidationRegex), High confidence
  3 x SQL Injection, Medium confidence

The three High ones were the same mistake in three files: format: { with: %r{\Ahttps?://}i } with no \z anchor. The three Medium ones were all in app/queries/catalog/search_query.rb, which built a jsonb expression by interpolating a table name. Both were fixed the same week as the lint job. Commit e30c2a3 gave URL validation one owner (Partners::UrlPolicy), and commit ee9fa06 replaced the interpolated SQL with a literal lookup hash. Run bin/brakeman today and it reports zero warnings.

Three of eight items fixed inside a week, none of them with a TODO to mark them and none of them discussed in this course before now, which is itself worth noticing. Small, safe, evidence-backed debt gets paid quietly, as lesson 6 argues. It does not need this course to happen.

flowchart TB
  G["grep TODO/FIXME/HACK"] --> Z["nothing in application code"]
  T["the tools"] --> A["rubocop: was 22 offenses, fixed 2026-09-06"]
  T --> B["brakeman: was 6 warnings, fixed 2026-09-06 across two commits"]
  T --> C["ci.yml: 3 jobs, none runs the 1,206 examples"]
  Z --> D["debt nobody wrote down is still debt"]

What the previous courses found

Three more, each established by an experiment in an earlier course of this series, and all three are still open today:

The password policy is untested. MIN_LENGTH, MAX_LENGTH and the special-character rule in FORMAT can each be weakened and all 1,206 examples stay green.

RSpec's safety settings are commented out. spec/spec_helper.rb has random ordering, --only-failures persistence and :focus filtering inside a =begin block.

The error paths of the site-icon fetcher are untested. Partners::FetchSiteIconService rescues five exception classes and no example triggers any of them.

The register

# Item Evidence Effort Status
1 Lint job failing bin/rubocop Minutes Fixed 2026-09-06
2 RSpec order and failure persistence off spec/spec_helper.rb Minutes Open
3 3 High Brakeman warnings, missing \z bin/brakeman An hour Fixed 2026-09-06
4 Password policy constants untested Mutation run An hour Open
5 No test job in CI ci.yml Hours Open
6 HTTP error paths untested fetch_site_icon_service.rb Half a day Open
7 3 Medium SQL warnings in search bin/brakeman Half a day, carefully Fixed 2026-09-06
8 :unsafe_inline in the CSP style_src CSP initializer Days Open

Eight items were found, each with a command that produces the evidence. Five are still open.

That evidence column is what makes this a register rather than a complaint. "The code has debt" is an opinion. "bin/rubocop exits non-zero, and CI runs it" is a fact anyone can check in ten seconds. And the difference decides whether the conversation in lesson 5 goes anywhere. The rest of this course works from the five still-open rows. The three that are already fixed appear again in lesson 6, as the clearest example of what "do not ask" looks like in practice.

Key takeaways

  • Zero real TODO/FIXME/HACK markers in this application's 258 Ruby files and 101 templates.
  • Measured, and since fixed (2026-09-06): 22 rubocop offenses in 6 files, and 6 Brakeman warnings across two root causes.
  • Five items remain open: RSpec safety settings, the password policy, no test job, HTTP error paths, and :unsafe_inline.
  • CI has three jobs and none of them runs the 1,206 examples.
  • A register needs evidence and effort per row; without them it is a complaint rather than a list. And a good register drops a row the moment it is fixed.
Lesson 1 of 7 · free

Keep going with lesson 2

What debt actually costs

Principal is the work to fix a debt, interest is its ongoing cost, and how to quantify it honestly.

A free account also gives you the quizzes, your progress and notes, and the discussion.

Type to start searching...