Skip to content

Polished the README and docs, converged source comments and corrected stale claims. - #1057

Merged
AlexSkrypnyk merged 4 commits into
mainfrom
feature/polish-261015-1405
Oct 15, 2026
Merged

AlexSkrypnyk merged 4 commits into
mainfrom
feature/polish-261015-1405

Conversation

@AlexSkrypnyk

@AlexSkrypnyk AlexSkrypnyk commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Summary

README.md now runs in the order a new user needs it: installation and Quick start come before the generated step index, JavaScript browser drivers sits under Installation, Exceptions sits under Public API and versioning, and the hook-skipping, entity cleanup and same-title sections moved into docs/usage.md. Every README section heading, feature bullet and docs index entry carries an emoji, and so does each hand-written page title, so docs.php now replaces the README index under ## 📋 Available steps.

The docs and comments had drifted from the code in places a reader would act on. CONTRIBUTING.md sent renamed CI legs to required checks on the deleted 4.x branch, and the CI workflow still triggered on it. WatchdogTrait documented @watchdog:{type} as limiting the tracked types when it adds to php, EckTrait claimed to create ECK types and bundles, and MetatagTrait described resolving against the whole Mink base URL rather than its origin. src/Backend/Drupal/Core/Field/README.md showed (array) $stub, a Backend\Core11 namespace and an automatic classifier lookup that Core::createFieldClassifier() doesn't do. 33 comments in src/, tests/, scripts/ and docs.php made claims like these, and each was checked against the code before it changed.

After merge, STEPS.md, HELPERS.md and the README step index carry the corrected trait descriptions, and about 4,800 source comments read as plain technical statements: 75 rewritten and 2 deleted, mostly long sentences split and history words dropped. No step text, method signature, failure message or test assertion changes: outside the docs.php marker string, every PHP change is a comment, and a token-level comparison against main confirms it. MIGRATION.md keeps its tables and headings, and docs/architecture/ is unchanged because nothing structural moved.

Before / After

BEFORE  README.md                          AFTER  README.md
┌───────────────────────────────┐          ┌───────────────────────────────┐
│ What is it?                   │          │ What is it?                   │
│ Features                      │          │ Features                      │
│ Supported versions            │          │ Supported versions            │
│ Available steps (57 rows)     │          │ Documentation                 │
│ Documentation                 │          │ Installation                  │
│ Installation                  │          │   Optional dependencies       │
│   Optional dependencies       │          │   JavaScript browser drivers  │
│ Quick start                   │          │ Quick start (steps 1-4)       │
│   Steps 1-4                   │          │ Available steps (57 rows)     │
│   JavaScript browser drivers  │          │ Public API and versioning     │
│   Exceptions                  │          │   Exceptions                  │
│   Skipping hooks ─────────────┼──┐       │ Writing tests with AI         │
│   Automatic entity cleanup ───┼──┤       │ Contributing                  │
│   Several entities, 1 title ──┼──┤       └───────────────────────────────┘
│ Public API and versioning     │  │
│ Writing tests with AI         │  │       docs/usage.md
│ Contributing                  │  │       ┌───────────────────────────────┐
└───────────────────────────────┘  └──────►│ Switch a trait off (+ the tag)│
                                           │ Entities a scenario creates   │
                                           │   Automatic cleanup           │
                                           │   Several entities, 1 title   │
                                           └───────────────────────────────┘

Changes

