.. THIS IS AUTOGEMERATED USING:
   
   ./socorro-cmd signature-doc socorro.signature.generator.DEFAULT_RULESET socorro/signature/pipeline.rst
   
Signature generation ruleset
============================n

This is the signature generation ruleset defined at ``socorro.signature.generator.DEFAULT_RULESET``:

1. **Rule: SignatureGenerationRule**
   
   Generates a signature based on stack frames.
   
   For Java crashes, this generates a basic signature using stack frames.
   
   For C/C++/Rust crashes, this generates a more robust signature using
   normalized versions of stack frames augmented by the contents of the
   signature lists.
   
   Rough signature list rules (there are more details in the siglists README):
   
   1. Walk the frames looking for a "signature sentinel" which becomes the
      first item in the signature.
   2. Continue walking frames.
   
      1. If the frame is in the "irrelevant" list, ignore it and
         continue.
      2. If the frame is in the "prefix" list, add it to the signature
         and continue.
      3. If the frame isn't in either list, stop walking frames.
   
   3. Signature is generated by joining those frames with " | " between
      them.
   
   If it's a C/C++/Rust signature, this rule also adds to ``result.extra``:
   
   * ``normalized_frames``: the list of normalized frames
   * ``proto_signature``: a ``" | "`` delimited string of the normalized
     frames
   
   :param signature_list_dir: path to the directory with the signature lists to use or
       ``None`` if you want to use the included ones

2. **Rule: StackwalkerErrorSignatureRule**
   
   Appends minidump-stackwalker error to signature.

3. **Rule: BadHardware**
   
   Prepends ``bad hardware`` to signatures that are from bad hardware.
   
   See `bug #1733904 <https://bugzilla.mozilla.org/show_bug.cgi?id=1733904>`__.

4. **Rule: OOMSignature**
   
   Prepends ``OOM | <size>`` to signatures for OOM crashes.
   
   See `bug #1007530 <https://bugzilla.mozilla.org/show_bug.cgi?id=1007530>`__.

5. **Rule: AbortSignature**
   
   Prepends abort message to signature.
   
   See `bug #803779 <https://bugzilla.mozilla.org/show_bug.cgi?id=803779>`__.

6. **Rule: SignatureShutdownTimeout**
   
   Replaces signature with ``async_shutdown_timeout`` message.
   
   This supports ``AsyncShutdownTimeout`` annotation values with the following
   structure::
   
       {
           "phase": <str>,
           "conditions": [
               {
                   "name": <str>,
                   ...
               }
           ]
       }

7. **Rule: SignatureRunWatchDog**
   
   Prepends ``shutdownhang`` to signature for shutdown hang crashes.

8. **Rule: SignatureIPCChannelError**
   
   Stomps on signature with shutdownkill signature
   
   Either ``IPCError-browser | ShutDownKill`` or ``IPCError-content | ShutDownKill``.

9. **Rule: SignatureIPCMessageName**
   
   Appends ``ipc_message_name`` value to signature.

10. **Rule: SignatureParentIDNotEqualsChildID**
    
    Stomp on the signature if ``moz_crash_reason`` is ``parentBuildID != childBuildID``.
    
    In the case where the assertion fails, then the parent buildid and the child buildid are
    different. This causes a lot of strangeness particularly in symbolification, so the signatures
    end up as junk. Instead, we want to bucket all these together so we replace the signature.

11. **Rule: StackOverflowSignature**
    
    Prepends ``stackoverflow``
    
    See `bug #1796389 <https://bugzilla.mozilla.org/show_bug.cgi?id=1796389>`__.

12. **Rule: SigFixWhitespace**
    
    Fix whitespace in signatures.
    
    This does the following:
    
    * trims leading and trailing whitespace
    * converts all non-space whitespace characters to space
    * reduce consecutive spaces to a single space

13. **Rule: SigTruncate**
    
    Truncates signatures down to ``SIGNATURE_MAX_LENGTH`` characters.

