GEMMA DEVELOPER AGENTSAVED EVIDENCE
← Dataset Exploration
ARCHIVED TRAINING / twisted/towncrier

twisted__towncrier-588

This is a preserved training example. Membership in the current training wave has not been verified.
twisted/towncrier · Task 165 of 169

Problem statement

Issue number incorrectly inferred when hash is all digits
I've been using towncrier with [mostly default configuration](https://github.com/jaraco/skeleton/blob/6ff02e0eefcd90e271cefd326b460ecfa0e3eb9e/towncrier.toml) to generate news entries. I'll sometimes give a filename with an issue number (`{issue}.{scope}.rst`) and other times use `+.{scope}.rst`, and that works well. When I supply an issue number, it's included in the changelog and when I don't, it's omitted.

However, today when using towncrier 23.11, my expectation was violated when the generated hash was all digits:

```
 backports.tarfile main @ towncrier create -c "Initial release based on tarfile from Python 3.12.2." +.removal.rst
Created news fragment at /Users/jaraco/code/jaraco/backports.tarfile/newsfragments/+96333363.removal.rst
 backports.tarfile main @ git add newsfragments; git commit -a -m "Add news fragment."
[main ec51166] Add news fragment.
 1 file changed, 1 insertion(+)
 create mode 100644 newsfragments/+96333363.removal.rst
 backports.tarfile main @ tox -e finalize
finalize: install_deps> python -I -m pip install 'jaraco.develop>=7.23' towncrier
finalize: commands[0]> python -m jaraco.develop.finalize
Loading template...
/Users/jaraco/code/jaraco/backports.tarfile/.tox/finalize/lib/python3.12/site-packages/towncrier/build.py:169: EncodingWarning: 'encoding' argument not specified
  resources.files(config.template[0]).joinpath(config.template[1]).read_text()
Finding news fragments...
Rendering news fragments...
Writing to newsfile...
Staging newsfile...
Removing the following files:
/Users/jaraco/code/jaraco/backports.tarfile/newsfragments/+96333363.removal.rst
Removing news fragments...
Done!
[main 786b22e] Finalize
 2 files changed, 7 insertions(+), 1 deletion(-)
 delete mode 100644 newsfragments/+96333363.removal.rst
  finalize: OK (5.36=setup[4.58]+cmd[0.78] seconds)
  congratulations :) (5.42 seconds)
 backports.tarfile main @ head NEWS.rst
v1.0.0
======

Deprecations and Removals
-------------------------

- Initial release based on tarfile from Python 3.12.2. (#96333363)

```

It seems that if the hex hash happens not to have any digits greater than 9, the hash is inferred to be an issue number. That feels like a bug, since the same behavior would not produce an issue number if there were hex digits greater than 9. Perhaps towncrier should provide a way to distinguish between a hash and a typical issue number.

## Hints:
SmileyChris: Looking closer the true source of the error is because `strip_if_integer_string` reads the orphan of `+12345` as an actual integer, stripping off the '+', causing this issue to lose its status as an orphan!
SmileyChris: There, that's tidier!
adiroiban: It looks good. I have enabled auto-merge.
I am happy to review and approve a PR that add more tests... but that should not be a blocker for this PR.

Training membership

opd_e4b_pure_v7 opd_e4b_pure_v7b

Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.

Task and snapshot provenance

Snapshot captured 2026-11-12T17:06:59.476467+00:00 · Autoresearch-Arena/gemma-4-developer-agent

{
  "datasets": [
    "opd_e4b_pure_v7",
    "opd_e4b_pure_v7b"
  ],
  "examples": 9,
  "instance_id": "twisted__towncrier-588",
  "problem_statement": "Issue number incorrectly inferred when hash is all digits\nI've been using towncrier with [mostly default configuration](https://github.com/jaraco/skeleton/blob/6ff02e0eefcd90e271cefd326b460ecfa0e3eb9e/towncrier.toml) to generate news entries. I'll sometimes give a filename with an issue number (`{issue}.{scope}.rst`) and other times use `+.{scope}.rst`, and that works well. When I supply an issue number, it's included in the changelog and when I don't, it's omitted.\r\n\r\nHowever, today when using towncrier 23.11, my expectation was violated when the generated hash was all digits:\r\n\r\n```\r\n backports.tarfile main @ towncrier create -c \"Initial release based on tarfile from Python 3.12.2.\" +.removal.rst\r\nCreated news fragment at /Users/jaraco/code/jaraco/backports.tarfile/newsfragments/+96333363.removal.rst\r\n backports.tarfile main @ git add newsfragments; git commit -a -m \"Add news fragment.\"\r\n[main ec51166] Add news fragment.\r\n 1 file changed, 1 insertion(+)\r\n create mode 100644 newsfragments/+96333363.removal.rst\r\n backports.tarfile main @ tox -e finalize\r\nfinalize: install_deps> python -I -m pip install 'jaraco.develop>=7.23' towncrier\r\nfinalize: commands[0]> python -m jaraco.develop.finalize\r\nLoading template...\r\n/Users/jaraco/code/jaraco/backports.tarfile/.tox/finalize/lib/python3.12/site-packages/towncrier/build.py:169: EncodingWarning: 'encoding' argument not specified\r\n  resources.files(config.template[0]).joinpath(config.template[1]).read_text()\r\nFinding news fragments...\r\nRendering news fragments...\r\nWriting to newsfile...\r\nStaging newsfile...\r\nRemoving the following files:\r\n/Users/jaraco/code/jaraco/backports.tarfile/newsfragments/+96333363.removal.rst\r\nRemoving news fragments...\r\nDone!\r\n[main 786b22e] Finalize\r\n 2 files changed, 7 insertions(+), 1 deletion(-)\r\n delete mode 100644 newsfragments/+96333363.removal.rst\r\n  finalize: OK (5.36=setup[4.58]+cmd[0.78] seconds)\r\n  congratulations :) (5.42 seconds)\r\n backports.tarfile main @ head NEWS.rst\r\nv1.0.0\r\n======\r\n\r\nDeprecations and Removals\r\n-------------------------\r\n\r\n- Initial release based on tarfile from Python 3.12.2. (#96333363)\r\n\r\n```\r\n\r\nIt seems that if the hex hash happens not to have any digits greater than 9, the hash is inferred to be an issue number. That feels like a bug, since the same behavior would not produce an issue number if there were hex digits greater than 9. Perhaps towncrier should provide a way to distinguish between a hash and a typical issue number.\n\n## Hints:\nSmileyChris: Looking closer the true source of the error is because `strip_if_integer_string` reads the orphan of `+12345` as an actual integer, stripping off the '+', causing this issue to lose its status as an orphan!\nSmileyChris: There, that's tidier!\nadiroiban: It looks good. I have enabled auto-merge.\r\nI am happy to review and approve a PR that add more tests... but that should not be a blocker for this PR.",
  "repo": "twisted/towncrier",
  "source": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
  "source_sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
}
{
  "captured_at": "2026-11-12T17:06:59.476467+00:00",
  "membership": "archived training",
  "membership_evidence": "Task issues extracted from preserved verified_rft_messages training examples. This is not a verified current RL wave manifest.",
  "name": "Preserved post-training task archive",
  "source": "Autoresearch-Arena/gemma-4-developer-agent",
  "source_revision": "016496de222aaafca0d4ee4c18efc63ba616f76e",
  "sources": [
    {
      "path": "v2/experiments/train_data/opd_e4b_cispo_v5/verified_rft_messages.jsonl",
      "sha256": "a43610ad0dfb6ace95375cfae09000f41afc0338cc925af870a4ade7a9b20c4c"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_hybrid_v3/verified_rft_messages.jsonl",
      "sha256": "bd326303eb127e8e5e08f03daf97bb88d79d19709d59f3f93f348bc56686a8df"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_onpolicy_v3/verified_rft_messages.jsonl",
      "sha256": "960c680e797e823a0d3a22f4b1d5ef60a72971373d703b877340b0c9126aaf68"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6a/verified_rft_messages.jsonl",
      "sha256": "f045b7ca5b3883a1e2eaee81e1c02a4a1b53dd7b7b36e98bacb2ba5823a15148"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v6b/verified_rft_messages.jsonl",
      "sha256": "0f62460a9706eea5e1605255896f191ab00cb5706c5f1f2e1c293e9a718218dc"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7/verified_rft_messages.jsonl",
      "sha256": "e37f7bd675322f3f81500b73559d60d5f602ca0537bf19f5cb06332c728c7b72"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_pure_v7b/verified_rft_messages.jsonl",
      "sha256": "b864bdc8695183433eef6e31cb8d33fad44ba3aded2170c1ade4ad5b2944ce23"
    },
    {
      "path": "v2/experiments/train_data/opd_e4b_self_audit_v4/verified_rft_messages.jsonl",
      "sha256": "0026023745afb8f3dc1c176dc7f7171157b4ad5a66656b524af218e8e19ceee6"
    },
    {
      "path": "v2/experiments/train_data/rft_e4b_aligned_v2/verified_rft_messages.jsonl",
      "sha256": "92a4515fee9d152b0d4c510ee3ce4caaaffe2003ba7584469f8027f174aab18c"
    },
    {
      "path": "v2/experiments/train_data/rft_v1/verified_rft_messages.jsonl",
      "sha256": "a42453ccd7ac7680b0a03865e8e7080bc8bf74c8d9d193b440c441ed46f8512b"
    },
    {
      "path": "v2/experiments/train_data/rft_v2/verified_rft_messages.jsonl",
      "sha256": "18f4b3bd7e651f83c6acab479c9475e3fa50dc652a384f309e97146983ac85ba"
    }
  ]
}