README and docs

  • README.md: reordered as above, added emoji to every section heading, feature bullet and docs index entry, wrapped the 2 long commands, and fixed 3 claims. Trait methods are prefixed with the trait's name, not "properly namespaced". "Ensure that your behat.php" no longer links to this repository's own test harness configuration. The logo alt text lost a doubled word.
  • docs/usage.md: took the 3 moved sections as written. Skipping hooks joined Switch a trait off, which covered the enabled option but only named the skip tag, and Entities a scenario creates also points at BEHAT_STEPS_DISABLE_CLEANUP.
  • docs.php: the README start marker is now ## 📋 Available steps.
  • CONTRIBUTING.md: required checks live on the main ruleset, the docs validation list includes the check that every documented step matches exactly 1 definition, and 2 grammar slips in the local setup steps are fixed.
  • src/Backend/Drupal/Core/Field/README.md: the stub API, the Backend\Drupal\Core{N} lookup in DrupalBackend::setCoreFromVersion(), the createFieldClassifier() override, bundle scoping in the pipeline walk-through, and the UTC reading of date_recur values now match the code. Its prose is 1 line per paragraph and its examples fit 80 columns.
  • docs/configuration.md, docs/http-clients.md, docs/scenario-styles.md, SECURITY.md: page title emoji, and number words as digits where they count something.
  • MIGRATION.md, CLAUDE.md: 2 PHP examples and 3 shell commands wrapped to 80 columns. The long lines left in MIGRATION.md are literal error output and Gherkin steps, which can't wrap.
  • .github/workflows/test.yml: removed the deleted 4.x branch from the push and pull request triggers.

