Skip to content

Publish releases only from owner-approved tags, add contribution and security policy - #5

Merged
HugoLopes45 merged 2 commits into
mainfrom
chore/release-hardening
Oct 6, 2026
Merged

HugoLopes45 merged 2 commits into
mainfrom
chore/release-hardening

Conversation

@HugoLopes45

@HugoLopes45 HugoLopes45 commented Oct 6, 2026 •

Copy link
Copy Markdown
Owner

Why

release.yml ran on every push to main and tried to publish to npm. Merging #3 started such a run; it failed only because no npm trusted publisher exists yet. The repository is public, but it had no security policy, so a report could leak session content in a public issue.

What

This change:

  • scripts/release.ts and its tests:
    • Validates package and lockfile names and versions, and the release notes, in npm run check.
    • Rejects a version rollback in a PR.
    • Resolves an explicit vX.Y.Z tag on main.
    • Refuses an npm version that comes from another commit.
  • release.yml: manual Publish release from a tag. Only the owner can start it. It needs successful CI on the exact commit and approval of the npm environment.
  • ci.yml: weekly run, manual run, version-change check, and a check against the latest Pi packages on Node 24.
  • CONTRIBUTING.md, SECURITY.md and the bug template.
  • README release procedure.

Repository settings already applied:

  • The npm environment has the owner as required reviewer (self-review allowed) and accepts only v* tags.
  • The Immutable release tags ruleset blocks updates and deletion of v* tags.
  • Private vulnerability reporting is enabled.
  • The old Release workflow is disabled until this PR is merged.

Checks

  • npm run check passes: 128/128 tests.
  • node scripts/release.ts check <main sha> prints version=0.2.0, changed=false.
  • Owner action after merge: re-enable the workflow with gh workflow enable release.yml.
  • Owner action before the first release: configure the npm trusted publisher (release.yml, environment npm). pi-context-kit is not on npm yet.

The repository is public but had no contribution guide, security policy or issue template, so reports could leak session content in public issues. These follow pi-claude-pro, adapted to an extension without account or live checks.
Every push to main ran the npm publication step. The merge of #3 tried
to publish 0.2.0 and failed only because no trusted publisher exists
yet. This ports the pi-claude-pro release lifecycle: CI validates
version changes and lockfile metadata, merges only prepare a version,
and publication needs an explicit v* tag on main, successful CI on that
commit, and owner approval of the npm environment. An existing npm
version must come from the same commit.

CI also runs weekly and against the latest Pi packages.
@HugoLopes45 HugoLopes45 self-assigned this Oct 6, 2026
@HugoLopes45 HugoLopes45 changed the title Adopt the pi-claude-pro release and contribution setup Publish releases only from owner-approved tags, add contribution and security policy Oct 6, 2026
@HugoLopes45
HugoLopes45 merged commit c92d72d into main Oct 6, 2026
2 checks passed
@HugoLopes45
HugoLopes45 deleted the chore/release-hardening branch October 6, 2026 09:43
HugoLopes45 added a commit that referenced this pull request Oct 6, 2026
The old README assumed knowledge of compaction, tokens and thresholds.
This rewrite, in ASD-STE100 style:

- explains the terms and the sequence of a session;
- documents every `contextKit` setting with its allowed values, default
and an example;
- adds recipes, limits and questions.

Checked against the code:
- Defaults, validation rules and the warning text match `src/config.ts`
and `extensions/index.ts`.
- `soft` writes Pi's summary at the extension threshold (#4). Only `[]`
waits for Pi's own limit.
- The release section is unchanged from #5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant