[ TOPIC ]
testing-strategy
212 real merged PRs across 26 projects, ordered easiest to hardest. Read them in order to see how testing-strategy shows up in production code, then go deeper with the free papers and talks below.
[ 01 // REAL PRs ]
Start here (junior) · 5
fix(ui): remove kind filter from appset page (#29310)
This PR demonstrates how to conditionally hide a UI filter based on context, propagate feature flags through React components, and add targeted tests for new logic.
feat(health): add health check for flink.apache.org/FlinkSessionJob
This PR teaches how to implement and test a custom health check for a Kubernetes CRD using Lua, including mapping resource states to health statuses and writing YAML-based test cases.
fix(ui): use hydrateTo branch name when set (#29554)
This PR demonstrates how to centralize conditional logic for UI display and add targeted unit tests to verify correct rendering based on configuration.
Fix #25018: Throw user-facing error when thread settings are NULL
This PR demonstrates how to add robust input validation and user-friendly error messages for configuration settings, along with corresponding negative tests.
feat(actions): add hibernate/rehydrate actions for CNPG Cluster
This PR teaches how to add custom resource actions to a Kubernetes operator by manipulating resource annotations and surfacing them in a UI, along with corresponding tests.
Next (mid) · 176
enhance: sort merged rerank results without per-comparison map lookups
This PR teaches how to optimize sorting by avoiding per-comparison map lookups, using struct-based sorting for performance, and demonstrates careful regression testing to ensure ordering correctness.
[FIXED] JetStream: decDeliveryCount underflow treated messages as exhausting MaxDeliver
This PR teaches how to correctly manage counter state in a map to avoid underflow bugs and subtle key-presence errors, with thorough reasoning and a regression test that demonstrates both the bug and its fix.
util: prevent SQLKiller state races during concurrent reset
This PR demonstrates how to fix subtle concurrency bugs by serializing state transitions under a mutex, and how to write deterministic tests for race conditions in concurrent systems.
Fix nil mb.cache dereference in secure removeMsgFromBlock
This PR teaches how to fix a subtle concurrency bug caused by lock release and cache expiry races, and how to write a targeted test to reliably reproduce and guard against such panics.
Hash the type-derived parameter in the ALP, FPC and GCD codecs
This PR teaches how subtle bugs can arise from missing type-derived parameters in cache keys, how to fix them by updating hash functions, and how to write robust, deterministic regression tests for such issues.
Cache the finalized cardinality in `uniq_v2` statistics
This PR demonstrates how to optimize expensive repeated computations by caching results, including how to safely memoize in a concurrent context and add targeted performance regression tests.
iscsi: prevent plugin directory path traversal
This PR teaches how to defend against path traversal vulnerabilities in filesystem operations by validating user-influenced paths, and demonstrates robust regression testing for security fixes.
sqlite: re-validate database state after reading options
This PR teaches how to defensively re-check resource state after user-supplied code runs, preventing use-after-close bugs and subtle security/memory issues in native bindings.
LDAP: escape DN template values, not full bind values (backport #17278)
This PR teaches how to correctly handle and test escaping of user-supplied values in LDAP distinguished name (DN) templates to avoid security issues and interoperability problems with Active Directory.
fix(runtime-vapor): clean up teleport targets on scope disposal
This PR demonstrates how to ensure proper cleanup of dynamically created DOM elements (teleports) in a reactive UI framework, with robust regression testing for edge cases.
fix(core): correctly discover value providers in discovery service
This PR teaches how to correctly handle edge cases in provider discovery logic and update characterization tests to guard against subtle bugs in dependency injection frameworks.
🐛 Fix line splitting in `format_sse_event` to comply with SSE spec
This PR teaches how to correctly implement and test line splitting for text serialization according to a protocol spec, highlighting subtle Unicode and newline handling issues.
♻️ Update internal annotation usage for compatibilty with Pydantic 2.11
This PR teaches how subtle changes in a dependency's internal API (Pydantic) can break integration in a framework (FastAPI), and how to adapt internal usage and testing to maintain compatibility across versions.
fix(ext/node): allow repeated child process signals
This PR teaches how to align process signal handling and child process lifecycle management with Node.js semantics, including careful error handling, state tracking, and robust testing for tricky edge cases.
gh-154086: Fix flamegraph thread sample counts
This PR demonstrates how to extend a profiling data structure and its serialization to accurately track and display per-thread sample counts in a flamegraph visualization, including thoughtful filtering and testing.
enhance: [3.0] sort merged rerank results without per-comparison map lookups
This PR demonstrates how to optimize sorting by avoiding repeated map lookups in comparators, using struct slices and stable sorting, and shows how to rigorously test for behavioral equivalence and tuple alignment.
fix: break out of MoveCursorForSingleChunk once the batch is full
This PR teaches how a subtle off-by-one bug in cursor advancement within a chunked data structure can cause correctness and performance issues, and how to write targeted tests to catch and prevent such logic errors.
gh-152204: Validate date and time fields in `_pydatetime.date{time}.fromisoformat`
This PR teaches how to robustly validate and parse fixed-format date/time strings, ensuring consistent error handling and input validation between Python and C implementations, and how to extend tests to cover subtle malformed cases.
fix(repl): skip regex literals when validating input
This PR teaches how to robustly handle ambiguous token parsing (regex vs division) in a REPL, including defensive error handling and thorough testing to avoid user-facing hangs.
Fix cross-tier JetStream consumer counting for limits
This PR teaches how to correctly enforce resource limits in a distributed system by distinguishing between global and per-tier quotas, and demonstrates how to write targeted tests for subtle multi-tenant accounting bugs.
fix(core): share existing singleton providers with lazily loaded modules
This PR teaches how to correctly share singleton providers between eagerly and lazily loaded modules, preventing resource leaks and duplicate instantiation in a dependency injection container.
ffi: reject detached ArrayBuffers as pointers
This PR teaches how to robustly validate and reject detached ArrayBuffers in FFI pointer conversions, ensuring safe memory handling and thorough error testing across JS and C++ boundaries.
stream: normalize fused stateless transform results
This PR teaches how to robustly normalize and validate intermediate data between fused stateless stream transforms, ensuring consistent data types and error handling in both sync and async pipelines.
Don't report unsupported types for never bound properties
This PR teaches how to correctly filter and report diagnostics in a source generator, ensuring only relevant errors are emitted for properties that are actually bound, and demonstrates how to write precise regression tests for subtle generator behaviors.
fs: pass symlink type in cp when filter is provided
This PR teaches how to handle subtle cross-platform filesystem differences (especially symlink types on Windows) and demonstrates robust testing for platform-specific bugs.
module: report unreadable package.json
This PR teaches how to handle and test for filesystem errors in module resolution, ensuring consistent error reporting when package.json files are unreadable.
[FIXED] Dynamic max_file_store shrinks on restart as the store grows
This PR demonstrates how to correctly handle dynamic resource limits (disk usage) across restarts, ensuring stability and correctness by accounting for already-used resources and providing a robust test for regression.
tty: add raw-vt and io raw modes
This PR teaches how to extend a public API with new, explicit modes while preserving backwards compatibility and ensuring robust cross-platform testing.
lightning: fix corrupted DECIMAL values in dictionary-encoded parquet files (#70436)
This PR teaches how in-place mutation of shared buffers can corrupt data when decoding dictionary-encoded values, and how to safely isolate buffers to prevent subtle memory bugs, with a strong regression test.
Ensure BackgroundService invokes ExecuteAsync after start
This PR teaches how to make asynchronous service startup deterministic in the face of cancellation races, and how to write robust, timing-sensitive concurrency tests.
fs: fix glob early return skipping sibling entries
This PR teaches how to fix a subtle bug in a tree traversal algorithm by correctly using a cache to avoid skipping valid sibling entries, and demonstrates how to write a deterministic regression test for order-dependent bugs.
crossks: clean up virtual server info on close and bootstrap failure
This PR teaches how to robustly clean up distributed system resources (etcd leases and records) on both normal shutdown and partial failure, with deterministic regression tests to verify cleanup.
Fix unloadable RDB when XSETID lowers entries_added
This PR teaches how to maintain internal consistency invariants in a distributed data structure, prevent subtle data corruption, and write regression tests for edge-case bugs.
Fix Environment.GetCommandLineArgs()[0] to report the host invocation name
This PR teaches how to evolve a public API to more accurately reflect platform semantics (argv[0]), while preserving backwards compatibility, handling edge cases, and updating tests to verify nuanced behavior.
repl: keep entries added while history file is loading
This PR teaches how to correctly merge in-memory and persisted state in asynchronous workflows, ensuring no data loss and adding a regression test to verify the fix.
Add tls-groups to control TLS named groups
This PR teaches how to safely expose and document low-level TLS configuration (named groups) in a server, handle cross-version OpenSSL compatibility, and add robust tests and documentation for a security-sensitive feature.
GH-50993: [CI][Integration] Add extension-wrapped union to integration data
This PR teaches how to design robust cross-implementation integration tests for extension types wrapping unions, and how to ensure correct type registration and buffer layout handling across serialization boundaries.
test_runner: match dotfiles in default coverage exclude
This PR teaches how to correctly handle glob patterns for file exclusion in test coverage, especially regarding dotfiles and the subtle differences between relative and absolute path matching.
sqlite: check sqlite3_step() and sqlite3_reset() results
This PR teaches how to correctly propagate deferred errors from native database APIs (like SQLite) into higher-level language bindings, and how to write targeted regression tests for such subtle error-handling cases.
Fix a crash when a primary-key range layer produces an empty pipe
This PR teaches how to robustly handle empty data structures in a complex data pipeline, prevent crashes from edge cases, and write focused regression tests to cover subtle distributed query execution bugs.
ddl: preserve cloud storage mode across owner failover
This PR teaches how to persist and recover distributed job state (like cloud storage configuration) across failover, propagate state through multi-step workflows, and robustly test for regression in distributed systems.
fix: treat unset IdField in zero-hit search results as empty in chain converter
This PR teaches how to robustly handle edge cases in data structures (specifically 'oneof' fields in protobufs) and demonstrates defensive error handling and regression testing for subtle, real-world bugs in distributed systems.
Fix LOGICAL_ERROR in DatabaseReplicatedDDLWorker with max_replication_lag_to_enqueue=0
This PR teaches how to enforce configuration invariants at parse time, handle backward compatibility for persisted settings, and write regression tests for subtle logic errors in distributed systems.
Fix ILLEGAL_TYPE_OF_ARGUMENT on nullable MySQL spatial columns
This PR teaches how to robustly map between differing database type systems, handle type system invariants, and write regression tests for subtle schema inference bugs.
Clamp max_streams_for_merge_tree_reading to avoid std::length_error
This PR teaches how to defensively clamp configuration values to prevent runtime errors, demonstrates how to write targeted regression tests for pathological settings, and shows how to propagate and enforce safe limits in system code.
GH-50312: [Python] Fix UUID extension type round-trip to pandas returning bytes
This PR demonstrates how to add a native conversion path for a custom extension type (UUID) from Arrow to pandas, including C++/Python interop, careful API design, and comprehensive regression testing for round-trip data fidelity.
Fix JIT-compiled min and max on DateTime64 comparing timestamps as unsigned
This PR teaches how C++ template specializations interact with inheritance, and how to write targeted regression tests for subtle type trait bugs in numerics.
Avoid deep copy of AccessRights in getGrantQueriesImpl when it is only read
This PR teaches how to optimize performance by avoiding unnecessary deep copies of complex data structures, with careful attention to when mutation is required and how to validate the change with targeted regression tests.
Fix logical error !raw_type->isNullable() in AND-compare chain optimization
This PR teaches how to robustly handle edge cases in query optimization involving nullable types, ensuring optimizer invariants and adding targeted regression tests to prevent logical errors.
Populate PrivateMemorySize64 on macOS
This PR teaches how to design a cross-platform API that gracefully handles OS-specific limitations, surfaces platform differences in documentation, and robustly tests and reviews error-prone system interop code.
Treat a leading CSV null as the first Tuple element
This PR teaches how to correctly handle ambiguous NULL values during CSV deserialization for tuple types, balancing per-element and whole-column defaults, and demonstrates robust test-driven bug fixing for serialization edge cases.
Reject a lossy codec on columns backing keys and indexes
This PR teaches how to enforce data integrity by rejecting lossy compression codecs on key columns, including how to propagate and test such validation in a complex codebase.
GH-49482: [C++][FlightRPC][ODBC] Fix inconsistent SQLGetInfo values in global connection
This PR teaches how to correctly derive configuration values from server responses, avoid subtle initialization bugs, and maintain robust cross-backend tests in a complex C++ ODBC driver.
lightning: optimize CSV field unescaping
This PR teaches how to replace a regular-expression-based string unescaping routine with a more efficient manual byte-scanning algorithm, including how to preserve edge-case behavior and add targeted benchmarks and tests.
tls: throw on invalid ALPNProtocols instead of aborting
This PR teaches how to robustly validate and handle user input in a Node.js API to prevent process crashes, replacing hard aborts with recoverable exceptions and adding comprehensive tests.
Fix wrong access type for SYSTEM CLEANUP and VIRTUAL PARTS UPDATE ON CLUSTER
This PR teaches how to correctly align privilege checks for distributed SQL commands, ensuring RBAC consistency and writing regression tests for access control changes.
🐛 Fix using `Json[list[str]]` type (issue #10997)
This PR teaches how to correctly handle and test complex typed form/query/header parameters (like Json[list[str]]) in FastAPI, including subtle error cases and robust test coverage.
fix(sync): correctly set operationState values on retry (#26530) (cherry-pick #28778 for 3.5)
This PR teaches how to robustly update nested Kubernetes CRD status fields using atomic JSON Patch operations to prevent stale state, and how to write regression tests to verify correct state transitions and field cleanup.
fix: recover AuthReconcile visitor panics (#29436)
This PR teaches how to safely recover from panics in concurrent goroutines by wrapping visitor callbacks, ensuring robust error handling in concurrent code and providing thorough regression tests.
fix(appset): restore ignoreApplicationDifferences after normalization
This PR teaches how to robustly handle subtle data normalization issues in controller reconciliation logic, including how to write regression tests for nil-vs-empty struct bugs and centralize normalization to prevent future regressions.
Improve the detection of changed hooks
This PR demonstrates how to accurately track and test changes in complex and composite React hooks, including those that internally use multiple primitive hooks, to improve developer tooling and debugging.
Fixes (#24115) : Use single-column ART index scan for IS NOT DISTINCT FROM
This PR teaches how to extend an index scan optimization to support SQL's IS NOT DISTINCT FROM, including handling of NULL semantics and verifying correctness with targeted tests.
Prune row groups for column-constant OR
This PR teaches how to optimize query execution by pruning row groups using cross-column OR predicates and demonstrates careful test coverage and code review for correctness and maintainability.
Prune row groups when an IN-list covers the whole zonemap rangend add
This PR teaches how to use zonemap statistics and IN-list analysis to optimize query execution by pruning unnecessary row group scans, including careful handling of edge cases and robust testing.
Fix ASOF join over EXCEPT ALL / INTERSECT ALL children
This PR teaches how physical query planning can introduce hidden columns (like row numbers for bag semantics), why logical and physical operator types must be kept in sync, and how to write regression tests for subtle type mismatches in query execution.
Fix statistics propagation for window aggregate functions (#23663)
This PR teaches how to correctly propagate statistics for window aggregate functions in a query optimizer, including how to structure callbacks and tests for stats-dependent aggregates.
[Clang] Diagnose conflict between always_inline/noinline attributes
This PR teaches how to robustly detect and handle mutually exclusive attributes (like always_inline and noinline) in a compiler, ensuring clear diagnostics and correct attribute propagation, with thorough test coverage.
[MLIR][Analysis] Fix incorrect RegionBranchOpInterface API usage in SliceWalk
This PR teaches how to correctly use and test an interface by matching API expectations with actual data structure semantics, preventing subtle bugs from index mismatches in control-flow analysis.
volumemanager: stop leaked reconcilers in tests
This PR teaches how to properly manage goroutine lifecycles in concurrent Go tests by using context cancellation instead of leaking background processes, preventing test flakiness and resource starvation.
CPUMANAGER: spread CPUs across cores using topology
This PR teaches how to improve CPU allocation by spreading CPU assignments across physical cores using topology-aware round-robin selection, with comprehensive tests covering diverse CPU layouts.
Windows: add fallback if `canonicalize` fails
This PR teaches how to robustly handle platform-specific API failures by designing a fallback mechanism for Windows path canonicalization, including safe FFI, error handling, and targeted testing.
[Quantity] Fix scaledValue to round negative Quantity values away from zero
This PR teaches how to correctly implement rounding away from zero for negative numbers in scaling functions, including handling edge cases and ensuring consistency between different numeric backends with thorough testing.
src: fix live lock between environments with blocked requests
This PR teaches how to fix a concurrency livelock by selectively waking only environments with progress-capable requests, with a clear explanation and a regression test.
fix(v-model): re-sync select when model is overridden in change handler
Demonstrates robust synchronization of select element state with model updates including Set handling, with detailed regression tests and error recovery.
Fix statefulset parallel scale down
This PR teaches how to fix a subtle deadlock bug by changing processing order in a controller, improving error handling, and includes a clear regression test to verify the fix.
fix(runtime-core): resolve $el for dev root comment fragment
This PR teaches how to correctly resolve component root elements in development mode by recursively handling dev fragments, child components, and Suspense boundaries, with comprehensive tests ensuring robustness.
fix(suspense): don't treat the leaving branch as the fallback while its mount is pending
This PR teaches how to handle complex UI state transitions and deferred rendering in Suspense with out-in transitions, including robust error handling and regression testing for asynchronous UI updates.
fs: stop stat()ing every entry in recursive readdir
This PR teaches how to optimize recursive directory reading by reducing expensive stat() calls using file type info from the OS binding, with careful error handling and API consistency.
Use Sign() to reject negative quantities in validateBasicResource
This PR teaches how to correctly validate numeric resource quantities by using a reliable sign method instead of an overflow-prone value accessor, with thorough testing and explanation.
sea: keep ELF segments on separate pages in --build-sea output
This PR teaches how low-level memory layout issues in ELF binaries can cause runtime failures on specific kernels, and how to write targeted tests to prevent such regressions.
events: fix weak listener retention overwrite
This PR teaches how to fix subtle memory retention bugs involving weak references and event listeners, with a clear explanation and regression tests.
fix: validate MATCH predicates are element-level [3.0]
This PR demonstrates how to robustly validate and test element-level match predicates in a query engine, ensuring correctness and preventing subtle errors in predicate evaluation.
Add jarmode tools command to print / export the SBOM
This PR demonstrates how to design and implement a robust CLI subcommand for extracting SBOMs from JARs, including manifest parsing, error handling, and comprehensive testing.
GH-48344: [Python] Fix Table.from_struct_array for empty ChunkedArray
This PR teaches how to robustly handle edge cases in API design by ensuring correct behavior and error messages for empty or invalid inputs, and demonstrates how to write targeted regression tests for such cases.
Fix nodeport egress tuple reuse for closed connections
This PR teaches how to correctly handle stale connection tracking entries to avoid incorrect packet rewriting, and demonstrates adding targeted tests for subtle networking bugs.
[FIXED] Preserve stream created time after recovery
This PR teaches how to maintain consistency between in-memory and persisted state across restarts, and how to write a regression test to guard against subtle state drift bugs.
fix: invalidate stale offsets for re-added struct array fields [3.0]
This PR teaches how to safely handle schema evolution in data structures by invalidating stale offsets when struct array fields are dropped and re-added, and demonstrates robust testing for such edge cases.
fix(runtime-vapor): preserve vdom props normalization in interop
This PR demonstrates how to preserve prop normalization and defaulting when bridging between two component systems, with a focused regression test to ensure correct inherited prop handling and attribute filtering.
🐛 Fix support for form values with empty strings interpreted as missing (`None` if that's the default), for compatibility with HTML forms
This PR teaches how to handle subtle edge cases in form data parsing for APIs, ensuring that empty string values from HTML forms are correctly interpreted as missing (None) for optional fields, and demonstrates how to write regression tests for such cases.
custom_response: allow LocalResponsePolicy to preserve or set response_code_details
This PR demonstrates how to extend an API with new configuration options while preserving backwards compatibility and updating tests and documentation accordingly.
feat(cli): optionally exclude status field when using `argocd admin export` command
This PR demonstrates how to add a CLI flag that changes export behavior, propagate it through code, update documentation, and write targeted tests for the new option.
fix(runtime-vapor): respect inheritAttrs ownership for component roots
This PR teaches how to correctly handle attribute inheritance and fallthrough in a component framework, including how to write regression tests for subtle API contract changes.
GH-50801: [Python] Expose the `record_batch_reader_source` Acero node (RecordBatchReaderSourceNodeOptions)
This PR teaches how to expose a new C++ data source node to Python, including Cython bindings, Pythonic API design, and comprehensive testing of generator-backed streaming data sources.
store: fix double-encoded API V2 keys in StoreBatchCop lock resolution
This PR teaches how to handle subtle API versioning issues in distributed systems by ensuring keys are encoded/decoded exactly once, and demonstrates how to write targeted tests to catch such regressions.
ddl: fix wait fts ready in ddl add index
This PR teaches how to robustly handle evolving API contracts and optional fields in distributed systems, including defensive parsing, error signaling, and comprehensive testing for backward compatibility.
fs: fix realpath of namespaced drive paths
This PR teaches how to handle platform-specific path edge cases in filesystem code, including careful error handling and targeted regression testing for Windows path resolution quirks.
stream: preserve falsy cancellation reasons
This PR teaches how to correctly distinguish between 'no error' and 'falsy error values' in cancellation APIs, ensuring that all cancellation reasons (even falsy ones like 0 or '') are preserved and surfaced to consumers, and demonstrates how to write robust tests for such edge cases.
server: limit the size for COM_STMT_SEND_LONG_DATA in each connection (release-7.5-20260724-v7.5.7) (#70350) | tidb-test=release-7.5.7 tikv=v7.5.7 pd=v7.5.7 tiflash=v7.5.7
This PR teaches how to enforce per-connection memory limits for prepared statement long-data in a database server, including careful memory accounting, error signaling, and robust test coverage for quota enforcement and cleanup.
sessionctx, config: gate FK shared-lock sysvar on next-gen
This PR demonstrates how to safely gate experimental features using configuration flags, enforce them in system variable logic, and thoroughly test both configuration and system variable behavior.
fix(apply): Warn users when `apply` is passed plan options -target, -destroy and -refresh-only if they disagree with the saved plan in use.
This PR teaches how to handle user error and flag misuse in CLI tools while preserving backwards compatibility, including adding targeted warnings and robust tests.
fix:[3.0] prevent crash on zero-length Arrow C Data buffers
This PR teaches how to safely handle zero-length C data buffers in Go to prevent unsafe pointer issues and runtime crashes, including how to write a targeted regression test for such a bug.
executor, util: fix hash join v2 null build key
This PR teaches how to correctly handle NULL values in hash join algorithms to prevent subtle bugs, including how to write targeted regression tests for join edge cases.
server: limit accumulated COM_STMT_SEND_LONG_DATA size (release-7.5-20260724-v7.5.7) (#69694) | tidb-test=release-7.5.7 tikv=v7.5.7 pd=v7.5.7 tiflash=v7.5.7
This PR demonstrates how to enforce resource limits (max packet size) for prepared statement parameters, propagate errors at the correct protocol stage, and write targeted tests for boundary and error conditions.
objstore: set correct part size in KS3 multipart uploads
This PR demonstrates how to ensure that configurable parameters (like multipart upload part size) are correctly honored in integration with third-party SDKs, and how to write regression tests to verify such behavior.
fs: treat `std::errc::permission_denied` as `EPERM` error
This PR teaches how to robustly handle platform-specific file system errors with retry logic and how to write precise, timing-sensitive tests for such behavior.
Ensure FileStream.CanSeek works for PIPE_ACCESS_OUTBOUND pipes
This PR demonstrates how to robustly determine and cache whether a file handle is seekable across platforms, including subtle Windows pipe cases, and how to write targeted regression tests for such low-level behavior.
Supply `_sample_factor` to the per-part read path used by mutations and merges
This PR teaches how to fix a subtle runtime error by ensuring virtual columns are properly materialized in all execution paths, and demonstrates how to write regression tests for such issues.
lib: fix ERR_INVALID_ARG_TYPE with --enable-source-maps
This PR teaches how to robustly handle error reporting when optional features (like source maps) may be missing, ensuring fallback behavior and adding regression tests to prevent subtle assertion failures.
fix shutdown tests
This PR teaches how to robustly locate and launch test dependencies in CI environments, handle process startup/cleanup errors, and improve test reliability by adapting to environment-specific constraints.
fix: empty SHA256 fingerprint for SSH known hosts entries on the UI
This PR teaches how to robustly parse and display SSH key fingerprints, handle malformed data gracefully, and write regression tests to prevent subtle UI/CLI bugs after dependency upgrades.
feat(hydrator): add metrics to app info (#29512)
This PR demonstrates how to extend a Prometheus metric with a new label, handle nuanced state reporting, and thoroughly test and document the change for robust observability.
fix: GRPCRoute health check ignores stale observedGeneration conditions (#28086)
This PR teaches how to correctly handle resource status consistency in distributed systems by filtering out stale status conditions based on observed generation, preventing incorrect health reporting during reconciliation lag.
fix: handle GrafanaFolder negative-polarity condition (#29395)
This PR teaches how to correctly handle negative-polarity conditions in resource health checks and how to write regression tests for subtle status logic changes.
fix(ui): show operation state on applications list page (cherry-pick release-3.5)
This PR demonstrates how to efficiently expose just enough API data for UI needs by projecting a presence marker instead of large payloads, and how to test such minimal projections.
[Storage] Add `byte_size` to `DataPointer`
This PR teaches how to robustly handle and report errors in benchmark runners, and how to isolate benchmark runs to avoid cache-related side effects between test variants.
Special handling for block comments after an operator
This PR teaches how to robustly handle tricky edge cases in SQL tokenization, especially around operators and block comments, and how to ensure parser correctness with targeted tests and error reporting.
Fix reservoir_quantile for DECIMAL types (preserve precision and supp…
This PR teaches how to extend an aggregate function to support additional types (DECIMALs), including careful handling of physical representations, serialization, and regression testing.
[DevTools] Fix WhatChanged scrolling out of view in profiler sidebar
This PR demonstrates how to refactor a UI to improve usability by restructuring scrollable areas and sticky headers, while discussing tradeoffs and testing strategies.
[Flang] Interface vs explicit intrinsics priority
This PR teaches how to adjust symbol resolution priority in a compiler to prefer user-defined interfaces over explicit intrinsics, including how to test such subtle language semantics changes.
[NVPTX] Restrict NVVM bf16 intrinsic upgrades to integer storage types
This PR teaches how to safely upgrade legacy intrinsic function signatures while preserving backward compatibility and ensuring invalid cases are properly rejected and tested.
kube-scheduler: redact extender TLS key data from the component config log
This PR teaches how to securely redact sensitive data from logs, ensuring secrets like private keys are not exposed, and demonstrates how to test that redaction is effective and non-mutative.
[clang][analyzer] Model function addresses in constant initializers
This PR teaches how to extend a static analyzer to correctly model function pointer constants, including how to write thorough regression tests for subtle language features.
quic: support P-384 and P-521 EC certificates
This PR teaches how to extend cryptographic support with runtime guards, proper error handling, and thorough testing for new certificate curve support in a network proxy.
DRA: block a dedicated allocation over a device's live persisted share
This PR teaches how to close subtle consistency gaps in resource allocation logic, especially when device sharing rules change dynamically, and how to write regression tests to prevent such bugs.
Make LMOVEM notifications consistent with LMOVE
This PR teaches how to identify and fix inconsistent API behavior with careful coordination of documentation, backward compatibility, and regression tests.
fix(runtime-vapor): avoid re-registering fired once listeners
This PR demonstrates how to robustly handle 'once' event listeners in a reactive UI framework, ensuring they are not re-registered after firing, and includes a regression test to verify correct behavior.
[mlir][gpu][math] Fix assertion in OpToFuncCallLowering on vector results
This PR demonstrates how to robustly handle type mismatches and assertion failures in code generation patterns, ensuring correct fallback to vectorization logic and adding regression tests to prevent future issues.
fs: apply nocase to literal glob exclude patterns
This PR teaches how to ensure consistent case sensitivity in file pattern matching across platforms and how to write targeted regression tests for subtle cross-platform bugs.
url: align URLPatternInit dictionary conversion with WebIDL
This PR teaches how to align a native API's dictionary conversion with WebIDL spec requirements, including property access order and omission of undefined properties, with thorough testing.
Diverse offload fixes
This PR demonstrates how to adapt macro and build system logic to support no-std environments and conditional linking, while maintaining robust test coverage for new configurations.
fix: fix incorrect restart=always restart logic
This PR teaches how to fix subtle restart policy bugs by adding explicit state labels, reconciling container lifecycle states, and writing integration tests to verify container restart behavior.
[RISCV] Disable shrink wrapping for SiFive CLIC and QCI handlers
This PR teaches how to correctly disable a compiler optimization (shrink wrapping) for specific target-dependent interrupt handlers, with thorough rationale and comprehensive test coverage.
fix(compiler-vapor): drop comment children of Transition/TransitionGroup
This PR teaches how to align compiler output with runtime and SSR behavior by filtering out comment nodes in specific components, with comprehensive tests ensuring hydration consistency and preventing DOM mismatches.
fix(runtime-vapor): avoid rebinding fired once handlers in dynamic props
This PR teaches how to correctly handle once-only event listeners in a dynamic props system to avoid rebinding after firing, including adding regression tests to verify behavior.
fix: make nil DeviceTaintSelector match no devices (tracker)
This PR teaches how to correctly handle nil versus empty selectors in API logic, fix a subtle bug by aligning implementation with documented behavior, and update tests to prevent regressions.
runtime: invoke shim.Delete when connection is closed
This PR teaches how to handle cleanup and event publication when a runtime shim process is killed, including robust test design for regression and event-driven state cleanup.
make target feature ABI check a hard error on ARM
This PR teaches how to transition a compiler warning to a hard error for target feature ABI mismatches on ARM, including diagnostic design and targeted testing.
ai_protocol_manager: make inline string threshold configurable
This PR teaches how to expose and manage a configurable parsing threshold with fallback logic across multiple layers, including schema overrides, with validation and testing.
fix job pod could not be removed while removing finalizer failed
This PR teaches how to implement retry with rate-limiting for error handling in a controller and how to write unit tests to verify retry behavior.
[flang][openmp] Support importing module declare target globals
This PR teaches how to extend compiler lowering to correctly propagate OpenMP declare target attributes for globals imported from modules, including design of modular marking functions and adding tests.
[mlir][bufferization] Fix crash when returning an allocation twice
This PR teaches how to safely handle multiple returns of the same allocation by deferring erasure, reusing buffers, and adding copies, with thorough testing for static and dynamic cases.
rustdoc: Take into account edition information for keyword highlighting
This PR demonstrates how to thread contextual information (like language edition) through a codebase to ensure correct feature handling and syntax highlighting, with attention to backwards compatibility and robust testing.
zlib: avoid waiting for paused ZIP iterators
This PR teaches how to manage asynchronous iteration and resource cleanup concurrency by tracking active reads to allow safe closing of file-backed iterators without hanging or invalid state errors.
validation-gen: allow required/optional tags on non-pointer structs
This PR teaches how to extend validation logic to support new use cases by allowing required/optional tags on non-pointer struct fields, balancing runtime validation and documentation, with thoughtful test coverage and discussion on semantic implications.
Fix NodeRestriction audience authz fallback on volume lookup error
This PR teaches how to handle error fallback logic in authorization checks with detailed testing to ensure security correctness in a Kubernetes admission plugin.
kubelet: update ASW when CSIDriver attachment requirement changes
This PR teaches how to fix a subtle state synchronization bug in a complex system by updating internal state consistently and improving e2e tests to avoid race conditions.
sqlite: throw on disposal of an in-use session
This PR demonstrates how to ensure consistent error handling and state management in a native module's API, including aligning disposal and close semantics and updating tests and documentation accordingly.
implement [u8]::split_ascii_whitespace
This PR teaches how to extend a core slice API with a new iterator-based method that splits byte slices on ASCII whitespace, including designing a custom iterator, using iterator adapters, and adding comprehensive tests.
[Flang] Fix IsProcedure() for procedure-valued function references
This PR teaches how to fix a subtle semantic bug by recursively inspecting function results to correctly identify procedure-valued function references, with comprehensive regression tests to prevent assertion failures and ensure accurate error reporting.
kubelet: only track pod certificates for admitted pods
This PR teaches how to fix a bug by reordering logic to ensure actions occur only after successful admission, accompanied by a targeted test to verify correct behavior.
fix(shared): correctly compare Map and Set values
This PR teaches how to implement deep equality comparison for complex data structures like Map and Set, including handling unordered entries and loose equality, with thorough test coverage.
custom_response: expose existing local reply body to formatter
This PR teaches how to extend an API to expose internal data safely for custom formatting, handle precedence in configuration, and verify behavior with focused unit and integration tests.
fix(runtime-core): avoid caching unmounted suspense children
Demonstrates careful caching logic to avoid invalid state in nested async UI components with a detailed regression test for complex Suspense and KeepAlive interactions.
gh-154085: Avoid duplicating diff line values
This PR teaches how to avoid duplicating profiling sample counts in flamegraph diff calculations by carefully weighting self and inclusive samples, with thorough tests validating the correctness of the approach.
feat: accept repository-style Azure keys in repo-creds (#29414)
This PR demonstrates how to add backwards-compatible support for multiple key aliases in configuration parsing, including precedence rules and thorough unit testing.
GH-46646: [dev][R] Replace linr with jarl for R linting / pre-commit check
This PR teaches how to modernize and simplify pre-commit linting for an R codebase by switching from a system-dependent linter to a standalone tool, updating CI and documentation, and handling configuration and migration issues.
fix(compiler-vapor): propagate component root through Transition
This PR demonstrates how to transparently handle wrapper components (like transitions) in a compiler's single-root detection logic and how to write regression tests for subtle class merging bugs.
feat: add health check for MedusaTask (issue #28007)
This PR demonstrates how to implement and test a custom health check for a Kubernetes CRD, handling edge cases and status transitions.
fix(ui): show operation state on applications list page (#29063)
This PR teaches how to maintain API/UI contracts by carefully projecting only necessary fields and writing targeted tests to prevent regression in data payloads.
fix: [2.6] enforce partition statistics privilege (#52248)
This PR demonstrates how to enforce and test fine-grained RBAC privileges for API endpoints, including updating tests to verify correct permission handling.
importinto: forbid importing into TTL-enabled tables
This PR teaches how to enforce safety checks to prevent data consistency issues by synchronously rejecting operations on tables with conflicting background jobs (TTL), and demonstrates robust testing to ensure such checks can't be bypassed.
quic: convert incoming :status header to number
This PR demonstrates how to align API behavior across protocols (HTTP/2 and HTTP/3) for consistency, including updating tests and documentation to reflect subtle type changes in header handling.
fix: validate resolved OIDC config after secret substitution (#29545)
This PR teaches how to correctly validate configuration values that may reference secrets, ensuring validation occurs after secret substitution and demonstrates how to write targeted tests for such logic.
implement `Add` and `Sub` for `Complex`
This PR teaches how to implement generic operator overloading for a numeric type in Rust, handle trait bounds and conflicts, and write comprehensive tests for arithmetic operations.
fix(filter): create filter chain before calling onLocalReply
This PR teaches how to handle early error cases by ensuring filter chains are created before invoking callbacks, with associated test updates and discussion on API behavior changes.
[DOM] Update HTML parser rules for new select parser
This PR teaches how to update internal validation logic and tests to align with evolving HTML parsing standards, highlighting the importance of cross-browser consistency and developer warnings for hydration errors.
Ignore succeeded pods in HPA replica calculations
This PR teaches how to fix a subtle bug in autoscaling logic by properly ignoring terminal pods and demonstrates adding comprehensive tests to verify the fix.
Fix misleading CRD minItems/minProperties validation errors
This PR teaches how to improve error reporting for API validation by mapping low-level validation codes to user-friendly error messages and updating tests to verify the new behavior.
fix(autoscaling): Skip per-pod metric division in replica calculator when replicas is 0 to avoid overflow/underflow
This PR teaches how to safely handle division by zero and overflow in scaling calculations with a helper function and thorough unit tests.
[kube-proxy/winkernel] Guard against load balancers without port mappings
This PR teaches how to safely handle unexpected empty data structures to prevent panics and how to write tests to verify robustness against malformed inputs.
fix:volumeattachment could not be cleanup while controller-manager restart after volumeattachment created because of csidriver created delay
This PR teaches about handling delayed resource availability in distributed systems by refactoring plugin lookup logic and adding targeted tests to ensure volume attachment recovery correctness.
gh-154088: Count elided stacks consistently
This PR teaches how to improve profiling data accuracy by consistently counting elided stacks in flamegraphs, including adding targeted tests to verify the behavior.
dynamic_modules: expose current log level getter for HttpFilterConfigHandle in GO SDK
This PR demonstrates how to expose and test logging-related methods in SDK interfaces for better testability and API consistency across language bindings.
Revert "Add rustc_test_entrypoint_marker"
This PR teaches how to safely revert a feature that caused regressions, including handling test fallout and discussing alternative designs for attribute macros.
[libc++] Implement P3798R1: The unexpected in `std::expected`
This PR demonstrates how to add a new API method to a standard library type in a backwards-compatible way, update feature test macros, and write comprehensive tests for the change.
Cleanup the legacy v2 snapshot files on bootstrap
This PR teaches how to safely remove legacy files during system bootstrap with proper logging and verification via an end-to-end test.
Go deep (senior) · 31
fix(runtime-vapor): dispose component v-for item resources on removal
This PR teaches how to prevent memory/resource leaks in reactive UI frameworks by correctly scoping and disposing per-item resources in dynamic component lists, with robust regression tests and careful teardown ordering.
Fix synchronous cancellation race in Channels
This PR teaches how to fix a subtle race condition in async cancellation logic, ensuring atomicity and correctness in concurrent channel operations, and demonstrates how to write deterministic tests for such concurrency bugs.
Fix ConcurrentQueue.TryDequeue spuriously reporting empty during a segment freeze
This PR teaches how subtle memory ordering bugs in lock-free concurrent data structures can cause rare, hard-to-reproduce errors, and how to reason about and test for correct publication protocols.
Fix replica left as a sub-replica after a failover
This PR teaches how to robustly repair and test subtle consistency bugs in distributed systems, specifically preventing invalid replication chains after failover in Redis clusters.
Fix RIGHT JOIN with parallel_replicas_min_number_of_rows_per_replica
This PR teaches how to correctly handle query plan analysis reuse in parallel query execution, especially for RIGHT JOINs, to avoid subtle cross-table errors and demonstrates robust regression testing for distributed SQL engines.
Fix wrong `ORDER BY` results for `Merge` over `Distributed`
This PR teaches how distributed query engines must carefully preserve stream ordering to ensure correct results for ORDER BY and LIMIT, and how to write regression tests for subtle distributed query bugs.
Fix lazy materialization OOB and a Merge LOGICAL_ERROR from unused text index virtual columns
This PR teaches how to maintain invariants between query plan steps by pruning unused virtual columns after DAG rewrites, preventing subtle header mismatches that can cause out-of-bounds errors and logical failures in query engines.
[Fiber] Detect useSyncExternalStore mutations missed while Activity tree was hidden
This PR teaches how to ensure state consistency and correct subscription handling in complex UI frameworks when components are temporarily disconnected and reconnected, using robust effect management and regression testing.
Add multiplicity-aware combine support and fix LIST state combination
This PR teaches how to correctly handle aggregate state combination with multiplicities in query optimizations, especially for list-backed aggregates, and demonstrates robust testing and plan stability practices.
Fix codegen of NotMask on x64
This PR teaches how to fix subtle code generation bugs in a JIT compiler for SIMD mask operations, including how to generalize bit-masking logic, optimize IR transformations, and add targeted regression tests.
Check for SIG_IGN and SIG_DFL before calling previous signal handler
This PR teaches how to robustly handle inherited signal handler state across execve on macOS, including defensive checks against stale pointers and how to write a regression test for subtle OS-level signal handling bugs.
[mono][wasm] Box gsharedvt Nullable<T> via a wrapper-free runtime helper
This PR demonstrates how to robustly refactor runtime boxing logic for generics to avoid subtle AOT/interop traps, including adding targeted regression tests and handling missing runtime helpers.
Fix generic virtual dispatch hang after multiple AssemblyLoadContext unloads
This PR teaches how subtle bugs in cache sentinel handling can cause memory leaks or stale data after unloading assemblies, and demonstrates robust regression testing and defensive coding in complex runtime systems.
Fix form status reset when component state is updated
This PR teaches how to fix subtle state consistency bugs in complex UI frameworks by carefully propagating context and writing targeted regression tests.
tls: read the peer certificate chain without consuming it
This PR teaches how to fix a subtle bug involving destructive reads of TLS peer certificate chains by duplicating certificates to preserve the chain, adding a new presence check API, and includes a thorough test to ensure non-destructive repeated reads.
Prefer ambiguous candidates when deduplicating traits in scope, so `ambiguous_glob_imported_traits` doesn't depend on import order
This PR teaches how to make compiler diagnostics order-independent by carefully deduplicating trait candidates and writing robust regression tests for subtle name resolution bugs.
[Clang] Fix "Unions cannot be dynamic classes" assertion
This PR teaches how to robustly handle ill-formed C++ member declarations in a compiler, ensuring error recovery doesn't corrupt class properties or cause crashes, and how to test such edge cases.
quic: release stream arenas before cleanup
This PR teaches how to safely manage memory and resource cleanup in the presence of asynchronous destruction and JavaScript/native interop, including regression testing for subtle teardown bugs.
fix(runtime-vapor): preserve nested vdom slot content (fix #15303)
This PR demonstrates how to maintain correct slot content behavior and transition consistency when integrating two different rendering models (Vapor and VDOM) in a complex UI framework, including robust regression testing.
JIT: update impFixupStructReturnType to handle `GT_RET_EXPR`
This PR demonstrates how to correctly handle struct return types in a JIT compiler by updating IR transformations and adding targeted regression tests.
Fix SIMD primitive zero initialization
This PR demonstrates how subtle bugs in compiler IR transformations can lead to incorrect codegen for SIMD types, and how to write targeted regression tests to catch such issues.
point at closure return expression in non-`FnOnce` E0271 errors
This PR teaches how to improve compiler diagnostics by precisely pointing to closure return expressions in trait projection errors, including how to test and reason about such changes.
Enable `-Znext-solver` on nightly by default
This PR teaches how to enable a new compiler feature by default on nightly, while carefully managing configuration, backwards compatibility, and test isolation in a large, complex codebase.
Fix Wasm SCC profile weights for #133120
This PR demonstrates how to correctly update profile weights during control flow rewrites in a JIT compiler and how to add targeted regression tests for subtle codegen bugs.
support `#[target_feature(enable = ...)]` on `#[naked]` functions
Demonstrates adding support for target-specific CPU features on naked functions in a compiler backend, including cross-target handling, feature toggling, and integration with inline assembly.
[Clang] Fix a regression introduced by #216729.
This PR teaches how subtle API design choices (constructor overloads) can lead to confusing bugs in compiler internals, and how targeted tests help prevent regressions in complex language features like C++ concepts.
[clang] Fix lost lambda capture in dependent co_return operand
This PR teaches how subtle compiler semantic actions affect lambda capture correctness in dependent coroutine return expressions and how to fix them by ensuring full-expression completion.
[LoopInterchange] Swap preheader contents before rebuilding LCSSA
This PR teaches how careful ordering of IR transformations and dominance properties is critical when rebuilding loop-closed SSA form, with a detailed test case illustrating the subtle bug fixed by swapping preheader contents earlier.
[clang][Parse] Stop parsing declarator chunks after a parenthesized structured binding
This PR teaches how to robustly extend a C++ parser to properly handle edge cases in declarator parsing, preventing crashes and ensuring correct diagnostics for invalid structured binding syntax.
[SelectionDAG] Fix load/store legalization for softened x86_fp80
This PR teaches how to fix a subtle crash by adjusting load/store legalization for widened softened floating-point types and includes a thorough test to verify correctness.
add target feature ABI checks for SPARC
This PR teaches how to add and enforce ABI consistency checks for a CPU architecture in a compiler, including updating target features, error messages, and tests to ensure correct ABI usage.
[ 02 // MUST-READ PAPERS ]
Free to read, ranked by citations.
- QuickCheck: a lightweight tool for random testing of Haskell programsKoen Claessen, John Hughes · ACM SIGPLAN International Conference on Functional Programming · 2000
Quick Check is a tool which aids the Haskell programmer in formulating and testing properties of programs, and can be automatically tested on random input, but it is also possible to define custom test data generators.
1,440 citationsfree PDF - An Empirical Analysis of UI-Based Flaky TestsAlan Romano, Zihe Song, Sampath Grandhi · ACM/IEEE International Conference on Software Engineering: Companion Proceedings (ICSE-Companion) · 202165 citationsfree PDF
[ 03 // FREE VIDEOS & TALKS ]
Ranked by views.
other topics