Source comments

  • Trait docblocks that reach STEPS.md, HELPERS.md or the README index: WatchdogTrait (@watchdog:{type} adds to php), EckTrait (works on existing ECK types and bundles), MetatagTrait (resolves against the base URL's origin), BigPipeTrait (the big_pipe_nojs cookie goes only to a browser driver without JavaScript) and TaxonomyTrait (creates terms in an existing vocabulary).
  • Other src/ claims: DrupalContext and WebContext mixed up registering and extending a context, BlackboxBackendInterface excluded only 1 capability namespace, RolesAlias called its user capability a backend, DateRecurHandler said date_recur reads value in the record's own timezone (it reads it as UTC), and ParametersTrait, MinkAwareTrait, EntityLifecycleTrait, FieldTrait and BackendInterface each stated 1 detail more strongly or more narrowly than the code.
  • scripts/provision.php, docs.php and tests/behat/bootstrap/FeatureContextTrait.php: 6 docblocks described their constant, function or hook inaccurately.
  • Tests: 12 docblocks and comments in ClassNamingTest, TraitMethodNamingTest, AuthenticatorTest, DrupalBackendDelegationTest and 6 kernel tests claimed coverage they don't have, or described Drupal behavior the wrong way round, such as entity_test's default bundle.
  • The register pass over the rest: 75 comments rewritten and 2 deleted, along with 2 clauses, across 47 files.

Validation

  • gitleaks over all 838 commits and a pattern sweep of the tracked files found no secrets. The token in the Codecov badge URL is the public graph token.
  • README.md, LICENSE, SECURITY.md and CONTRIBUTING.md all exist with the expected casing.
  • GitHub secret scanning is switched off for this repository. It's free on public repositories and worth turning on.

Follow-up

  • Reconcile 3 behaviors with the rules and docs that describe them #1056 groups the 3 places where the code and its documented intent disagree and a maintainer has to pick a side: the protected override points in src/Backend, the cookie failure messages, and the timezone of a date_recur value.
  • Left as they are, with no issue: the accessibility warn tag alias isn't documented, discoverTraitFiles() also yields AssertionException.php (harmless while it declares no methods), the post-stop assertion in testMailLifecycleRoundTrip passes whatever mailStopCollecting() does, and 2 deleteEntity() paths have no kernel test.

Checks

  • ahoy lint: phpcs, PHPStan, Rector, gherkinlint, the layer lint and the trait lint all pass.
  • ahoy lint-docs: the generated documentation is up to date.
  • ahoy test-unit: 9,794 tests and 12,336 assertions pass.

Summary

  • Reordered the README for new users and moved hook-skipping and entity-cleanup guidance to docs/usage.md.
  • Updated documentation, source comments, and the Drupal Field README to correct or clarify claims.
  • Added emoji to selected headings and documentation index entries.
  • Removed the deleted 4.x branch from CI triggers.
  • No step text or method signatures changed, based on the supplied change summary. The available evidence does not establish a violation of the step-definition rules in CONTRIBUTING.md.

Validation

The author reports that ahoy lint, ahoy lint-docs, and ahoy test-unit passed. The reported unit test run covered 9,794 tests and 12,336 assertions. These results were not independently verified.

Review findings

Severity counts are unavailable because current review findings were not supplied. No Critical step-definition violations are established by the available evidence.

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 226c6877-2c85-46c6-9bf5-13d51d44df41
📥 Commits

Reviewing files that changed from the base of the PR and between d78674a and 0c8cb67.

📒 Files selected for processing: 1
  • .github/workflows/test.yml
+---------------------------------+
| My GPU is bigger than your GPU. |
+---------------------------------+
  \
   \   (\__/)
       (•ㅅ•)
       /   づ

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: ASSERTIVE
  • Plan: Team
  • Run ID: 52a52019-eb10-4586-93c2-470b1e31e59c
📥 Commits

Reviewing files that changed from the base of the PR and between b629ac5 and d78674a.

📒 Files selected for processing: 82
  • .github/workflows/test.yml
  • CLAUDE.md
  • CONTRIBUTING.md
  • HELPERS.md
  • MIGRATION.md
  • README.md
  • SECURITY.md
  • STEPS.md
  • docs.php
  • docs/configuration.md
  • docs/http-clients.md
  • docs/scenario-styles.md
  • docs/usage.md
  • scripts/lint-layers.php
  • scripts/lint-traits.php
  • scripts/provision.php
  • src/Backend/Alias/RolesAlias.php
  • src/Backend/BackendInterface.php
  • src/Backend/BlackboxBackendInterface.php
  • src/Backend/Capability/CacheCapabilityInterface.php
  • src/Backend/Capability/RequestEnvironmentCapabilityInterface.php
  • src/Backend/Drupal/Capability/QueueItemCapabilityInterface.php
  • src/Backend/Drupal/Capability/RedirectCapabilityInterface.php
  • src/Backend/Drupal/Capability/SearchApiCapabilityInterface.php
  • src/Backend/Drupal/Capability/UserActivityCapabilityInterface.php
  • src/Backend/Drupal/Core/Core.php
  • src/Backend/Drupal/Core/Field/DateRecurHandler.php
  • src/Backend/Drupal/Core/Field/README.md
  • src/Backend/Drupal/DrushBackend.php
  • src/Backend/Random/RandomGenerator.php
  • src/Backend/Random/RandomGeneratorInterface.php
  • src/DrupalContext.php
  • src/Extension/Browser/Element/DocumentElement.php
  • src/Extension/Browser/MinkAwareTrait.php
  • src/Extension/Config/ParametersTrait.php
  • src/Extension/Selector/RegionSelector.php
  • src/Extension/ServiceContainer/BackendProviderInterface.php
  • src/Extension/ServiceContainer/BehatStepsExtension.php
  • src/Steps/Drupal/BigPipeTrait.php
  • src/Steps/Drupal/BlockTrait.php
  • src/Steps/Drupal/CacheTrait.php
  • src/Steps/Drupal/ConfigOverrideTrait.php
  • src/Steps/Drupal/ConfigTrait.php
  • src/Steps/Drupal/ContentTrait.php
  • src/Steps/Drupal/DrushTrait.php
  • src/Steps/Drupal/EckTrait.php
  • src/Steps/Drupal/EmailTrait.php
  • src/Steps/Drupal/MenuTrait.php
  • src/Steps/Drupal/TaxonomyTrait.php
  • src/Steps/Drupal/UserTrait.php
  • src/Steps/Drupal/WatchdogTrait.php
  • src/Steps/Drupal/WebformTrait.php
  • src/Steps/Helper/Drupal/EntityLifecycleTrait.php
  • src/Steps/Helper/Drupal/FixtureFileTrait.php
  • src/Steps/Web/AccessibilityTrait.php
  • src/Steps/Web/BasicAuthTrait.php
  • src/Steps/Web/DiagnosticsTrait.php
  • src/Steps/Web/FieldTrait.php
  • src/Steps/Web/KeyboardTrait.php
  • src/Steps/Web/MetatagTrait.php
  • src/Steps/Web/ModalTrait.php
  • src/WebContext.php
  • src/WebRawContext.php
  • tests/behat/bootstrap/FeatureContextTrait.php
  • tests/phpunit/src/CapabilityContractTest.php
  • tests/phpunit/src/ClassNamingTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreEntityMethodsKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreMailMethodsKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreNodeMethodsKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreSystemMethodsKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreUserMethodsKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/Field/DateRecurHandlerKernelTest.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/Field/FieldHandlerKernelTestBase.php
  • tests/phpunit/src/TestConventionTest.php
  • tests/phpunit/src/TraitMethodNamingTest.php
  • tests/phpunit/src/Unit/Backend/Drupal/Core/CoreEntityLookupMethodsTest.php
  • tests/phpunit/src/Unit/Backend/Drupal/Core/Field/DatetimeHandlerTest.php
  • tests/phpunit/src/Unit/Backend/Drupal/DrupalBackendCreationAliasesTest.php
  • tests/phpunit/src/Unit/Backend/Drupal/DrupalBackendDelegationTest.php
  • tests/phpunit/src/Unit/Extension/Auth/AuthenticatorTest.php
  • tests/phpunit/src/Unit/Steps/Drupal/EmailTraitTest.php
  • tests/phpunit/src/Unit/Steps/Drupal/FileTraitTest.php
💤 Files with no reviewable changes: 5
  • .github/workflows/test.yml
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/Field/FieldHandlerKernelTestBase.php
  • tests/phpunit/src/Kernel/Backend/Drupal/Core/CoreUserMethodsKernelTest.php
  • tests/phpunit/src/Unit/Backend/Drupal/DrupalBackendCreationAliasesTest.php
  • src/Extension/Selector/RegionSelector.php

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Walkthrough

The test workflow now targets only main. Documentation and comments are revised across contributor guidance, product guides, source code, and tests. The usage guide adds explanations for trait-hook skipping and entity cleanup and matching.

Changes

Documentation and CI

Layer / File(s) Summary
CI and contributor guidance
.github/workflows/test.yml, CLAUDE.md, CONTRIBUTING.md, docs.php, scripts/*
The workflow filters out pushes and pull requests targeting 4.x. Contributor guidance names the main ruleset and adds a documented-step validation statement. Coverage commands and tooling comments are reformatted or clarified.
User-facing guides and indexes
README.md, HELPERS.md, STEPS.md, MIGRATION.md, SECURITY.md, docs/*
The README adds browser-driver setup and API/versioning guidance, updates documentation links, and removes three sections. The usage guide adds hook-skipping and entity cleanup and matching guidance. Other guides and indexes clarify or reformat existing descriptions.
Backend, extension, and trait documentation
src/Backend/*, src/DrupalContext.php, src/Extension/*, src/Steps/*, src/WebContext.php, src/WebRawContext.php
Source comments clarify documented contracts and behavior, including capability descriptions, trait behavior, entity selection, and backend preference. The summaries report no implementation changes.
Core and field-handler references
src/Backend/Drupal/Core/*
Documentation updates describe core behavior and the field-handler pipeline, including recurring-date values read as UTC and the record timezone used for occurrence computation.
Test documentation
tests/*
Test docblocks and comments are clarified or removed. Test implementations are unchanged.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~12 minutes

Change: Other

Suggested labels: Needs review

Merge Risk: ⚪ Minimal · up to d7867

The documentation and CI-scope updates are mergeable after normal checks; no actionable issue remains.

Pre-merge checks: Passed 5
Passed Passed checks: 5 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly summarizes the primary changes: README and documentation updates, source-comment alignment, and correction of stale claims.
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 24 functions across 50 files. (27 skipped:…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the branch list twice,
Then hops through guides made clear and concise.
New notes explain the hooks and cleanup,
While old comments get a tidier loop.
The burrow rests; the docs are nice!

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.46%. Comparing base (b629ac5) to head (0c8cb67).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1057   +/-   ##
=======================================
  Coverage   96.46%   96.46%           
=======================================
  Files         179      179           
  Lines        8995     8995           
=======================================
  Hits         8677     8677           
  Misses        318      318           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@AlexSkrypnyk AlexSkrypnyk added the Needs review Pull request needs a review from assigned developers label Oct 15, 2026
@AlexSkrypnyk
AlexSkrypnyk merged commit 46a0453 into main Oct 15, 2026
18 of 19 checks passed
@AlexSkrypnyk
AlexSkrypnyk deleted the feature/polish-261015-1405 branch October 15, 2026 05:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs review Pull request needs a review from assigned developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant