LibreSign / LibreSign/libresign

Add an internal switch for experimental features

Open
#8,333 1 comment 0 reactions 1 assignee View on GitHub

@MarvelBR is already working on this.

Since Sep 11, 2026.

backend good first issue php
Dominant language
PHP
Stars
818
Forks
146
Avg merge
11h 31m
Merged PRs (30d)
326

Description

Context

LibreSign sometimes needs large features that are developed through several pull requests over time.

These changes should be merged into main when they are ready and reviewed, but unfinished features must not become visible to normal users or administrators in production releases.

Add one internal app configuration switch that future work can use to expose features that are still experimental.

This is not a full feature flag system. It is only a simple global switch for development and testing.

Configuration

Use the app configuration key:

experimental_features

Expected behavior:

  • missing value: experimental features are disabled;
  • false: experimental features are disabled;
  • true: code paths explicitly marked as experimental may be exposed.

The default must be disabled.

The value must be configurable only through Nextcloud app configuration, for example with occ config:app:set.

Do not add this option to the LibreSign administration or user interface.

Scope

Add the minimal backend support needed so LibreSign code can read this configuration consistently.

Reuse IAppConfig and Application::APP_ID.

Keep the implementation simple. Do not create a generic feature flag framework, registry, targeting rules, per-user flags, rollout percentages, database tables or a settings UI.

The important behavior is that future code can check one boolean app configuration before exposing an unfinished feature.

Usage rule for future features

The switch should be checked only at the main exposure point of an unfinished feature when possible.

For example, a future feature may use the switch to decide whether its root policy is registered or listed. Internal domain classes do not need to check the switch if the feature cannot be reached while its main exposure point is hidden.

This keeps experimental checks small and easy to remove when a feature becomes production-ready.

When one experimental feature becomes stable, remove the condition for that feature. Keep the global experimental_features configuration available for other future work.

Tests

Add focused backend tests covering at least:

  • no saved value behaves as false;
  • saved false behaves as disabled;
  • saved true behaves as enabled.

Follow the existing LibreSign test conventions and use the existing app configuration test patterns.

No frontend, Behat or Playwright test is needed because this issue must not add any user-visible behavior.

Release safety

This change must be safe to merge into main and release immediately.

With the default configuration:

  • no new UI is shown;
  • no existing feature changes behavior;
  • no experimental feature is enabled automatically.

This issue must not expose any unfinished feature by itself.

Out of scope

This issue does not:

  • implement Remote Signing or any other experimental feature;
  • add a Remote Signing policy;
  • add CSC or ICP-Brasil PSC support;
  • add a new signing method;
  • add frontend components;
  • add capabilities for experimental features;
  • create a general-purpose feature flag framework;
  • add per-feature configuration keys.

Future issues will add conditions at the appropriate exposure points of each unfinished feature.

Good first issue

This is a small backend change based on the existing Nextcloud app configuration API.

The main work is:

  • define the experimental_features app configuration behavior;
  • reuse IAppConfig to read it as a boolean with false as the default;
  • keep the implementation small and reusable by future code;
  • add focused unit tests.

No database migration, controller, frontend change or new configuration UI is needed.

Please keep the change focused. If the implementation starts to require a feature registry or a larger abstraction, discuss it in this issue before adding that complexity.

Additional context
  • If you have questions, feel free to ask in this issue.
  • Give a ⭐️ star to this repository if you find LibreSign useful and would like to support the project.
  • You can also join our community: https://t.me/LibreSign

Done when

  • experimental_features is disabled when no value is configured.
  • false keeps experimental features disabled.
  • true can be read by future experimental feature code.
  • The implementation reuses IAppConfig and the LibreSign app ID.
  • Focused backend tests cover missing, disabled and enabled values.
  • No UI or API for managing the switch is added.
  • No experimental feature is exposed by this issue.
  • Existing LibreSign behavior remains unchanged.
  • The change can be merged into main and safely included in a release.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.